aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/templates
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-05-11 17:49:08 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-05-11 17:49:08 +0200
commit1fc2dfee7e0a0240d0823b5153be7491406518d9 (patch)
treeed3667e135bf16abe4001ef281903211faf4c6dd /src/imports/templates
parent52e578611c5d9dca43d967c833e23b7bbcb53079 (diff)
parent2d11f49ecd48fbf154cf5dc759526bf28fc732b7 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: .qmake.conf Change-Id: I5c6398e4146e62109bef231fe358b7ed69fa9488
Diffstat (limited to 'src/imports/templates')
-rw-r--r--src/imports/templates/qtquicktemplates2plugin.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/imports/templates/qtquicktemplates2plugin.cpp b/src/imports/templates/qtquicktemplates2plugin.cpp
index 2782fa9a..aac7e8b7 100644
--- a/src/imports/templates/qtquicktemplates2plugin.cpp
+++ b/src/imports/templates/qtquicktemplates2plugin.cpp
@@ -102,10 +102,12 @@ static inline void initResources()
#endif
}
+#if QT_CONFIG(shortcut)
// qtdeclarative/src/quick/util/qquickshortcut.cpp
typedef bool (*ShortcutContextMatcher)(QObject *, Qt::ShortcutContext);
extern ShortcutContextMatcher qt_quick_shortcut_context_matcher();
extern void qt_quick_set_shortcut_context_matcher(ShortcutContextMatcher matcher);
+#endif
QT_BEGIN_NAMESPACE
@@ -121,20 +123,26 @@ public:
void registerTypes(const char *uri);
private:
+#if QT_CONFIG(shortcut)
ShortcutContextMatcher originalContextMatcher;
+#endif
};
QtQuickTemplates2Plugin::QtQuickTemplates2Plugin(QObject *parent) : QQmlExtensionPlugin(parent)
{
initResources();
+#if QT_CONFIG(shortcut)
originalContextMatcher = qt_quick_shortcut_context_matcher();
qt_quick_set_shortcut_context_matcher(QQuickShortcutContext::matcher);
+#endif
}
QtQuickTemplates2Plugin::~QtQuickTemplates2Plugin()
{
+#if QT_CONFIG(shortcut)
qt_quick_set_shortcut_context_matcher(originalContextMatcher);
+#endif
}
void QtQuickTemplates2Plugin::registerTypes(const char *uri)