diff options
author | Kai Koehne <kai.koehne@digia.com> | 2012-11-19 12:41:33 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@digia.com> | 2012-11-26 14:14:35 +0100 |
commit | 536bea2d9e3a4e0bd6dd423c818bca46bd5b4d5b (patch) | |
tree | 9ee6da9165d392e5906b477f9e42d8d67d030fb5 /share | |
parent | f346eb40d43916c4f15d27cea9e61f418c1bcff0 (diff) | |
download | qt-creator-536bea2d9e3a4e0bd6dd423c818bca46bd5b4d5b.tar.gz |
QmlExtensionPlugin: Fix compilation with QtQuick1/Qt 5
Change-Id: Ib3899f8097c97114baeca0fe7c9b6ac4ba78dbde
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
Diffstat (limited to 'share')
-rw-r--r-- | share/qtcreator/templates/wizards/qml-extension/plugin.cpp | 4 | ||||
-rw-r--r-- | share/qtcreator/templates/wizards/qml-extension/plugin.h | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/share/qtcreator/templates/wizards/qml-extension/plugin.cpp b/share/qtcreator/templates/wizards/qml-extension/plugin.cpp index 3d92c31f19..62a9a94de0 100644 --- a/share/qtcreator/templates/wizards/qml-extension/plugin.cpp +++ b/share/qtcreator/templates/wizards/qml-extension/plugin.cpp @@ -9,4 +9,6 @@ void %ProjectName:s%Plugin::registerTypes(const char *uri) qmlRegisterType<%ObjectName%>(uri, 1, 0, "%ObjectName%"); } -Q_EXPORT_PLUGIN2(%ProjectName:s%, %ProjectName:s%Plugin) +#if QT_VERSION < 0x050000 + Q_EXPORT_PLUGIN2(%ProjectName:s%, %ProjectName:s%Plugin) +#endif diff --git a/share/qtcreator/templates/wizards/qml-extension/plugin.h b/share/qtcreator/templates/wizards/qml-extension/plugin.h index 8eaa62384a..d487a8339d 100644 --- a/share/qtcreator/templates/wizards/qml-extension/plugin.h +++ b/share/qtcreator/templates/wizards/qml-extension/plugin.h @@ -6,6 +6,9 @@ class %ProjectName:s%Plugin : public QDeclarativeExtensionPlugin { Q_OBJECT +#if QT_VERSION >= 0x050000 + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") +#endif public: void registerTypes(const char *uri); |