diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2023-05-12 15:46:54 +0800 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2023-05-17 01:43:15 +0000 |
commit | f69b5f260e301dc01c7d85cd1cb9d45582ef3d6d (patch) | |
tree | a9c449024c8f7bf8c974682c65e94702e0d9d17a /tests/auto | |
parent | 94475c9e533dc8b05c606c92b91ab2b645960ac0 (diff) | |
download | qtdeclarative-f69b5f260e301dc01c7d85cd1cb9d45582ef3d6d.tar.gz |
QQuickMaterialPlaceholderText: fix code checker complaint
The message was:
result of integer division used in a floating point context;
possible loss of precision
Fixing it revealed a test that relied on it; removed the Math.floor()
work-around the test used previously.
Pick-to: 6.5
Change-Id: I7c2fde1902d2013ba9fedcadf87ae3b21987fca2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/quickcontrols/qquickmaterialstyle/data/tst_material.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/quickcontrols/qquickmaterialstyle/data/tst_material.qml b/tests/auto/quickcontrols/qquickmaterialstyle/data/tst_material.qml index aac3bbd832..fb516ec669 100644 --- a/tests/auto/quickcontrols/qquickmaterialstyle/data/tst_material.qml +++ b/tests/auto/quickcontrols/qquickmaterialstyle/data/tst_material.qml @@ -1070,7 +1070,7 @@ TestCase { // The placeholder text should always float at a fixed position at the top // when text has been set, even when it's in a Flickable. flickable.contentY = -50 - compare(placeholderTextItem.y, -Math.floor(placeholderTextItem.largestHeight / 2)) + compare(placeholderTextItem.y, -placeholderTextItem.largestHeight / 2) flickable.contentY = 0 // When the text is cleared, it shouldn't float. |