diff options
author | Joni Poikelin <joni.poikelin@theqtcompany.com> | 2016-03-10 08:28:35 +0200 |
---|---|---|
committer | Joni Poikelin <joni.poikelin@qt.io> | 2016-08-30 07:09:34 +0000 |
commit | 846d04cec8d946c28ddbeecc79c63553e0891736 (patch) | |
tree | 8440f18668a95bf8385f8e196a6249424a6b829f /tests/auto/controls/data/tst_rangemodel.qml | |
parent | 69b3136bae16897492d27558c5909cd61a5e598e (diff) | |
download | qtquickcontrols-846d04cec8d946c28ddbeecc79c63553e0891736.tar.gz |
RangeModel: Emit min/max and value changes after component is complete
Prevent extra value changed signal to be fired in case when Slider with
minimum > 0 and value > minimum are set.
Change-Id: I86824c403a7c0296f782d2eec7ed30acfc13b304
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests/auto/controls/data/tst_rangemodel.qml')
-rw-r--r-- | tests/auto/controls/data/tst_rangemodel.qml | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/controls/data/tst_rangemodel.qml b/tests/auto/controls/data/tst_rangemodel.qml index db3aceb7..6d95f279 100644 --- a/tests/auto/controls/data/tst_rangemodel.qml +++ b/tests/auto/controls/data/tst_rangemodel.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. +** Copyright (C) 2016 The Qt Company Ltd. ** Contact: http://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -68,6 +68,14 @@ TestCase { spy.clear() } + function test_delayedinit() { + var component = Qt.createComponent("rangemodel/init.qml"); + compare(component.status, Component.Ready) + var r = component.createObject(testCase, {minimumValue: 40, maximumValue: 90, value: 80}); + compare(r.value, 80) + compare(r.spy.count, 1) + } + function test_setminimumvalue() { spy.signalName = "minimumChanged" compare(spy.count, 0) |