aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltest
diff options
context:
space:
mode:
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;
}