summaryrefslogtreecommitdiff
path: root/src/controls/ProgressBar.qml
diff options
context:
space:
mode:
authorCaroline Chao <caroline.chao@digia.com>2013-03-07 14:56:28 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-07 18:33:00 +0100
commit8c142768e42c450c14225b1d9354836aec0b0126 (patch)
tree838ffe8cd818b51738e8a896a3a2bcf21bde44b3 /src/controls/ProgressBar.qml
parent506287b9cf147e3457b19c9060c60c46ab1df4ac (diff)
downloadqtquickcontrols-8c142768e42c450c14225b1d9354836aec0b0126.tar.gz
Tests: Fix initialization value of ProgressBar
The initialization order should not matter when setting the properties. Change-Id: I012facbbe4d0b005ee55314034d12d552fcafbf2 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/controls/ProgressBar.qml')
-rw-r--r--src/controls/ProgressBar.qml9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/controls/ProgressBar.qml b/src/controls/ProgressBar.qml
index 444ca723..1f4e6bf3 100644
--- a/src/controls/ProgressBar.qml
+++ b/src/controls/ProgressBar.qml
@@ -99,13 +99,18 @@ Control {
style: Qt.createComponent(Settings.THEME_PATH + "/ProgressBarStyle.qml", progressbar)
/*! \internal */
+ property bool __initialized: false
+ /*! \internal */
onMaximumValueChanged: setValue(value)
/*! \internal */
onMinimumValueChanged: setValue(value)
/*! \internal */
- Component.onCompleted: setValue(value)
+ onValueChanged: if (__initialized) setValue(value)
/*! \internal */
- onValueChanged: setValue(value)
+ Component.onCompleted: {
+ __initialized = true;
+ setValue(value)
+ }
Accessible.role: Accessible.ProgressBar
Accessible.name: value