5#include <QtQml/qqmlextensionplugin.h>
6#include <QtQml/private/qqmlglobal_p.h>
7#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h>
10#include <QtQuickTemplates2/private/qquickshortcutcontext_p_p.h>
15typedef bool (*ShortcutContextMatcher)(QObject *, Qt::ShortcutContext);
16extern ShortcutContextMatcher qt_quick_shortcut_context_matcher();
17extern void qt_quick_set_shortcut_context_matcher(ShortcutContextMatcher matcher);
26 Q_PLUGIN_METADATA(IID QQmlExtensionInterface_iid)
36#if QT_CONFIG(shortcut)
42 : QQmlExtensionPlugin(parent)
44 volatile auto registration = &qml_register_types_QtQuick_Templates;
45 volatile auto initialization = &QQuickTemplates_initializeModule;
47 Q_UNUSED(registration)
48 Q_UNUSED(initialization)
59#if QT_CONFIG(shortcut)
60 originalContextMatcher = qt_quick_shortcut_context_matcher();
61 qt_quick_set_shortcut_context_matcher(QQuickShortcutContext::matcher);
67#if QT_CONFIG(shortcut)
68 qt_quick_set_shortcut_context_matcher(originalContextMatcher);
74#include "qtquicktemplates2plugin.moc"
void registerTypes(const char *uri) override
Registers the QML types in the given uri.
void unregisterTypes() override
~QtQuickTemplates2Plugin()
Q_GHS_KEEP_REFERENCE(QQuickTemplates_initializeModule)
Q_GHS_KEEP_REFERENCE(qml_register_types_QtQuick_Templates)