From efde205586a70320d0525e941e5a1cd9657bdd30 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 23 Feb 2012 12:26:10 +0100 Subject: Use new plugin system in qtbase. - AccessibleWidgets - Windows printer support - Examples Change-Id: Icc162bd7fc284b3c76d9966210f983728085c743 Reviewed-by: Lars Knoll --- examples/tools/echoplugin/echowindow/echointerface.h | 6 ++++-- examples/tools/echoplugin/plugin/echoplugin.cpp | 4 ---- examples/tools/echoplugin/plugin/echoplugin.h | 2 ++ examples/tools/echoplugin/plugin/echoplugin.json | 1 + examples/tools/echoplugin/plugin/plugin.pro | 1 + 5 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 examples/tools/echoplugin/plugin/echoplugin.json (limited to 'examples/tools/echoplugin') diff --git a/examples/tools/echoplugin/echowindow/echointerface.h b/examples/tools/echoplugin/echowindow/echointerface.h index 412e37b7d2..13494c8d28 100644 --- a/examples/tools/echoplugin/echowindow/echointerface.h +++ b/examples/tools/echoplugin/echowindow/echointerface.h @@ -53,8 +53,10 @@ public: QT_BEGIN_NAMESPACE -Q_DECLARE_INTERFACE(EchoInterface, - "com.trolltech.Plugin.EchoInterface/1.0"); + +#define EchoInterface_iid "org.qt-project.Qt.Examples.EchoInterface" + +Q_DECLARE_INTERFACE(EchoInterface, EchoInterface_iid) QT_END_NAMESPACE //! [0] diff --git a/examples/tools/echoplugin/plugin/echoplugin.cpp b/examples/tools/echoplugin/plugin/echoplugin.cpp index d22e7ead23..07520899f5 100644 --- a/examples/tools/echoplugin/plugin/echoplugin.cpp +++ b/examples/tools/echoplugin/plugin/echoplugin.cpp @@ -48,7 +48,3 @@ QString EchoPlugin::echo(const QString &message) return message; } //! [0] - -//! [1] -Q_EXPORT_PLUGIN2(echoplugin, EchoPlugin); -//! [1] diff --git a/examples/tools/echoplugin/plugin/echoplugin.h b/examples/tools/echoplugin/plugin/echoplugin.h index d5e24b3b76..47373fc8cb 100644 --- a/examples/tools/echoplugin/plugin/echoplugin.h +++ b/examples/tools/echoplugin/plugin/echoplugin.h @@ -42,6 +42,7 @@ #define ECHOPLUGIN_H #include +#include #include "echoplugin.h" #include "echointerface.h" @@ -49,6 +50,7 @@ class EchoPlugin : public QObject, EchoInterface { Q_OBJECT + Q_PLUGIN_METADATA(IID "org.qt-project.Qt.Examples.EchoInterface" FILE "echoplugin.json") Q_INTERFACES(EchoInterface) public: diff --git a/examples/tools/echoplugin/plugin/echoplugin.json b/examples/tools/echoplugin/plugin/echoplugin.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/examples/tools/echoplugin/plugin/echoplugin.json @@ -0,0 +1 @@ +{} diff --git a/examples/tools/echoplugin/plugin/plugin.pro b/examples/tools/echoplugin/plugin/plugin.pro index 2be6de80d1..308c1b8236 100644 --- a/examples/tools/echoplugin/plugin/plugin.pro +++ b/examples/tools/echoplugin/plugin/plugin.pro @@ -4,6 +4,7 @@ CONFIG += plugin INCLUDEPATH += ../echowindow HEADERS = echoplugin.h SOURCES = echoplugin.cpp +OTHER_FILES += echoplugin.json TARGET = $$qtLibraryTarget(echoplugin) DESTDIR = ../plugins #! [0] -- cgit v1.2.3