- Use prefix "org.qt-project" for interfaces.
- Use new macros, add json files.
Change-Id: I53df83f95153c5c9c462098584606284470a5ae0
Reviewed-by: Martin Jones <martin.jones@nokia.com>
class ImageProviderExtensionPlugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "imageprovider.json")
public:
void registerTypes(const char *uri)
{
};
-#include "imageprovider.moc"
-Q_EXPORT_PLUGIN(ImageProviderExtensionPlugin);
+#define QDeclarativeExtensionInterface_iid "org.qt-project.Qt.QDeclarativeExtensionInterface"
+
+#include "imageprovider.moc"
SOURCES += imageprovider.cpp
+OTHER_FILES += imageprovider.json
+
sources.files = $$SOURCES imageprovider.qml imageprovider.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative/imageprovider
class QExampleQmlPlugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "plugin.json")
+
public:
void registerTypes(const char *uri)
{
//![plugin]
#include "plugin.moc"
-
-//![export]
-Q_EXPORT_PLUGIN2(qmlqtimeexampleplugin, QExampleQmlPlugin);
-//![export]
SOURCES += plugin.cpp
+OTHER_FILES += "plugin.json"
+
qdeclarativesources.files += \
com/nokia/TimeExample/qmldir \
com/nokia/TimeExample/center.png \
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<TextBalloon>(uri, 1, 0, "TextBalloon");
}
};
-
-Q_EXPORT_PLUGIN2(qmltextballoonplugin, TextBalloonPlugin);
SOURCES += textballoon.cpp
+OTHER_FILES += textballoon.json
+
DESTDIR = TextBalloonPlugin
qdeclarativesources.files += \
qmlRegisterType<PieSlice>(uri, 1, 0, "PieSlice");
}
-Q_EXPORT_PLUGIN2(chartsplugin, ChartsPlugin);
//![0]
class ChartsPlugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "chartsplugin.json")
+
public:
void registerTypes(const char *uri);
};
qmlRegisterType<Directory>(uri, 1, 0, "Directory");
qmlRegisterType<File>(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
class DialogPlugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "dialogplugin.json")
public:
//registerTypes is inherited from QDeclarativeExtensionPlugin
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
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
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
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
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
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)
{
QT_END_NAMESPACE
#include "plugin.moc"
-
-//![plugin export decl]
-Q_EXPORT_PLUGIN2(qmlfolderlistmodelplugin, QT_PREPEND_NAMESPACE(QmlFolderListModelPlugin));
-//![plugin export decl]
-
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
class QDeclarativeLocalStoragePlugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "localstorage.json")
+
public:
QDeclarativeLocalStoragePlugin()
{
};
#include "plugin.moc"
-
-Q_EXPORT_PLUGIN2(plugin, QDeclarativeLocalStoragePlugin);
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)
{
QT_END_NAMESPACE
#include "main.moc"
-
-Q_EXPORT_PLUGIN2(qmltestplugin, QT_PREPEND_NAMESPACE(QTestQmlModule))
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
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)
{
QT_END_NAMESPACE
#include "plugin.moc"
-
-Q_EXPORT_PLUGIN2(qmlxmllistmodelplugin, QT_PREPEND_NAMESPACE(QmlXmlListModelPlugin));
--- /dev/null
+{
+ "Keys": [ "QQuickView", "QQuickItem" ]
+}
class AccessibleQuickFactory : public QAccessiblePlugin
{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QAccessibleFactoryInterface" FILE "accessible.json")
+
public:
AccessibleQuickFactory();
return 0;
}
-Q_EXPORT_STATIC_PLUGIN(AccessibleQuickFactory)
-Q_EXPORT_PLUGIN2(qtaccessiblequick, AccessibleQuickFactory)
-
QT_END_NAMESPACE
+#include "main.moc"
+
#endif // QT_NO_ACCESSIBILITY
HEADERS += \
qaccessiblequickview.h \
qaccessiblequickitem.h
+
+OTHERFILES += accessible.json
}
../shared/qdeclarativeinspectorprotocol.h \
../shared/qmlinspectorconstants.h
+OTHER_FILES += qtquick2plugin.json
+
target.path += $$[QT_INSTALL_PLUGINS]/qmltooling
INSTALLS += target
} // namespace QtQuick2
} // namespace QmlJSDebugger
-
-Q_EXPORT_PLUGIN2(qmldbg_qtquick2, QmlJSDebugger::QtQuick2::QtQuick2Plugin)
{
Q_OBJECT
Q_DISABLE_COPY(QtQuick2Plugin)
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeInspectorInterface" FILE "qtquick2plugin.json")
Q_INTERFACES(QDeclarativeInspectorInterface)
public:
HEADERS += \
qtcpserverconnection.h
+OTHER_FILES += qtcpserverconnection.json
+
target.path += $$[QT_INSTALL_PLUGINS]/qmltooling
INSTALLS += target
qWarning("QDeclarativeDebugServer: Received a corrupted packet! Giving up ...");
}
-Q_EXPORT_PLUGIN2(tcpserver, QTcpServerConnection)
-
QT_END_NAMESPACE
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();
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
};
#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
};
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);
class MyPlugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "../empty.json")
+
public:
MyPlugin()
{
};
#include "plugin.moc"
-
-Q_EXPORT_PLUGIN2(plugin, MyPlugin);
class MyPlugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "../empty.json")
+
public:
MyPlugin()
{
};
#include "plugin.moc"
-
-Q_EXPORT_PLUGIN2(plugin, MyPlugin);
class MyPlugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "../empty.json")
+
public:
MyPlugin()
{
};
#include "plugin.moc"
-
-Q_EXPORT_PLUGIN2(plugin, MyPlugin);
class MyMixedPlugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "../empty.json")
+
public:
MyMixedPlugin()
{
};
#include "plugin.moc"
-
-Q_EXPORT_PLUGIN2(plugin, MyMixedPlugin);
class MyMixedPlugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "../empty.json")
+
public:
MyMixedPlugin()
{
};
#include "plugin.moc"
-
-Q_EXPORT_PLUGIN2(plugin, MyMixedPlugin);
class MyPlugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "../empty.json")
+
public:
void registerTypes(const char *uri)
{
};
#include "plugin.moc"
-
-Q_EXPORT_PLUGIN2(plugin, MyPlugin);
class MyPlugin : public QDeclarativeExtensionPlugin
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "../empty.json")
+
public:
MyPlugin()
{
};
#include "plugin.moc"
-
-Q_EXPORT_PLUGIN2(plugin, MyPlugin);