From 61dbdc79a54861fefd36ec485af87a0440eb567a Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Tue, 25 Mar 2014 12:35:14 -0400 Subject: [PATCH] don't turn integers into floats, avoids possible loss of precision --- openbr/openbr_plugin.cpp | 2 ++ 1 file changed, 2 insertions(+), 0 deletions(-) diff --git a/openbr/openbr_plugin.cpp b/openbr/openbr_plugin.cpp index 47791fe..94fc737 100644 --- a/openbr/openbr_plugin.cpp +++ b/openbr/openbr_plugin.cpp @@ -137,6 +137,8 @@ QVariant File::parse(const QString &value) if (ok) return point; const QRectF rect = QtUtils::toRect(value, &ok); if (ok) return rect; + const int i = value.toInt(&ok); + if (ok) return i; const float f = value.toFloat(&ok); if (ok) return f; return value; -- libgit2 0.21.4