summaryrefslogtreecommitdiffstats
path: root/tests/auto/render/qlevelofdetail/tst_qlevelofdetail.cpp
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-02-17 15:15:50 +0000
committerSean Harmer <sean.harmer@kdab.com>2017-02-19 13:46:13 +0000
commit7328700ee5622fbb635205592c97280a8f84817a (patch)
tree79b234ecc68175b5a3289f906ccb4d6258ec8321 /tests/auto/render/qlevelofdetail/tst_qlevelofdetail.cpp
parentf22b372e812ee808ba2dd88bf345ef6f4fb635d1 (diff)
Revert "Use QVector<float> in level of detail APIs"
This reverts commit 5bceaee38908934078bbdb62b564daa68f7e182b. QML uses doubles throughout and there is no good way or place to reliably switch to floats in the API. We tried extending QtDeclarative to work with QJSValues containing vectors/lists of floats and doubles (rather than qreal) but this introduces rounding errors that are difficult to control robustly. We also looked at removing the Q_PROPERTY in C++ and adding it to a QML extension object. But that would make it not work with animations bound to this property. So, in the end, it seems like qreal is the best of a bad set of alternatives. We should make a renewed effort to kill qreal for Qt 6. Change-Id: I9d61e58e7223eb5a6b848ba33fc760b3654bbddd Reviewed-by: Mike Krus <mike.krus@kdab.com>
Diffstat (limited to 'tests/auto/render/qlevelofdetail/tst_qlevelofdetail.cpp')
-rw-r--r--tests/auto/render/qlevelofdetail/tst_qlevelofdetail.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/render/qlevelofdetail/tst_qlevelofdetail.cpp b/tests/auto/render/qlevelofdetail/tst_qlevelofdetail.cpp
index 2f8f6a957..e2ffdd9da 100644
--- a/tests/auto/render/qlevelofdetail/tst_qlevelofdetail.cpp
+++ b/tests/auto/render/qlevelofdetail/tst_qlevelofdetail.cpp
@@ -103,7 +103,7 @@ private Q_SLOTS:
{
// WHEN
- QVector<float> thresholds = {10.0f, 20.0f, 30.0f};
+ QVector<qreal> thresholds = {10., 20., 30.};
lod->setThresholds(thresholds);
QCoreApplication::processEvents();