diff options
author | Mikhail Svetkin <mikhail.svetkin@qt.io> | 2019-01-22 14:53:09 +0100 |
---|---|---|
committer | Mikhail Svetkin <mikhail.svetkin@qt.io> | 2019-02-27 14:46:57 +0000 |
commit | 5c39d4fc01840128e70e6a240bb1a3a747c3119e (patch) | |
tree | c266f05eb12dd334ac8a86ab6bb19cca1cc6b840 /src/qmltest/quicktestevent.cpp | |
parent | f88ac9d7e35167a954881e5c81e1a4ce543f54ed (diff) |
qtlite: Fix build the source code with -no-feature-shortcut
Change-Id: I7b1b3fc60eb40e799c6622ea1d4ad14baa0fe269
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/qmltest/quicktestevent.cpp')
-rw-r--r-- | src/qmltest/quicktestevent.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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; } |