summaryrefslogtreecommitdiff
path: root/tests/auto/controls
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/controls')
-rw-r--r--tests/auto/controls/data/tst_button.qml22
-rw-r--r--tests/auto/controls/data/tst_combobox.qml5
2 files changed, 25 insertions, 2 deletions
diff --git a/tests/auto/controls/data/tst_button.qml b/tests/auto/controls/data/tst_button.qml
index 136f82cc..0d226ffc 100644
--- a/tests/auto/controls/data/tst_button.qml
+++ b/tests/auto/controls/data/tst_button.qml
@@ -40,6 +40,7 @@
import QtQuick 2.2
import QtTest 1.0
+import QtQuick.Controls 1.4
import QtQuickControlsTests 1.0
Item {
@@ -278,5 +279,26 @@ TestCase {
button.destroy()
}
+
+ Component {
+ id: mnemonicButtonComponent
+
+ Button {
+ text: "&Hi"
+ enabled: false
+ }
+ }
+
+ function test_mnemonic() {
+ var button = mnemonicButtonComponent.createObject(container);
+ verify(button);
+
+ clickSpy.clear();
+ clickSpy.target = button;
+ keyClick(Qt.Key_H, Qt.AltModifier);
+ compare(clickSpy.count, 0);
+
+ button.destroy();
+ }
}
}
diff --git a/tests/auto/controls/data/tst_combobox.qml b/tests/auto/controls/data/tst_combobox.qml
index af1fc9dd..da8c79f8 100644
--- a/tests/auto/controls/data/tst_combobox.qml
+++ b/tests/auto/controls/data/tst_combobox.qml
@@ -74,6 +74,7 @@ TestCase {
function cleanup() {
if (model !== 0)
model.destroy()
+ wait(0) // spin the event loop to get all popups to close
}
function test_keyupdown() {
@@ -523,7 +524,7 @@ TestCase {
verify(comboBox.data[menuIndex].__popupVisible)
// close the menu before destroying the combobox
- comboBox.data[menuIndex].__closeMenu()
+ comboBox.data[menuIndex].__closeAndDestroy()
verify(!comboBox.data[menuIndex].__popupVisible)
comboBox.destroy()
@@ -549,7 +550,7 @@ TestCase {
verify(comboBox.data[menuIndex].items[i].checked)
}
// close the menu before destroying the combobox
- comboBox.data[menuIndex].__closeMenu()
+ comboBox.data[menuIndex].__closeAndDestroy()
verify(!comboBox.data[menuIndex].__popupVisible)
comboBox.destroy()
}