diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-02-21 10:55:34 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-23 09:05:49 +0100 |
commit | fb3889a423365b1736cae8850cdb2b3ac77b14a8 (patch) | |
tree | 65d7c1f7db7de65035ab91a16a136c4556f026bd /examples/tutorials | |
parent | dc3165178851b9bda71dd238c8a5faca4dfa7a45 (diff) |
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 <martin.jones@nokia.com>
Diffstat (limited to 'examples/tutorials')
3 files changed, 2 insertions, 3 deletions
diff --git a/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.cpp b/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.cpp index 6bc3d4d006..626ef93adc 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<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 diff --git a/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h b/examples/tutorials/gettingStartedQml/filedialog/dialogPlugin.h index 03bdc1a6e4..7ad707f6d9 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 0000000000..0967ef424b --- /dev/null +++ b/examples/tutorials/gettingStartedQml/filedialog/dialogplugin.json @@ -0,0 +1 @@ +{} |