aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-11-04 16:45:17 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2016-11-09 11:43:52 +0000
commitd6e03b3837f369e9fc94915ef3ad649903845382 (patch)
treef149ae27a60495e2bb5952c01a4cc92a2998828a /tests/auto
parent372c5b44e5bc2730c3557cf56bffc5496ab020f3 (diff)
QQuickComboBox: ensure a parent for delegates
This allows us to replace the "width: control.popup.width" expressions with "width: parent.width" to avoid explicit references to the popup. Next, we are ready to defer the execution of the popup until it becomes visible or is accessed by the user. Without the parent item fix, ComboBox throws an error: ComboBox.qml:58: TypeError: Cannot read property of null ...and tst_snippets fails => tested implicitly. :) Change-Id: Ib9cfcf7558addbe3403d835d3ae11b6c11c2f0cb Reviewed-by: J-P Nurmi <jpnurmi@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/controls/data/tst_combobox.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml
index 777b98f0..159ccebb 100644
--- a/tests/auto/controls/data/tst_combobox.qml
+++ b/tests/auto/controls/data/tst_combobox.qml
@@ -65,7 +65,7 @@ TestCase {
id: emptyBox
ComboBox {
delegate: ItemDelegate {
- width: popup.width
+ width: parent.width
}
}
}