From fb3889a423365b1736cae8850cdb2b3ac77b14a8 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 21 Feb 2012 10:55:34 +0100 Subject: [PATCH] Use new plugin system in QtDeclarative. - Use prefix "org.qt-project" for interfaces. - Use new macros, add json files. Change-Id: I53df83f95153c5c9c462098584606284470a5ae0 Reviewed-by: Martin Jones --- .../declarative/cppextensions/imageprovider/imageprovider.cpp | 6 ++++-- .../declarative/cppextensions/imageprovider/imageprovider.json | 1 + .../declarative/cppextensions/imageprovider/imageprovider.pro | 2 ++ examples/declarative/cppextensions/plugins/plugin.cpp | 6 ++---- examples/declarative/cppextensions/plugins/plugin.json | 1 + examples/declarative/cppextensions/plugins/plugins.pro | 2 ++ examples/declarative/cppextensions/qwidgets/qwidgets.json | 1 + .../painteditem/textballoons/TextBalloonPlugin/plugin.h | 3 +-- .../painteditem/textballoons/TextBalloonPlugin/textballoon.json | 1 + examples/declarative/painteditem/textballoons/textballoons.pro | 2 ++ .../tutorials/extending/chapter6-plugins/chartsplugin.cpp | 1 - .../tutorials/extending/chapter6-plugins/chartsplugin.h | 2 ++ .../tutorials/extending/chapter6-plugins/chartsplugin.json | 1 + examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.cpp | 3 --- examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h | 1 + examples/tutorials/gettingStartedQml/filedialog/dialogplugin.json | 1 + src/declarative/debugger/qdeclarativedebugserverconnection_p.h | 4 +++- src/declarative/debugger/qdeclarativeinspectorinterface_p.h | 4 +++- src/declarative/qml/qdeclarativeextensioninterface.h | 7 ++++++- src/declarative/qml/qdeclarativepropertyvalueinterceptor_p.h | 5 ++++- src/declarative/qml/qdeclarativepropertyvaluesource.h | 5 ++++- src/imports/folderlistmodel/folderlistmodel.json | 1 + src/imports/folderlistmodel/plugin.cpp | 7 ++----- src/imports/gestures/gestures.json | 1 + src/imports/localstorage/localstorage.json | 1 + src/imports/localstorage/localstorage.pro | 4 +++- src/imports/localstorage/plugin.cpp | 4 ++-- src/imports/shaders/shaders.json | 1 + src/imports/testlib/main.cpp | 4 ++-- src/imports/testlib/testlib.json | 1 + src/imports/testlib/testlib.pro | 3 ++- src/imports/xmllistmodel/plugin.cpp | 4 ++-- src/imports/xmllistmodel/xmllistmodel.json | 1 + src/plugins/accessible/quick/accessible.json | 3 +++ src/plugins/accessible/quick/main.cpp | 8 +++++--- src/plugins/accessible/quick/quick.pro | 2 ++ src/plugins/qmltooling/qmldbg_qtquick2/qmldbg_qtquick2.pro | 2 ++ src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.cpp | 2 -- src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.h | 1 + src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.json | 2 ++ src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro | 2 ++ src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp | 2 -- src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h | 2 +- src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.json | 1 + src/quick/items/qquickvisualadaptormodel_p.h | 4 +++- src/quick/scenegraph/qsgcontextplugin_p.h | 2 +- tests/auto/declarative/qdeclarativelanguage/testtypes.h | 3 ++- tests/auto/declarative/qdeclarativemoduleplugin/empty.json | 1 + .../declarative/qdeclarativemoduleplugin/plugin.2.1/plugin.cpp | 4 ++-- .../auto/declarative/qdeclarativemoduleplugin/plugin.2/plugin.cpp | 4 ++-- tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp | 4 ++-- .../declarative/qdeclarativemoduleplugin/pluginMixed/plugin.cpp | 4 ++-- .../declarative/qdeclarativemoduleplugin/pluginVersion/plugin.cpp | 4 ++-- .../qdeclarativemoduleplugin/pluginWithQmlFile/plugin.cpp | 4 ++-- .../qdeclarativemoduleplugin/pluginWrongCase/plugin.cpp | 4 ++-- 55 files changed, 101 insertions(+), 55 deletions(-) create mode 100644 examples/declarative/cppextensions/imageprovider/imageprovider.json create mode 100644 examples/declarative/cppextensions/plugins/plugin.json create mode 100644 examples/declarative/cppextensions/qwidgets/qwidgets.json create mode 100644 examples/declarative/painteditem/textballoons/TextBalloonPlugin/textballoon.json create mode 100644 examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.json create mode 100644 examples/tutorials/gettingStartedQml/filedialog/dialogplugin.json create mode 100644 src/imports/folderlistmodel/folderlistmodel.json create mode 100644 src/imports/gestures/gestures.json create mode 100644 src/imports/localstorage/localstorage.json create mode 100644 src/imports/shaders/shaders.json create mode 100644 src/imports/testlib/testlib.json create mode 100644 src/imports/xmllistmodel/xmllistmodel.json create mode 100644 src/plugins/accessible/quick/accessible.json create mode 100644 src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.json create mode 100644 src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.json create mode 100644 tests/auto/declarative/qdeclarativemoduleplugin/empty.json diff --git a/examples/declarative/cppextensions/imageprovider/imageprovider.cpp b/examples/declarative/cppextensions/imageprovider/imageprovider.cpp index 94f8575..7fe4b72 100644 --- a/examples/declarative/cppextensions/imageprovider/imageprovider.cpp +++ b/examples/declarative/cppextensions/imageprovider/imageprovider.cpp @@ -87,6 +87,7 @@ public: class ImageProviderExtensionPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "imageprovider.json") public: void registerTypes(const char *uri) { @@ -101,7 +102,8 @@ public: }; -#include "imageprovider.moc" -Q_EXPORT_PLUGIN(ImageProviderExtensionPlugin); +#define QDeclarativeExtensionInterface_iid "org.qt-project.Qt.QDeclarativeExtensionInterface" + +#include "imageprovider.moc" diff --git a/examples/declarative/cppextensions/imageprovider/imageprovider.json b/examples/declarative/cppextensions/imageprovider/imageprovider.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/examples/declarative/cppextensions/imageprovider/imageprovider.json @@ -0,0 +1 @@ +{} diff --git a/examples/declarative/cppextensions/imageprovider/imageprovider.pro b/examples/declarative/cppextensions/imageprovider/imageprovider.pro index cfa7923..dd128d5 100644 --- a/examples/declarative/cppextensions/imageprovider/imageprovider.pro +++ b/examples/declarative/cppextensions/imageprovider/imageprovider.pro @@ -7,6 +7,8 @@ TARGET = qmlimageproviderplugin SOURCES += imageprovider.cpp +OTHER_FILES += imageprovider.json + sources.files = $$SOURCES imageprovider.qml imageprovider.pro sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/imageprovider diff --git a/examples/declarative/cppextensions/plugins/plugin.cpp b/examples/declarative/cppextensions/plugins/plugin.cpp index 6fbf962..4ba0a92 100644 --- a/examples/declarative/cppextensions/plugins/plugin.cpp +++ b/examples/declarative/cppextensions/plugins/plugin.cpp @@ -141,6 +141,8 @@ MinuteTimer *TimeModel::timer=0; class QExampleQmlPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "plugin.json") + public: void registerTypes(const char *uri) { @@ -151,7 +153,3 @@ public: //![plugin] #include "plugin.moc" - -//![export] -Q_EXPORT_PLUGIN2(qmlqtimeexampleplugin, QExampleQmlPlugin); -//![export] diff --git a/examples/declarative/cppextensions/plugins/plugin.json b/examples/declarative/cppextensions/plugins/plugin.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/examples/declarative/cppextensions/plugins/plugin.json @@ -0,0 +1 @@ +{} diff --git a/examples/declarative/cppextensions/plugins/plugins.pro b/examples/declarative/cppextensions/plugins/plugins.pro index bdcb62c..a28582a 100644 --- a/examples/declarative/cppextensions/plugins/plugins.pro +++ b/examples/declarative/cppextensions/plugins/plugins.pro @@ -7,6 +7,8 @@ TARGET = qmlqtimeexampleplugin SOURCES += plugin.cpp +OTHER_FILES += "plugin.json" + qdeclarativesources.files += \ com/nokia/TimeExample/qmldir \ com/nokia/TimeExample/center.png \ diff --git a/examples/declarative/cppextensions/qwidgets/qwidgets.json b/examples/declarative/cppextensions/qwidgets/qwidgets.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/examples/declarative/cppextensions/qwidgets/qwidgets.json @@ -0,0 +1 @@ +{} diff --git a/examples/declarative/painteditem/textballoons/TextBalloonPlugin/plugin.h b/examples/declarative/painteditem/textballoons/TextBalloonPlugin/plugin.h index 6be8611..f444d31 100644 --- a/examples/declarative/painteditem/textballoons/TextBalloonPlugin/plugin.h +++ b/examples/declarative/painteditem/textballoons/TextBalloonPlugin/plugin.h @@ -46,11 +46,10 @@ class TextBalloonPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "textballoon.json") public: void registerTypes(const char *uri) { qmlRegisterType(uri, 1, 0, "TextBalloon"); } }; - -Q_EXPORT_PLUGIN2(qmltextballoonplugin, TextBalloonPlugin); diff --git a/examples/declarative/painteditem/textballoons/TextBalloonPlugin/textballoon.json b/examples/declarative/painteditem/textballoons/TextBalloonPlugin/textballoon.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/examples/declarative/painteditem/textballoons/TextBalloonPlugin/textballoon.json @@ -0,0 +1 @@ +{} diff --git a/examples/declarative/painteditem/textballoons/textballoons.pro b/examples/declarative/painteditem/textballoons/textballoons.pro index 453a003..e0b9404 100644 --- a/examples/declarative/painteditem/textballoons/textballoons.pro +++ b/examples/declarative/painteditem/textballoons/textballoons.pro @@ -9,6 +9,8 @@ HEADERS += TextBalloonPlugin/plugin.h \ SOURCES += textballoon.cpp +OTHER_FILES += textballoon.json + DESTDIR = TextBalloonPlugin qdeclarativesources.files += \ diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.cpp b/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.cpp index 9c4027d..d75f810 100644 --- a/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.cpp +++ b/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.cpp @@ -49,6 +49,5 @@ void ChartsPlugin::registerTypes(const char *uri) qmlRegisterType(uri, 1, 0, "PieSlice"); } -Q_EXPORT_PLUGIN2(chartsplugin, ChartsPlugin); //![0] diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.h b/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.h index bffcf00..863564b 100644 --- a/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.h +++ b/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.h @@ -46,6 +46,8 @@ class ChartsPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "chartsplugin.json") + public: void registerTypes(const char *uri); }; diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.json b/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.json @@ -0,0 +1 @@ +{} diff --git a/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.cpp b/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.cpp index 6bc3d4d..626ef93 100644 --- a/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.cpp +++ b/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.cpp @@ -49,6 +49,3 @@ void DialogPlugin::registerTypes(const char *uri) qmlRegisterType(uri, 1, 0, "Directory"); qmlRegisterType(uri,1,0,"File"); } - -//FileDialog is the plugin name (same as the TARGET in the project file) and DialogPlugin is the plugin classs -Q_EXPORT_PLUGIN2(FileDialog, DialogPlugin); \ No newline at end of file diff --git a/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h b/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h index 03bdc1a..7ad707f 100644 --- a/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h +++ b/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h @@ -46,6 +46,7 @@ class DialogPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "dialogplugin.json") public: //registerTypes is inherited from QDeclarativeExtensionPlugin diff --git a/examples/tutorials/gettingStartedQml/filedialog/dialogplugin.json b/examples/tutorials/gettingStartedQml/filedialog/dialogplugin.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/examples/tutorials/gettingStartedQml/filedialog/dialogplugin.json @@ -0,0 +1 @@ +{} diff --git a/src/declarative/debugger/qdeclarativedebugserverconnection_p.h b/src/declarative/debugger/qdeclarativedebugserverconnection_p.h index aa1c8aa..e78657a 100644 --- a/src/declarative/debugger/qdeclarativedebugserverconnection_p.h +++ b/src/declarative/debugger/qdeclarativedebugserverconnection_p.h @@ -75,7 +75,9 @@ public: virtual bool waitForMessage() = 0; }; -Q_DECLARE_INTERFACE(QDeclarativeDebugServerConnection, "com.trolltech.Qt.QDeclarativeDebugServerConnection/1.0") +#define QDeclarativeDebugServerConnection_iid "org.qt-project.Qt.QDeclarativeDebugServerConnection" + +Q_DECLARE_INTERFACE(QDeclarativeDebugServerConnection, QDeclarativeDebugServerConnection_iid) QT_END_NAMESPACE diff --git a/src/declarative/debugger/qdeclarativeinspectorinterface_p.h b/src/declarative/debugger/qdeclarativeinspectorinterface_p.h index e109fc0..adfd943 100644 --- a/src/declarative/debugger/qdeclarativeinspectorinterface_p.h +++ b/src/declarative/debugger/qdeclarativeinspectorinterface_p.h @@ -74,7 +74,9 @@ public: virtual void clientMessage(const QByteArray &message) = 0; }; -Q_DECLARE_INTERFACE(QDeclarativeInspectorInterface, "com.trolltech.Qt.QDeclarativeInspectorInterface/1.0") +#define QDeclarativeInspectorInterface_iid "org.qt-project.Qt." + +Q_DECLARE_INTERFACE(QDeclarativeInspectorInterface, QDeclarativeInspectorInterface_iid) QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativeextensioninterface.h b/src/declarative/qml/qdeclarativeextensioninterface.h index fcfaa7c..ce2560c 100644 --- a/src/declarative/qml/qdeclarativeextensioninterface.h +++ b/src/declarative/qml/qdeclarativeextensioninterface.h @@ -65,8 +65,13 @@ public: virtual void initializeEngine(QDeclarativeEngine *engine, const char *uri) = 0; }; +#define QDeclarativeTypesExtensionInterface_iid "org.qt-project.Qt.QDeclarativeTypesExtensionInterface" + Q_DECLARE_INTERFACE(QDeclarativeTypesExtensionInterface, "org.qt-project.Qt.QDeclarativeTypesExtensionInterface/1.0") -Q_DECLARE_INTERFACE(QDeclarativeExtensionInterface, "org.qt-project.Qt.QDeclarativeExtensionInterface/1.0") + +#define QDeclarativeExtensionInterface_iid "org.qt-project.Qt.QDeclarativeExtensionInterface" + +Q_DECLARE_INTERFACE(QDeclarativeExtensionInterface, QDeclarativeExtensionInterface_iid) QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativepropertyvalueinterceptor_p.h b/src/declarative/qml/qdeclarativepropertyvalueinterceptor_p.h index ed5e54f..939c45b 100644 --- a/src/declarative/qml/qdeclarativepropertyvalueinterceptor_p.h +++ b/src/declarative/qml/qdeclarativepropertyvalueinterceptor_p.h @@ -66,7 +66,10 @@ public: virtual void setTarget(const QDeclarativeProperty &property) = 0; virtual void write(const QVariant &value) = 0; }; -Q_DECLARE_INTERFACE(QDeclarativePropertyValueInterceptor, "com.trolltech.qml.QDeclarativePropertyValueInterceptor") + +#define QDeclarativePropertyValueInterceptor_iid "org.qt-project.Qt.QDeclarativePropertyValueInterceptor" + +Q_DECLARE_INTERFACE(QDeclarativePropertyValueInterceptor, QDeclarativePropertyValueInterceptor_iid) QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativepropertyvaluesource.h b/src/declarative/qml/qdeclarativepropertyvaluesource.h index 4189cae..d345319 100644 --- a/src/declarative/qml/qdeclarativepropertyvaluesource.h +++ b/src/declarative/qml/qdeclarativepropertyvaluesource.h @@ -57,7 +57,10 @@ public: virtual ~QDeclarativePropertyValueSource(); virtual void setTarget(const QDeclarativeProperty &) = 0; }; -Q_DECLARE_INTERFACE(QDeclarativePropertyValueSource, "com.trolltech.qml.QDeclarativePropertyValueSource") + +#define QDeclarativePropertyValueSource_iid "org.qt-project.Qt.QDeclarativePropertyValueSource" + +Q_DECLARE_INTERFACE(QDeclarativePropertyValueSource, QDeclarativePropertyValueSource_iid) QT_END_NAMESPACE diff --git a/src/imports/folderlistmodel/folderlistmodel.json b/src/imports/folderlistmodel/folderlistmodel.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/src/imports/folderlistmodel/folderlistmodel.json @@ -0,0 +1 @@ +{} diff --git a/src/imports/folderlistmodel/plugin.cpp b/src/imports/folderlistmodel/plugin.cpp index 48d7b5b..767f8f6 100644 --- a/src/imports/folderlistmodel/plugin.cpp +++ b/src/imports/folderlistmodel/plugin.cpp @@ -50,6 +50,8 @@ QT_BEGIN_NAMESPACE class QmlFolderListModelPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "folderlistmodel.json") + public: virtual void registerTypes(const char *uri) { @@ -64,8 +66,3 @@ public: QT_END_NAMESPACE #include "plugin.moc" - -//![plugin export decl] -Q_EXPORT_PLUGIN2(qmlfolderlistmodelplugin, QT_PREPEND_NAMESPACE(QmlFolderListModelPlugin)); -//![plugin export decl] - diff --git a/src/imports/gestures/gestures.json b/src/imports/gestures/gestures.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/src/imports/gestures/gestures.json @@ -0,0 +1 @@ +{} diff --git a/src/imports/localstorage/localstorage.json b/src/imports/localstorage/localstorage.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/src/imports/localstorage/localstorage.json @@ -0,0 +1 @@ +{} diff --git a/src/imports/localstorage/localstorage.pro b/src/imports/localstorage/localstorage.pro index 51a69aa..5164e88 100644 --- a/src/imports/localstorage/localstorage.pro +++ b/src/imports/localstorage/localstorage.pro @@ -6,10 +6,12 @@ QT += sql declarative declarative-private v8-private core-private SOURCES += plugin.cpp +OTHER_FILES += localstorage.json + DESTDIR = $$QT.declarative.imports/$$TARGETPATH target.path = $$[QT_INSTALL_IMPORTS]/$$TARGETPATH qmldir.files += $$PWD/qmldir qmldir.path += $$[QT_INSTALL_IMPORTS]/$$TARGETPATH -INSTALLS += target qmldir \ No newline at end of file +INSTALLS += target qmldir diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp index dd747d0..0ab47c1 100644 --- a/src/imports/localstorage/plugin.cpp +++ b/src/imports/localstorage/plugin.cpp @@ -651,6 +651,8 @@ static QObject *module_api_factory(QDeclarativeEngine *engine, QJSEngine *script class QDeclarativeLocalStoragePlugin : public QDeclarativeExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "localstorage.json") + public: QDeclarativeLocalStoragePlugin() { @@ -664,5 +666,3 @@ public: }; #include "plugin.moc" - -Q_EXPORT_PLUGIN2(plugin, QDeclarativeLocalStoragePlugin); diff --git a/src/imports/shaders/shaders.json b/src/imports/shaders/shaders.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/src/imports/shaders/shaders.json @@ -0,0 +1 @@ +{} diff --git a/src/imports/testlib/main.cpp b/src/imports/testlib/main.cpp index 672de10..ec32d7c 100644 --- a/src/imports/testlib/main.cpp +++ b/src/imports/testlib/main.cpp @@ -135,6 +135,8 @@ QT_BEGIN_NAMESPACE class QTestQmlModule : public QDeclarativeExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "testlib.json") + public: virtual void registerTypes(const char *uri) { @@ -152,5 +154,3 @@ public: QT_END_NAMESPACE #include "main.moc" - -Q_EXPORT_PLUGIN2(qmltestplugin, QT_PREPEND_NAMESPACE(QTestQmlModule)) diff --git a/src/imports/testlib/testlib.json b/src/imports/testlib/testlib.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/src/imports/testlib/testlib.json @@ -0,0 +1 @@ +{} diff --git a/src/imports/testlib/testlib.pro b/src/imports/testlib/testlib.pro index 3b8a5bf..7e8f601 100644 --- a/src/imports/testlib/testlib.pro +++ b/src/imports/testlib/testlib.pro @@ -7,7 +7,8 @@ CONFIG += qt plugin QT += declarative quick qmltest qmltest-private v8-private declarative-private core-private testlib SOURCES += main.cpp -HEADERS += + +OTHER_FILES += testlib.json DESTDIR = $$QT.declarative.imports/$$TARGETPATH diff --git a/src/imports/xmllistmodel/plugin.cpp b/src/imports/xmllistmodel/plugin.cpp index 9085a60..07f59b8 100644 --- a/src/imports/xmllistmodel/plugin.cpp +++ b/src/imports/xmllistmodel/plugin.cpp @@ -49,6 +49,8 @@ QT_BEGIN_NAMESPACE class QmlXmlListModelPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "xmllistmodel.json") + public: virtual void registerTypes(const char *uri) { @@ -61,5 +63,3 @@ public: QT_END_NAMESPACE #include "plugin.moc" - -Q_EXPORT_PLUGIN2(qmlxmllistmodelplugin, QT_PREPEND_NAMESPACE(QmlXmlListModelPlugin)); diff --git a/src/imports/xmllistmodel/xmllistmodel.json b/src/imports/xmllistmodel/xmllistmodel.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/src/imports/xmllistmodel/xmllistmodel.json @@ -0,0 +1 @@ +{} diff --git a/src/plugins/accessible/quick/accessible.json b/src/plugins/accessible/quick/accessible.json new file mode 100644 index 0000000..845a45a --- /dev/null +++ b/src/plugins/accessible/quick/accessible.json @@ -0,0 +1,3 @@ +{ + "Keys": [ "QQuickView", "QQuickItem" ] +} diff --git a/src/plugins/accessible/quick/main.cpp b/src/plugins/accessible/quick/main.cpp index 08a5fe5..af9555c 100644 --- a/src/plugins/accessible/quick/main.cpp +++ b/src/plugins/accessible/quick/main.cpp @@ -59,6 +59,9 @@ QT_BEGIN_NAMESPACE class AccessibleQuickFactory : public QAccessiblePlugin { + Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QAccessibleFactoryInterface" FILE "accessible.json") + public: AccessibleQuickFactory(); @@ -105,9 +108,8 @@ QAccessibleInterface *AccessibleQuickFactory::create(const QString &classname, Q return 0; } -Q_EXPORT_STATIC_PLUGIN(AccessibleQuickFactory) -Q_EXPORT_PLUGIN2(qtaccessiblequick, AccessibleQuickFactory) - QT_END_NAMESPACE +#include "main.moc" + #endif // QT_NO_ACCESSIBILITY diff --git a/src/plugins/accessible/quick/quick.pro b/src/plugins/accessible/quick/quick.pro index 97a1d50..add275a 100644 --- a/src/plugins/accessible/quick/quick.pro +++ b/src/plugins/accessible/quick/quick.pro @@ -19,5 +19,7 @@ SOURCES += \ HEADERS += \ qaccessiblequickview.h \ qaccessiblequickitem.h + +OTHERFILES += accessible.json } diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qmldbg_qtquick2.pro b/src/plugins/qmltooling/qmldbg_qtquick2/qmldbg_qtquick2.pro index b9c6584..24efee8 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/qmldbg_qtquick2.pro +++ b/src/plugins/qmltooling/qmldbg_qtquick2/qmldbg_qtquick2.pro @@ -27,5 +27,7 @@ HEADERS += \ ../shared/qdeclarativeinspectorprotocol.h \ ../shared/qmlinspectorconstants.h +OTHER_FILES += qtquick2plugin.json + target.path += $$[QT_INSTALL_PLUGINS]/qmltooling INSTALLS += target diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.cpp b/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.cpp index 206d0b2..1245a7e 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.cpp +++ b/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.cpp @@ -84,5 +84,3 @@ void QtQuick2Plugin::clientMessage(const QByteArray &message) } // namespace QtQuick2 } // namespace QmlJSDebugger - -Q_EXPORT_PLUGIN2(qmldbg_qtquick2, QmlJSDebugger::QtQuick2::QtQuick2Plugin) diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.h b/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.h index d0f814c..f6f668d 100644 --- a/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.h +++ b/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.h @@ -55,6 +55,7 @@ class QtQuick2Plugin : public QObject, public QDeclarativeInspectorInterface { Q_OBJECT Q_DISABLE_COPY(QtQuick2Plugin) + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeInspectorInterface" FILE "qtquick2plugin.json") Q_INTERFACES(QDeclarativeInspectorInterface) public: diff --git a/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.json b/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.json new file mode 100644 index 0000000..311847d --- /dev/null +++ b/src/plugins/qmltooling/qmldbg_qtquick2/qtquick2plugin.json @@ -0,0 +1,2 @@ +{} + diff --git a/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro b/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro index 8ab507c..075cc49 100644 --- a/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro +++ b/src/plugins/qmltooling/qmldbg_tcp/qmldbg_tcp.pro @@ -14,5 +14,7 @@ SOURCES += \ HEADERS += \ qtcpserverconnection.h +OTHER_FILES += qtcpserverconnection.json + target.path += $$[QT_INSTALL_PLUGINS]/qmltooling INSTALLS += target diff --git a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp index 529d209..216c2c3 100644 --- a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp +++ b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.cpp @@ -193,7 +193,5 @@ void QTcpServerConnection::invalidPacket() qWarning("QDeclarativeDebugServer: Received a corrupted packet! Giving up ..."); } -Q_EXPORT_PLUGIN2(tcpserver, QTcpServerConnection) - QT_END_NAMESPACE diff --git a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h index f090c97..1154a0a 100644 --- a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h +++ b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.h @@ -54,9 +54,9 @@ class QTcpServerConnection : public QObject, public QDeclarativeDebugServerConne Q_OBJECT Q_DECLARE_PRIVATE(QTcpServerConnection) Q_DISABLE_COPY(QTcpServerConnection) + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeDebugServerConnection" FILE "qtcpserverconnection.json") Q_INTERFACES(QDeclarativeDebugServerConnection) - public: QTcpServerConnection(); ~QTcpServerConnection(); diff --git a/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.json b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/src/plugins/qmltooling/qmldbg_tcp/qtcpserverconnection.json @@ -0,0 +1 @@ +{} diff --git a/src/quick/items/qquickvisualadaptormodel_p.h b/src/quick/items/qquickvisualadaptormodel_p.h index 9ae8325..e431f3a 100644 --- a/src/quick/items/qquickvisualadaptormodel_p.h +++ b/src/quick/items/qquickvisualadaptormodel_p.h @@ -121,7 +121,9 @@ public: virtual QObject *proxiedObject() = 0; }; -Q_DECLARE_INTERFACE(QQuickVisualAdaptorModelProxyInterface, "com.trolltech.qml.QQuickVisualAdaptorModelProxyInterface") +#define QQuickVisualAdaptorModelProxyInterface_iid "org.qt-project.Qt.QQuickVisualAdaptorModelProxyInterface" + +Q_DECLARE_INTERFACE(QQuickVisualAdaptorModelProxyInterface, QQuickVisualAdaptorModelProxyInterface_iid) QT_END_NAMESPACE diff --git a/src/quick/scenegraph/qsgcontextplugin_p.h b/src/quick/scenegraph/qsgcontextplugin_p.h index 081e64e..6080c8b 100644 --- a/src/quick/scenegraph/qsgcontextplugin_p.h +++ b/src/quick/scenegraph/qsgcontextplugin_p.h @@ -62,7 +62,7 @@ struct Q_QUICK_EXPORT QSGContextFactoryInterface : public QFactoryInterface }; #define QSGContextFactoryInterface_iid \ - "com.trolltech.Qt.QSGContextFactoryInterface" + "org.qt-project.Qt.QSGContextFactoryInterface" Q_DECLARE_INTERFACE(QSGContextFactoryInterface, QSGContextFactoryInterface_iid) class Q_QUICK_EXPORT QSGContextPlugin : public QObject, public QSGContextFactoryInterface diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.h b/tests/auto/declarative/qdeclarativelanguage/testtypes.h index 4a37139..ec0c185 100644 --- a/tests/auto/declarative/qdeclarativelanguage/testtypes.h +++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.h @@ -67,7 +67,8 @@ public: }; QT_BEGIN_NAMESPACE -Q_DECLARE_INTERFACE(MyInterface, "com.trolltech.Qt.Test.MyInterface"); +#define MyInterface_iid "org.qt-project.Qt.Test.MyInterface" +Q_DECLARE_INTERFACE(MyInterface, MyInterface_iid); QT_END_NAMESPACE QML_DECLARE_INTERFACE(MyInterface); diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/empty.json b/tests/auto/declarative/qdeclarativemoduleplugin/empty.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/tests/auto/declarative/qdeclarativemoduleplugin/empty.json @@ -0,0 +1 @@ +{} diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/plugin.2.1/plugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/plugin.2.1/plugin.cpp index 27e0beb..a8a0f69 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/plugin.2.1/plugin.cpp +++ b/tests/auto/declarative/qdeclarativemoduleplugin/plugin.2.1/plugin.cpp @@ -66,6 +66,8 @@ private: class MyPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "../empty.json") + public: MyPlugin() { @@ -80,5 +82,3 @@ public: }; #include "plugin.moc" - -Q_EXPORT_PLUGIN2(plugin, MyPlugin); diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/plugin.2/plugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/plugin.2/plugin.cpp index 904664e..c67b5b1 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/plugin.2/plugin.cpp +++ b/tests/auto/declarative/qdeclarativemoduleplugin/plugin.2/plugin.cpp @@ -66,6 +66,8 @@ private: class MyPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "../empty.json") + public: MyPlugin() { @@ -80,5 +82,3 @@ public: }; #include "plugin.moc" - -Q_EXPORT_PLUGIN2(plugin, MyPlugin); diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp index 267535d..869630b 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp +++ b/tests/auto/declarative/qdeclarativemoduleplugin/plugin/plugin.cpp @@ -65,6 +65,8 @@ private: class MyPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "../empty.json") + public: MyPlugin() { @@ -79,5 +81,3 @@ public: }; #include "plugin.moc" - -Q_EXPORT_PLUGIN2(plugin, MyPlugin); diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/pluginMixed/plugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/pluginMixed/plugin.cpp index 0052c6e..51e4878 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/pluginMixed/plugin.cpp +++ b/tests/auto/declarative/qdeclarativemoduleplugin/pluginMixed/plugin.cpp @@ -56,6 +56,8 @@ public: class MyMixedPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "../empty.json") + public: MyMixedPlugin() { @@ -69,5 +71,3 @@ public: }; #include "plugin.moc" - -Q_EXPORT_PLUGIN2(plugin, MyMixedPlugin); diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/pluginVersion/plugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/pluginVersion/plugin.cpp index 6fc6eee..ab8b3d4 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/pluginVersion/plugin.cpp +++ b/tests/auto/declarative/qdeclarativemoduleplugin/pluginVersion/plugin.cpp @@ -56,6 +56,8 @@ public: class MyMixedPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "../empty.json") + public: MyMixedPlugin() { @@ -69,5 +71,3 @@ public: }; #include "plugin.moc" - -Q_EXPORT_PLUGIN2(plugin, MyMixedPlugin); diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/pluginWithQmlFile/plugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/pluginWithQmlFile/plugin.cpp index 7cb0365..88b807e 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/pluginWithQmlFile/plugin.cpp +++ b/tests/auto/declarative/qdeclarativemoduleplugin/pluginWithQmlFile/plugin.cpp @@ -46,6 +46,8 @@ class MyPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "../empty.json") + public: void registerTypes(const char *uri) { @@ -54,5 +56,3 @@ public: }; #include "plugin.moc" - -Q_EXPORT_PLUGIN2(plugin, MyPlugin); diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/pluginWrongCase/plugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/pluginWrongCase/plugin.cpp index 2446c93..fe110a2 100644 --- a/tests/auto/declarative/qdeclarativemoduleplugin/pluginWrongCase/plugin.cpp +++ b/tests/auto/declarative/qdeclarativemoduleplugin/pluginWrongCase/plugin.cpp @@ -65,6 +65,8 @@ private: class MyPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "../empty.json") + public: MyPlugin() { @@ -79,5 +81,3 @@ public: }; #include "plugin.moc" - -Q_EXPORT_PLUGIN2(plugin, MyPlugin); -- 2.7.4