summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-10-14 19:51:45 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-10-14 19:51:45 +0200
commit30f369d4ed043205f4811bab5d813d97e1d448a9 (patch)
tree7478d6fe10b84f61697364589bc8ae0e3f089552 /tests
parente8d4677e309e11cc5177bc10d9d01aa200407cee (diff)
parentd7f3ab35deeed07404990591d232b559ac960c61 (diff)
downloadqtquickcontrols-30f369d4ed043205f4811bab5d813d97e1d448a9.tar.gz
Merge remote-tracking branch 'origin/5.6' into dev
Change-Id: I27600aa69f6c236229f80f7d4a278f5ab9640f6b
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/controls/data/tst_button.qml22
-rw-r--r--tests/auto/controls/data/tst_combobox.qml5
-rw-r--r--tests/auto/extras/data/tst_tumbler.qml9
-rw-r--r--tests/auto/extras/extras.pro1
4 files changed, 34 insertions, 3 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()
}
diff --git a/tests/auto/extras/data/tst_tumbler.qml b/tests/auto/extras/data/tst_tumbler.qml
index bc97f35d..9f3ecc2f 100644
--- a/tests/auto/extras/data/tst_tumbler.qml
+++ b/tests/auto/extras/data/tst_tumbler.qml
@@ -175,6 +175,9 @@ Item {
}
function test_keyboardNavigation() {
+ if (Qt.platform.os === "osx")
+ skip("OS X doesn't allow tab focus for certain controls by default");
+
var column = simpleColumn.createObject(tumbler);
compare(tumbler.addColumn(column), column);
column = simpleColumn.createObject(tumbler);
@@ -244,6 +247,9 @@ Item {
}
function test_itemsCorrectlyPositioned() {
+ if (Qt.platform.os === "osx")
+ skip("OS X doesn't allow tab focus for certain controls by default");
+
// TODO: rewrite this test so that it tests supported usecases.
// Somehow it works with the Base style. It could be rewritten to use an
// equal amount of items for the model and visibleItemCount, judging from
@@ -346,6 +352,9 @@ Item {
}
function test_focusPastLastColumn() {
+ if (Qt.platform.os === "osx")
+ skip("OS X doesn't allow tab focus for certain controls by default");
+
var column = dayOfMonthColumn.createObject(tumbler);
compare(tumbler.addColumn(column), column);
column = yearColumn.createObject(tumbler);
diff --git a/tests/auto/extras/extras.pro b/tests/auto/extras/extras.pro
index 66ca9573..9845519d 100644
--- a/tests/auto/extras/extras.pro
+++ b/tests/auto/extras/extras.pro
@@ -2,7 +2,6 @@ TEMPLATE = app
TARGET = tst_extras
CONFIG += qmltestcase console
-CONFIG += insignificant_test # requires qtgraphicaleffects (QTBUG-35112)
SOURCES += $$PWD/tst_extras.cpp