summaryrefslogtreecommitdiffstats
path: root/examples/tools/echoplugin
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tools/echoplugin')
-rw-r--r--examples/tools/echoplugin/echowindow/echointerface.h6
-rw-r--r--examples/tools/echoplugin/plugin/echoplugin.cpp4
-rw-r--r--examples/tools/echoplugin/plugin/echoplugin.h2
-rw-r--r--examples/tools/echoplugin/plugin/echoplugin.json1
-rw-r--r--examples/tools/echoplugin/plugin/plugin.pro1
5 files changed, 8 insertions, 6 deletions
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 <QObject>
+#include <QtPlugin>
#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]