diff options
author | Stephan Binner <stephan.binner@basyskom.com> | 2017-05-06 12:19:22 +0200 |
---|---|---|
committer | Stephan Binner <stephan.binner@basyskom.com> | 2017-05-06 10:38:20 +0000 |
commit | 6276b14a7378abe92f0d30aafcc86bee2375b84e (patch) | |
tree | f67e6caceb09387078b4b62e3ce9292177dca41a /src/imports/templates | |
parent | 932d5f78296e604c57c8ebcfe5c94f5ce62238f4 (diff) |
Fix unresolved external symbols for -no-feature-shortcut
Change-Id: I3ddef9df6100b8837d1bdc81f3fd1dc7cf37babf
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/imports/templates')
-rw-r--r-- | src/imports/templates/qtquicktemplates2plugin.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/imports/templates/qtquicktemplates2plugin.cpp b/src/imports/templates/qtquicktemplates2plugin.cpp index dd79ac5b..e7cb8540 100644 --- a/src/imports/templates/qtquicktemplates2plugin.cpp +++ b/src/imports/templates/qtquicktemplates2plugin.cpp @@ -99,10 +99,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 @@ -118,20 +120,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) |