diff options
author | Mitch Curtis <mitch.curtis@qt.io> | 2018-06-05 16:08:22 +0200 |
---|---|---|
committer | Mitch Curtis <mitch.curtis@qt.io> | 2018-06-05 14:50:16 +0000 |
commit | 9a5f28de79eaeefcb91134cc124b7990c5c72fef (patch) | |
tree | 8297cb267a9641dac5ff01c92221dcc658999bbe /tests/auto | |
parent | 97969a14118b31ceb6a1403da2e133c4bf4e4780 (diff) |
tst_abstractbutton.qml: fix test_trigger()
bdb8cf49daf4a1c7dfb9bd9caf14e19e3aa66293 in qtdeclarative fixed
compliancy with the ES7 spec by correcting the order in which
properties were created/assigned. When the qt5 submodules were updated,
some rows of AbstractButton::test_trigger() started failing because
they were unknowingly relying on the incorrect ordering:
var control = createTemporaryObject(actionButton, testCase,
{"enabled": data.button, "action.enabled": data.action})
control.action.enabled was set first, and then control.enabled was set.
The Action's enabled property can affect the value of Control's enabled
property: Control's enabled property is always used if
explicitly specified, but if it's not explicitly specified, it is set
to the value of Action's enabled property. The motivation for this
behavior is explained in 146bc9517c56feda4eba34282d3cc53bd47b6267:
"The idea is that you share a generic Action in different places in
the UI, and then you override things locally in specific controls."
This patch restores the test's previous behavior by swapping
the order of the properties so that control.enabled is assigned last.
Task-number: QTBUG-68665
Change-Id: I6082c57a8fdbf7f7251dacbb55289fa996393a6e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/controls/data/tst_abstractbutton.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/controls/data/tst_abstractbutton.qml b/tests/auto/controls/data/tst_abstractbutton.qml index d611a45a..1ed5e45d 100644 --- a/tests/auto/controls/data/tst_abstractbutton.qml +++ b/tests/auto/controls/data/tst_abstractbutton.qml @@ -744,7 +744,7 @@ TestCase { } function test_trigger(data) { - var control = createTemporaryObject(actionButton, testCase, {"enabled": data.button, "action.enabled": data.action}) + var control = createTemporaryObject(actionButton, testCase, {"action.enabled": data.action, "enabled": data.button}) verify(control) compare(control.enabled, data.button) |