diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-11-23 11:43:38 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-01-07 15:29:16 +0000 |
commit | 919cc4ac1bd3528ec367a06f32c98b5f2934d0c6 (patch) | |
tree | 85fb60444062d6f2de4e1537bdc87f2007f0dfd8 | |
parent | 8da20ddef88cb48b7bb09ff7dc1db6517add8e72 (diff) | |
download | qtquickcontrols-919cc4ac1bd3528ec367a06f32c98b5f2934d0c6.tar.gz |
Fix tst_combobox
There was a bogus timer firing once after the test had been running 500 ms. The
timer was supposed to be used as a workaround on Mac, but since it had running
set to true, it was actually firing once on all platforms.
The timer was originally added in 6254af5. The test function ended up being
skipped on Mac, so the timer was actually pointless.
Task-number: QTBUG-64664
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit a749525164b771452599e67e277d2ea6b3866479)
Change-Id: Icebda05c872ba2de690e87bd0a9968670f203ce2
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
-rw-r--r-- | tests/auto/controls/data/tst_combobox.qml | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml index 632a1d15..d6a5f6c3 100644 --- a/tests/auto/controls/data/tst_combobox.qml +++ b/tests/auto/controls/data/tst_combobox.qml @@ -66,14 +66,6 @@ TestCase { property var model - Timer { - id: timer - running: true - repeat: false - interval: 500 - onTriggered: testCase.keyPress(Qt.Key_Escape) - } - function init() { model = Qt.createQmlObject("import QtQuick 2.2; ListModel {}", testCase, '') model.append({ text: "Banana", color: "Yellow" }) @@ -505,17 +497,13 @@ TestCase { var comboBox = Qt.createQmlObject('import QtQuick.Controls 1.2 ; ComboBox { model: 4 }', container, ''); comboBox.activeFocusOnPress = false verify(!comboBox.activeFocus) - if (Qt.platform.os === "osx") // on mac when the menu open, the __popup function does not return - timer.start() - else // two mouse clicks to open and close the popup menu - mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1) + // two mouse clicks to open and close the popup menu + mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1) mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1) verify(!comboBox.activeFocus) comboBox.activeFocusOnPress = true - if (Qt.platform.os === "osx") // on mac when the menu open, the __popup function does not return - timer.start() - else // two mouse clicks to open and close the popup menu - mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1) + // two mouse clicks to open and close the popup menu + mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1) mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1) verify(comboBox.activeFocus) comboBox.destroy() |