diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-09-23 20:45:24 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-09-26 11:47:34 +0200 |
commit | 1d1b3f5882c52ee310563d3b6963e6f5f2b59b70 (patch) | |
tree | ab49b8e94a9555e030b20bcb4381a5444c0cd209 | |
parent | 15f7b21c4bcd8a6128ba9944595d10a6de7e3035 (diff) | |
download | qtlocation-mapboxgl-1d1b3f5882c52ee310563d3b6963e6f5f2b59b70.tar.gz |
[Qt] Qt conversion toNumber() should accept QVariant::Int
-rw-r--r-- | platform/qt/src/qt_conversion.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/qt/src/qt_conversion.hpp b/platform/qt/src/qt_conversion.hpp index 653c742ad5..acb7ed7d54 100644 --- a/platform/qt/src/qt_conversion.hpp +++ b/platform/qt/src/qt_conversion.hpp @@ -69,7 +69,7 @@ inline optional<bool> toBool(const QVariant& value) { } inline optional<float> toNumber(const QVariant& value) { - if (value.type() == QVariant::Double) { + if (value.type() == QVariant::Int || value.type() == QVariant::Double) { return value.toFloat(); } else { return {}; |