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 | 137 | if (ok) return point; |
| 138 | 138 | const QRectF rect = QtUtils::toRect(value, &ok); |
| 139 | 139 | if (ok) return rect; |
| 140 | + const int i = value.toInt(&ok); | |
| 141 | + if (ok) return i; | |
| 140 | 142 | const float f = value.toFloat(&ok); |
| 141 | 143 | if (ok) return f; |
| 142 | 144 | return value; | ... | ... |