From 553d9c8cf7e37ba425d21da87062e21512a76b2e Mon Sep 17 00:00:00 2001 From: Lincoln Ramsay Date: Fri, 16 Mar 2012 18:00:39 +1000 Subject: Update QML plugins to the new style. Change-Id: Ie419b58c4789e539be5370dc0b7d2518009bbe91 Reviewed-by: Lorn Potter --- examples/sensors/grue/import/import.pro | 3 +++ examples/sensors/grue/import/main.cpp | 4 +--- examples/sensors/grue/import/plugin.json | 1 + examples/sensors/sensor_explorer/import/import.pro | 3 +++ examples/sensors/sensor_explorer/import/main.cpp | 3 +-- examples/sensors/sensor_explorer/import/plugin.json | 1 + 6 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 examples/sensors/grue/import/plugin.json create mode 100644 examples/sensors/sensor_explorer/import/plugin.json (limited to 'examples') diff --git a/examples/sensors/grue/import/import.pro b/examples/sensors/grue/import/import.pro index e681636..a689931 100644 --- a/examples/sensors/grue/import/import.pro +++ b/examples/sensors/grue/import/import.pro @@ -22,3 +22,6 @@ INSTALLS += target qmldir.files=$$PWD/qmldir qmldir.path=$$DESTPATH INSTALLS += qmldir + +OTHER_FILES += \ + plugin.json diff --git a/examples/sensors/grue/import/main.cpp b/examples/sensors/grue/import/main.cpp index 9b14fdd..4924bde 100644 --- a/examples/sensors/grue/import/main.cpp +++ b/examples/sensors/grue/import/main.cpp @@ -48,6 +48,7 @@ QT_BEGIN_NAMESPACE class GrueSensorQmlImport : public QQmlExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface" FILE "plugin.json") public: virtual void registerTypes(const char *uri) { @@ -68,8 +69,6 @@ QT_END_NAMESPACE #include "main.moc" -Q_EXPORT_PLUGIN2(gruesensorqmlimport, QT_PREPEND_NAMESPACE(GrueSensorQmlImport)); - /* \qmlclass GrueSensor GrueSensor \inherits QtMobility.sensors1::Sensor @@ -102,4 +101,3 @@ Q_EXPORT_PLUGIN2(gruesensorqmlimport, QT_PREPEND_NAMESPACE(GrueSensorQmlImport)) \qmlproperty qreal Grue1::GrueSensorReading::chanceOfBeingEaten Please see GrueSensorReading::chanceOfBeingEaten for information about this property. */ - diff --git a/examples/sensors/grue/import/plugin.json b/examples/sensors/grue/import/plugin.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/examples/sensors/grue/import/plugin.json @@ -0,0 +1 @@ +{} diff --git a/examples/sensors/sensor_explorer/import/import.pro b/examples/sensors/sensor_explorer/import/import.pro index e84ede0..175433e 100644 --- a/examples/sensors/sensor_explorer/import/import.pro +++ b/examples/sensors/sensor_explorer/import/import.pro @@ -20,3 +20,6 @@ INSTALLS += target qmldir.files=$$PWD/qmldir qmldir.path=$$DESTPATH INSTALLS += qmldir + +OTHER_FILES += \ + plugin.json diff --git a/examples/sensors/sensor_explorer/import/main.cpp b/examples/sensors/sensor_explorer/import/main.cpp index 4291486..e0b3ad9 100644 --- a/examples/sensors/sensor_explorer/import/main.cpp +++ b/examples/sensors/sensor_explorer/import/main.cpp @@ -48,6 +48,7 @@ QT_BEGIN_NAMESPACE class SensorExplorerDeclarativeModule : public QQmlExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface" FILE "plugin.json") public: virtual void registerTypes(const char *uri) { @@ -63,5 +64,3 @@ public: QT_END_NAMESPACE #include "main.moc" - -Q_EXPORT_PLUGIN2(sensorexplorerdeclarativemodule, QT_PREPEND_NAMESPACE(SensorExplorerDeclarativeModule)) diff --git a/examples/sensors/sensor_explorer/import/plugin.json b/examples/sensors/sensor_explorer/import/plugin.json new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/examples/sensors/sensor_explorer/import/plugin.json @@ -0,0 +1 @@ +{} -- cgit v1.2.1