summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-11-23 11:43:38 +0100
committerAntti Kokko <antti.kokko@qt.io>2017-11-23 13:51:54 +0000
commita749525164b771452599e67e277d2ea6b3866479 (patch)
tree720639e45c2134a2be7ab7aa5a9d97034028eaf0
parent27098b2798d10e836e871ae9e6910c85b14a5a31 (diff)
downloadqtquickcontrols-5.10.0-rc1.tar.gz
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 Change-Id: I5b4803ba49db0ab7e1b4dd632a34d51af59bbf91 Reviewed-by: Liang Qi <liang.qi@qt.io>
-rw-r--r--tests/auto/controls/data/tst_combobox.qml24
1 files changed, 5 insertions, 19 deletions
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml
index ce8b6c42..c380c63a 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,20 +497,14 @@ 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 macOS when the menu open, the __popup function does not return
- timer.start()
- } else {
- // two mouse clicks to open and close the popup menu. The 1ms delay between mouse presses is
- // needed with software quick renderer. Without the delay, this test is flaky.
- mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1, Qt.LeftButton, Qt.NoModifier, 1)
- }
+ // two mouse clicks to open and close the popup menu. The 1ms delay between mouse presses is
+ // needed with software quick renderer. Without the delay, this test is flaky.
+ mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1, Qt.LeftButton, Qt.NoModifier, 1)
mouseClick(comboBox, comboBox.x + 1, comboBox.y + 1)
verify(comboBox.activeFocus)
comboBox.destroy()