Commit 61dbdc79a54861fefd36ec485af87a0440eb567a
1 parent
f3cd2951
don't turn integers into floats, avoids possible loss of precision
Showing
1 changed file
with
2 additions
and
0 deletions
openbr/openbr_plugin.cpp
| @@ -137,6 +137,8 @@ QVariant File::parse(const QString &value) | @@ -137,6 +137,8 @@ QVariant File::parse(const QString &value) | ||
| 137 | if (ok) return point; | 137 | if (ok) return point; |
| 138 | const QRectF rect = QtUtils::toRect(value, &ok); | 138 | const QRectF rect = QtUtils::toRect(value, &ok); |
| 139 | if (ok) return rect; | 139 | if (ok) return rect; |
| 140 | + const int i = value.toInt(&ok); | ||
| 141 | + if (ok) return i; | ||
| 140 | const float f = value.toFloat(&ok); | 142 | const float f = value.toFloat(&ok); |
| 141 | if (ok) return f; | 143 | if (ok) return f; |
| 142 | return value; | 144 | return value; |