diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-02-23 12:08:07 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-28 08:35:02 +0100 |
commit | afebb988c090d7a941af2ac97b3d23b364b878fc (patch) | |
tree | c928fdd9ba01fc1a5eb45f1e5a2d26a49893ab56 | |
parent | dbf1c74bf24eb399e1281be795cf56659adc3308 (diff) |
Use new plugin system in QtQuick1 examples/demos.
Change-Id: I76f930c32688d596aa58e28eb1d46e1ddeb57b4b
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
17 files changed, 15 insertions, 49 deletions
diff --git a/demos/mobile/quickhit/mainwindow.h b/demos/mobile/quickhit/mainwindow.h index a63e85ff..6393cd75 100644 --- a/demos/mobile/quickhit/mainwindow.h +++ b/demos/mobile/quickhit/mainwindow.h @@ -42,7 +42,7 @@ #ifndef MAINWINDOW_H #define MAINWINDOW_H -#include <QtGui/QMainWindow> +#include <QtWidgets/QMainWindow> #include <QDeclarativeView> #include <QApplication> diff --git a/demos/mobile/quickhit/plugins/LevelOne/levelone.cpp b/demos/mobile/quickhit/plugins/LevelOne/levelone.cpp index 5d3f6e6b..65fd5595 100644 --- a/demos/mobile/quickhit/plugins/LevelOne/levelone.cpp +++ b/demos/mobile/quickhit/plugins/LevelOne/levelone.cpp @@ -115,7 +115,3 @@ QVariant LevelOne::graphSize(QVariant pathToGraph) ret.setValue(imageSize); return ret; } - -// This Qt macro exports the plugin class LevelOne with the name levelplugins. -// There should be exactly one occurrence of this LevelOne macro in a Qt plugin's source code. -Q_EXPORT_PLUGIN2(levelplugins, LevelOne); diff --git a/demos/mobile/quickhit/plugins/LevelOne/levelone.h b/demos/mobile/quickhit/plugins/LevelOne/levelone.h index 91b43363..54067182 100644 --- a/demos/mobile/quickhit/plugins/LevelOne/levelone.h +++ b/demos/mobile/quickhit/plugins/LevelOne/levelone.h @@ -51,6 +51,7 @@ class LevelOne : public LevelPluginInterface { Q_OBJECT + Q_PLUGIN_METADATA(IID "Forum.Nokia.com.QuickHit.LevelPluginInterface/1.0" FILE "levelone.json") // This macro tells Qt which interfaces the class implements. // This is used when implementing plugins. diff --git a/demos/mobile/quickhit/plugins/LevelOne/levelone.json b/demos/mobile/quickhit/plugins/LevelOne/levelone.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/demos/mobile/quickhit/plugins/LevelOne/levelone.json @@ -0,0 +1 @@ +{} diff --git a/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.cpp b/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.cpp index c759b253..dae521e9 100644 --- a/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.cpp +++ b/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.cpp @@ -117,7 +117,3 @@ QVariant LevelTwo::graphSize(QVariant pathToGraph) ret.setValue(imageSize); return ret; } - -// This Qt macro exports the plugin class LevelTwo with the name levelplugins. -// There should be exactly one occurrence of this LevelTwo macro in a Qt plugin's source code. -Q_EXPORT_PLUGIN2(levelplugins, LevelTwo); diff --git a/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.h b/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.h index 327a4001..5e3ad08d 100644 --- a/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.h +++ b/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.h @@ -51,6 +51,7 @@ class LevelTwo : public LevelPluginInterface { Q_OBJECT + Q_PLUGIN_METADATA(IID "Forum.Nokia.com.QuickHit.LevelPluginInterface/1.0" FILE "leveltwo.json") // This macro tells Qt which interfaces the class implements. // This is used when implementing plugins. diff --git a/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.json b/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/demos/mobile/quickhit/plugins/LevelTwo/leveltwo.json @@ -0,0 +1 @@ +{} diff --git a/demos/mobile/quickhit/plugins/levelplugininterface.h b/demos/mobile/quickhit/plugins/levelplugininterface.h index 0914db82..b4ed6ad4 100644 --- a/demos/mobile/quickhit/plugins/levelplugininterface.h +++ b/demos/mobile/quickhit/plugins/levelplugininterface.h @@ -80,8 +80,8 @@ public: // This Qt macro associates the given Identifier "Forum.Nokia.com.QuickHit.LevelPluginInterface/1.0" // to the interface class called LevelPluginInterface. The Identifier must be unique. -Q_DECLARE_INTERFACE(LevelPluginInterface, - "Forum.Nokia.com.QuickHit.LevelPluginInterface/1.0"); +#define LevelPluginInterface_iid "Forum.Nokia.com.QuickHit.LevelPluginInterface/1.0" +Q_DECLARE_INTERFACE(LevelPluginInterface, LevelPluginInterface_iid) #endif // LEVELPLUGININTERFACE_H diff --git a/demos/mobile/quickhit/quickhit.pro b/demos/mobile/quickhit/quickhit.pro index 70a8145b..cc980d92 100644 --- a/demos/mobile/quickhit/quickhit.pro +++ b/demos/mobile/quickhit/quickhit.pro @@ -1,4 +1,4 @@ -QT += core gui quick1 opengl +QT += core gui quick1 opengl widgets VERSION = 1.1.1 @@ -28,34 +28,6 @@ RESOURCES += resources.qrc # QtMultimedia from Qt QT += multimedia -symbian { - # in Symbian 1 we do not have OpenGL available - contains(SYMBIAN_VERSION, 9.4) { - DEFINES += QT_NO_OPENGL - QT -= opengl - warning("No OpenGL support") - } - - CONFIG += mobility - MOBILITY = systeminfo - TARGET = QuickHit - TARGET.UID3 = 0xe7ced714 - - TARGET.CAPABILITY = NetworkServices \ - Location \ - ReadUserData \ - WriteUserData \ - LocalServices \ - UserEnvironment - - LIBS += -lcone -leikcore -lavkon -lhwrmvibraclient - - ICON = icon.svg - - TARGET.EPOCSTACKSIZE = 0x14000 - TARGET.EPOCHEAPSIZE = 0x100000 0x2000000 -} - maemo5 { CONFIG += mobility MOBILITY = systeminfo diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.cpp b/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.cpp index 0630cb1a..4bb8c230 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.cpp +++ b/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.cpp @@ -49,6 +49,3 @@ void DialogPlugin::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); diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.h b/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.h index d7f5cd33..cb78367e 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.h +++ b/examples/tutorials/gettingStarted/gsQml/filedialog/dialogPlugin.h @@ -46,6 +46,7 @@ class DialogPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "filedialog.json") public: //registerTypes is inherited from QDeclarativeExtensionPlugin diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/filedialog.json b/examples/tutorials/gettingStarted/gsQml/filedialog/filedialog.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/filedialog/filedialog.json @@ -0,0 +1 @@ +{} diff --git a/examples/tutorials/gettingStarted/gsQml/filedialog/filedialog.pro b/examples/tutorials/gettingStarted/gsQml/filedialog/filedialog.pro index d85787d0..33eb51d4 100644 --- a/examples/tutorials/gettingStarted/gsQml/filedialog/filedialog.pro +++ b/examples/tutorials/gettingStarted/gsQml/filedialog/filedialog.pro @@ -1,6 +1,6 @@ TEMPLATE = lib CONFIG += qt plugin -QT += declarative +QT += quick1 DESTDIR += ../plugins OBJECTS_DIR = tmp diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.cpp b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.cpp index de84d9c4..290bd292 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.cpp +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.cpp @@ -52,6 +52,3 @@ void DialogPlugin::registerTypes(const char *uri){ //qRegisterMetaType<QDeclarativeListProperty<QString> > ("QDeclarativeListProperty<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/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.h b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.h index cdcf59e5..232518fa 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.h +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/dialogPlugin.h @@ -46,7 +46,8 @@ class DialogPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT - + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDeclarativeExtensionInterface" FILE "filedialog.json") + public: //registerTypes is inherited from QDeclarativeExtensionPlugin void registerTypes(const char *uri); diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.json b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.json @@ -0,0 +1 @@ +{} diff --git a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.pro b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.pro index 62477470..9b1cfa11 100644 --- a/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.pro +++ b/examples/tutorials/gettingStarted/gsQml/parts/part5/filedialog/filedialog.pro @@ -1,6 +1,6 @@ TEMPLATE = lib CONFIG += qt plugin -QT += declarative +QT += quick1 DESTDIR += ../plugins OBJECTS_DIR = tmp |