diff options
author | Christian Stenger <christian.stenger@digia.com> | 2013-01-17 09:17:58 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-24 09:00:30 +0100 |
commit | 1cdbd299884a2978a76d5d4bd4fccf4d64b1d708 (patch) | |
tree | 3570abff1aaf9e63eb016bc877c90db23be7172e | |
parent | 8a4829ef1559787726b576a210dfd0c86b91b249 (diff) |
Remove outdated macro usage
Change-Id: I4b58f3d74d7dec9a95a07b907c500990630e7762
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
6 files changed, 7 insertions, 11 deletions
diff --git a/examples/quick/tutorials/gettingStartedQml/parts/part5/filedialog/dialogPlugin.cpp b/examples/quick/tutorials/gettingStartedQml/parts/part5/filedialog/dialogPlugin.cpp index d71e622b33..79b890c097 100644 --- a/examples/quick/tutorials/gettingStartedQml/parts/part5/filedialog/dialogPlugin.cpp +++ b/examples/quick/tutorials/gettingStartedQml/parts/part5/filedialog/dialogPlugin.cpp @@ -52,6 +52,3 @@ void DialogPlugin::registerTypes(const char *uri){ //qRegisterMetaType<QQmlListProperty<QString> > ("QQmlListProperty<QString>"); } - -//FileDialog is the plugin name (same as the TARGET in the project file) and DialogPlugin is the plugin classs -Q_EXPORT_PLUGIN2(FileDialog, DialogPlugin); diff --git a/examples/quick/tutorials/gettingStartedQml/parts/part5/filedialog/dialogPlugin.h b/examples/quick/tutorials/gettingStartedQml/parts/part5/filedialog/dialogPlugin.h index 82035193c8..6776f91e2b 100644 --- a/examples/quick/tutorials/gettingStartedQml/parts/part5/filedialog/dialogPlugin.h +++ b/examples/quick/tutorials/gettingStartedQml/parts/part5/filedialog/dialogPlugin.h @@ -46,7 +46,7 @@ class DialogPlugin : public QQmlExtensionPlugin { Q_OBJECT - + Q_PLUGIN_METADATA(IID "org.qt-project.QmlExtensionPlugin.FileDialog") public: //registerTypes is inherited from QQmlExtensionPlugin void registerTypes(const char *uri); diff --git a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp index 9b9503c937..6cc9189520 100644 --- a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp +++ b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.cpp @@ -145,6 +145,4 @@ void QmlOstPlugin::readyRead() d->debugServer->receiveMessage(content); } -Q_EXPORT_PLUGIN2(qmlostplugin, QmlOstPlugin) - QT_END_NAMESPACE diff --git a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h index 2a1031869f..15cd2af81d 100644 --- a/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h +++ b/src/plugins/qmltooling/qmldbg_ost/qmlostplugin.h @@ -53,6 +53,7 @@ class QmlOstPluginPrivate; class QmlOstPlugin : public QObject, public QQmlDebugServerConnection { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qml.QmlOstPlugin") Q_DECLARE_PRIVATE(QmlOstPlugin) Q_DISABLE_COPY(QmlOstPlugin) Q_INTERFACES(QQmlDebugServerConnection) diff --git a/src/qml/qml/qqmlextensionplugin.cpp b/src/qml/qml/qqmlextensionplugin.cpp index 9f2272a04e..291292fbbe 100644 --- a/src/qml/qml/qqmlextensionplugin.cpp +++ b/src/qml/qml/qqmlextensionplugin.cpp @@ -58,8 +58,8 @@ QT_BEGIN_NAMESPACE To write a QML extension plugin: \list - \li Subclass QQmlExtensionPlugin, implement registerTypes() method - to register types using qmlRegisterType(), and export the class using the Q_EXPORT_PLUGIN2() macro + \li Subclass QQmlExtensionPlugin, implement registerTypes() method to register types + using qmlRegisterType(), and export the class using the Q_PLUGIN_METADATA() macro \li Write an appropriate project file for the plugin \li Create a \l{Module Definition qmldir Files}{qmldir file} to describe the plugin \endlist @@ -140,7 +140,7 @@ QT_BEGIN_NAMESPACE Constructs a QML extension plugin with the given \a parent. Note that this constructor is invoked automatically by the - Q_EXPORT_PLUGIN2() macro, so there is no need for calling it + Q_PLUGIN_METADATA() macro, so there is no need for calling it explicitly. */ QQmlExtensionPlugin::QQmlExtensionPlugin(QObject *parent) diff --git a/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc b/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc index d9bfee2638..8fd24b00ec 100644 --- a/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc +++ b/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc @@ -178,6 +178,8 @@ created directly as elements within QML: \code class MyModelPlugin : public QQmlExtensionPlugin { + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.QmlExtension.MyModel" FILE "mymodel.json") public: void registerTypes(const char *uri) { @@ -185,8 +187,6 @@ public: "MyModel"); } } - -Q_EXPORT_PLUGIN2(mymodelplugin, MyModelPlugin); \endcode \li |