aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-03-13 01:01:04 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-03-13 10:10:09 +0100
commit76be4abbbcfb2fbb14ce532413e0895198e7f0f1 (patch)
tree5d6ca9c4425df15a93b6f74dc8e4dbb38db74d91 /src/qmltest
parent587d789fa5929f462b5744ba33a25db6c77b36fc (diff)
parent70d726e91e4ef27002b2271805de19077e25809c (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts: src/qml/compiler/qv4codegen.cpp src/qml/animations/qsequentialanimationgroupjob.cpp Change-Id: I8b76e509fd7c8599d4cef25181d790ee28edab54
Diffstat (limited to 'src/qmltest')
-rw-r--r--src/qmltest/doc/src/qtquicktest-index.qdoc2
-rw-r--r--src/qmltest/quicktestevent.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/qmltest/doc/src/qtquicktest-index.qdoc b/src/qmltest/doc/src/qtquicktest-index.qdoc
index 283e88e2e4..4c0124689b 100644
--- a/src/qmltest/doc/src/qtquicktest-index.qdoc
+++ b/src/qmltest/doc/src/qtquicktest-index.qdoc
@@ -141,7 +141,7 @@
\l QUICK_TEST_MAIN_WITH_SETUP macro can be used. This can be useful for
setting context properties on the QML engine, amongst other things.
- The macro is identical to \l QUICK_TEST_MAIN, except that it takes an
+ The macro is identical to \c QUICK_TEST_MAIN, except that it takes an
additional \c QObject* argument. The test framework will call slots and
invokable functions with the following names:
diff --git a/src/qmltest/quicktestevent.cpp b/src/qmltest/quicktestevent.cpp
index 480811d95c..5b07220c29 100644
--- a/src/qmltest/quicktestevent.cpp
+++ b/src/qmltest/quicktestevent.cpp
@@ -121,6 +121,7 @@ bool QuickTestEvent::keyClickChar(const QString &character, int modifiers, int d
return true;
}
+#if QT_CONFIG(shortcut)
// valueToKeySequence() is copied from qquickshortcut.cpp
static QKeySequence valueToKeySequence(const QVariant &value)
{
@@ -128,13 +129,16 @@ static QKeySequence valueToKeySequence(const QVariant &value)
return QKeySequence(static_cast<QKeySequence::StandardKey>(value.toInt()));
return QKeySequence::fromString(value.toString());
}
+#endif
bool QuickTestEvent::keySequence(const QVariant &keySequence)
{
QWindow *window = activeWindow();
if (!window)
return false;
+#if QT_CONFIG(shortcut)
QTest::keySequence(window, valueToKeySequence(keySequence));
+#endif
return true;
}