summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/plugin/qpluginloader
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/plugin/qpluginloader')
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp2
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h2
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/empty.json1
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h8
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp3
-rw-r--r--tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h2
6 files changed, 12 insertions, 6 deletions
diff --git a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp
index 4b2057087a..eaad3ceff5 100644
--- a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp
+++ b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.cpp
@@ -47,5 +47,3 @@ QString AlmostPlugin::pluginName() const
unresolvedSymbol();
return QLatin1String("Plugin ok");
}
-
-Q_EXPORT_PLUGIN2(almostplugin, AlmostPlugin)
diff --git a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h
index 6658a5be8d..d64f5985ec 100644
--- a/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h
+++ b/tests/auto/corelib/plugin/qpluginloader/almostplugin/almostplugin.h
@@ -42,11 +42,13 @@
#define ALMOSTPLUGIN_H
#include <QObject>
+#include <QtPlugin>
#include "../theplugin/plugininterface.h"
class AlmostPlugin : public QObject, public PluginInterface
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.autotests.plugininterface" FILE "../empty.json")
Q_INTERFACES(PluginInterface)
public:
diff --git a/tests/auto/corelib/plugin/qpluginloader/empty.json b/tests/auto/corelib/plugin/qpluginloader/empty.json
new file mode 100644
index 0000000000..0967ef424b
--- /dev/null
+++ b/tests/auto/corelib/plugin/qpluginloader/empty.json
@@ -0,0 +1 @@
+{}
diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h b/tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h
index a568dd118d..fe0892c0fe 100644
--- a/tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h
+++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/plugininterface.h
@@ -41,13 +41,19 @@
#ifndef PLUGININTERFACE_H
#define PLUGININTERFACE_H
+#include <QtCore/QtGlobal>
+
struct PluginInterface {
virtual ~PluginInterface() {}
virtual QString pluginName() const = 0;
};
QT_BEGIN_NAMESPACE
-Q_DECLARE_INTERFACE(PluginInterface, "com.trolltect.autotests.plugininterface/1.0")
+
+#define PluginInterface_iid "org.qt-project.Qt.autotests.plugininterface"
+
+Q_DECLARE_INTERFACE(PluginInterface, PluginInterface_iid)
+
QT_END_NAMESPACE
#endif // PLUGININTERFACE_H
diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp
index b064901a4d..8c97956a5f 100644
--- a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp
+++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.cpp
@@ -46,6 +46,3 @@ QString ThePlugin::pluginName() const
{
return QLatin1String("Plugin ok");
}
-
-Q_EXPORT_PLUGIN2(theplugin, ThePlugin)
-
diff --git a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h
index b769aa6eed..3b8f12140e 100644
--- a/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h
+++ b/tests/auto/corelib/plugin/qpluginloader/theplugin/theplugin.h
@@ -42,11 +42,13 @@
#define THEPLUGIN_H
#include <QObject>
+#include <QtPlugin>
#include "plugininterface.h"
class ThePlugin : public QObject, public PluginInterface
{
Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.autotests.plugininterface" FILE "../empty.json")
Q_INTERFACES(PluginInterface)
public: