summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@theqtcompany.com>2015-11-04 11:26:56 +0100
committerJędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>2015-11-04 12:59:30 +0000
commita68b58a35aeafad279236d31c28acda02baff5cf (patch)
tree46cb8071b5fb84cbcaea5f7578004267e7a7fb09 /tests
parentb2492f31fd55b7b7335154464c1c12a6895f5a23 (diff)
downloadqtquickcontrols-a68b58a35aeafad279236d31c28acda02baff5cf.tar.gz
Fix CircularGauge's tickmark labels all being set 0
We were relying on model.get() to somehow reevaluate after we'd updated properties of model items, which somehow worked until 4876ea6a18ccdfd72014582aa5d50ab9f6b6ec9e. The correct approach is to do the same thing as we do for styleData.index: rely on the model properties that are exposed to the delegate, which do get updated. Change-Id: I529ab7dcc142187fc185b11658dc5e1496b6d6db Task-number: QTBUG-48839 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/extras/data/tst_circulartickmarklabel.qml9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/extras/data/tst_circulartickmarklabel.qml b/tests/auto/extras/data/tst_circulartickmarklabel.qml
index 2d1841e0..60d7ff9e 100644
--- a/tests/auto/extras/data/tst_circulartickmarklabel.qml
+++ b/tests/auto/extras/data/tst_circulartickmarklabel.qml
@@ -314,6 +314,15 @@ TestCase {
compare(label.__panel.tickmarkValueFromMinorIndex(((label.tickmarkCount - 1) * label.minorTickmarkCount) - 1), 98);
}
+ function test_labelText() {
+ for (var i = 0; i < label.labelCount; ++i) {
+ var labelDelegateLoader = findChild(label, "labelDelegateLoader" + i);
+ verify(labelDelegateLoader);
+ compare(labelDelegateLoader.styleData.index, i);
+ compare(labelDelegateLoader.styleData.value, i * label.labelStepSize);
+ }
+ }
+
function test_invalidValues() {
// Shouldn't produce warnings.
label.labelStepSize = 0;