summaryrefslogtreecommitdiff
path: root/examples/declarative/tutorials/extending/chapter6-plugins
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-02-21 10:55:34 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-23 09:05:49 +0100
commitfb3889a423365b1736cae8850cdb2b3ac77b14a8 (patch)
tree65d7c1f7db7de65035ab91a16a136c4556f026bd /examples/declarative/tutorials/extending/chapter6-plugins
parentdc3165178851b9bda71dd238c8a5faca4dfa7a45 (diff)
downloadqtdeclarative-fb3889a423365b1736cae8850cdb2b3ac77b14a8.tar.gz
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/declarative/tutorials/extending/chapter6-plugins')
-rw-r--r--examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.cpp1
-rw-r--r--examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.h2
-rw-r--r--examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.json1
3 files changed, 3 insertions, 1 deletions
diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.cpp b/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.cpp
index 9c4027de8a..d75f810964 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<PieSlice>(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 bffcf000fd..863564b09c 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 0000000000..0967ef424b
--- /dev/null
+++ b/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.json
@@ -0,0 +1 @@
+{}