aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qmltest
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-12-20 08:32:22 +0100
committerLiang Qi <liang.qi@qt.io>2017-12-20 08:50:58 +0100
commit9a38fdcf8f9b734808bb54422e306872f3bfa944 (patch)
tree20fd361db6c505d99a40ab7a695511b97dcdcbd3 /tests/auto/qmltest
parent1db9405128972d5ba77e33181bee40356f718cea (diff)
parent4fff2bb14e55484eacec0a1b49a2b02958f75eca (diff)
Merge remote-tracking branch 'origin/5.10' into dev
Conflicts: tests/auto/quick/pointerhandlers/flickableinterop/data/FlashAnimation.qml tests/auto/quick/pointerhandlers/flickableinterop/data/Slider.qml tests/auto/quick/pointerhandlers/flickableinterop/data/TapHandlerButton.qml tests/auto/quick/pointerhandlers/flickableinterop/data/flickableWithHandlers.qml tests/auto/quick/pointerhandlers/multipointtoucharea_interop/data/pinchDragMPTA.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/DragAnywhereSlider.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/FlashAnimation.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/Slider.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/draggables.qml tests/auto/quick/pointerhandlers/qquickdraghandler/data/multipleSliders.qml tests/auto/quick/pointerhandlers/qquicktaphandler/data/Button.qml tests/auto/quick/pointerhandlers/qquicktaphandler/data/FlashAnimation.qml tests/auto/quick/pointerhandlers/qquicktaphandler/data/buttons.qml tests/manual/pointer/content/FakeFlickable.qml tests/manual/pointer/content/FlashAnimation.qml tests/manual/pointer/content/MomentumAnimation.qml tests/manual/pointer/content/MouseAreaButton.qml tests/manual/pointer/content/MouseAreaSlider.qml tests/manual/pointer/content/MptaButton.qml tests/manual/pointer/content/MultiButton.qml tests/manual/pointer/content/ScrollBar.qml tests/manual/pointer/content/Slider.qml tests/manual/pointer/content/TapHandlerButton.qml tests/manual/pointer/fakeFlickable.qml tests/manual/pointer/flickableWithHandlers.qml tests/manual/pointer/flingAnimation.qml tests/manual/pointer/joystick.qml tests/manual/pointer/main.cpp tests/manual/pointer/main.qml tests/manual/pointer/map.qml tests/manual/pointer/map2.qml tests/manual/pointer/mixer.qml tests/manual/pointer/multibuttons.qml tests/manual/pointer/photosurface.qml tests/manual/pointer/pinchDragFlingMPTA.qml tests/manual/pointer/pinchHandler.qml tests/manual/pointer/singlePointHandlerProperties.qml tests/manual/pointer/tapHandler.qml tests/manual/pointer/tapWithModifiers.qml tests/manual/shapestest/main.cpp Change-Id: I4f233a521305fab1ebfecbac801da192434ed524
Diffstat (limited to 'tests/auto/qmltest')
-rw-r--r--tests/auto/qmltest/qmltest.pro1
-rw-r--r--tests/auto/qmltest/shortcut/shortcut.pro1
-rw-r--r--tests/auto/qmltest/shortcut/tst_shortcut.qml58
3 files changed, 60 insertions, 0 deletions
diff --git a/tests/auto/qmltest/qmltest.pro b/tests/auto/qmltest/qmltest.pro
index 8ad1541cbc..45f240e1d1 100644
--- a/tests/auto/qmltest/qmltest.pro
+++ b/tests/auto/qmltest/qmltest.pro
@@ -22,6 +22,7 @@ SUBDIRS += \
rectangle \
selftests \
shadersource \
+ shortcut \
stability \
statemachine \
text \
diff --git a/tests/auto/qmltest/shortcut/shortcut.pro b/tests/auto/qmltest/shortcut/shortcut.pro
new file mode 100644
index 0000000000..a7938e7003
--- /dev/null
+++ b/tests/auto/qmltest/shortcut/shortcut.pro
@@ -0,0 +1 @@
+CONFIG += qmltestcase
diff --git a/tests/auto/qmltest/shortcut/tst_shortcut.qml b/tests/auto/qmltest/shortcut/tst_shortcut.qml
new file mode 100644
index 0000000000..bc433761e2
--- /dev/null
+++ b/tests/auto/qmltest/shortcut/tst_shortcut.qml
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.8
+import QtQuick.Window 2.2
+import QtTest 1.2
+
+TestCase {
+ name: "ShortCut"
+ when: windowShown
+
+ Shortcut {
+ id: shortcut
+ property bool everActivated: false
+ sequence: StandardKey.NextChild
+ onActivated: everActivated = true
+ }
+
+ Shortcut {
+ id: shortcut2
+ property bool everActivated: false
+ sequence: "Ctrl+E,Ctrl+W"
+ onActivated: everActivated = true
+ }
+
+ function test_shortcut() {
+ keySequence(StandardKey.NextChild)
+ verify(shortcut.everActivated);
+
+ keySequence("Ctrl+E,Ctrl+W")
+ verify(shortcut2.everActivated);
+ }
+}