diff options
author | Filippo Cucchetto <filippocucchetto@gmail.com> | 2015-12-05 08:58:01 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-12-07 13:41:34 +0000 |
commit | 12f699a0a66055b70acfcc4f6c957cebf19f4504 (patch) | |
tree | 540acceac6fef55a6dcdb18766c98f8a040e699a /tests | |
parent | a3ba1a532f92a933141d4671ce644053a0cb6fea (diff) | |
download | qtquickcontrols-12f699a0a66055b70acfcc4f6c957cebf19f4504.tar.gz |
Fixed missing close of the ComboBox when clicking on it
The mouse event that dismissed a popup window should
not dispatched to the visual item. Otherwise the
menu open again.
Task-number: QTBUG-44532
Change-Id: Id8aca1634e4f1795e546230953bff49518589714
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/controls/data/tst_combobox.qml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml index cecc3928..7db9a75e 100644 --- a/tests/auto/controls/data/tst_combobox.qml +++ b/tests/auto/controls/data/tst_combobox.qml @@ -774,5 +774,19 @@ TestCase { compare(comboBox.currentText, "Pomegranate") comboBox.destroy() } + + function test_qtBug44532() { + if (Qt.platform.os === "osx") + skip("When the menu pops up on OS X, it does not return and the test fails after time out") + var comboBox = Qt.createQmlObject('import QtQuick.Controls 1.2 ; ComboBox { model: ["A", "BB", "CCCCC"] }', container, '') + var popup = comboBox.__popup + verify(popup) + tryCompare(popup, "__popupVisible", false) + mouseClick(comboBox) + tryCompare(popup, "__popupVisible", true) + mouseClick(comboBox) + tryCompare(popup, "__popupVisible", false) + comboBox.destroy() + } } } |