Browse Source

Added Q_DECLARE_METATYPE to plugin classes.

Sascha Zelzer 14 years ago
parent
commit
6fb5c0aae3

+ 3 - 0
Libs/PluginFramework/ctkPluginFrameworkEvent.h

@@ -24,6 +24,7 @@
 
 #include <QSharedDataPointer>
 #include <QSharedPointer>
+#include <QMetaType>
 
 #include "ctkPluginFrameworkExport.h"
 
@@ -190,6 +191,8 @@ public:
   Type getType() const;
 };
 
+Q_DECLARE_METATYPE(ctkPluginFrameworkEvent);
+
 CTK_PLUGINFW_EXPORT QDebug operator<<(QDebug dbg, ctkPluginFrameworkEvent::Type type);
 CTK_PLUGINFW_EXPORT QDebug operator<<(QDebug dbg, const ctkPluginFrameworkEvent& event);
 

+ 3 - 0
Libs/PluginFramework/ctkServiceEvent.h

@@ -24,6 +24,7 @@
 
 #include <QSharedDataPointer>
 #include <QDebug>
+#include <QMetaType>
 
 #include "ctkPluginFrameworkExport.h"
 
@@ -156,6 +157,8 @@ public:
 
 };
 
+Q_DECLARE_METATYPE(ctkServiceEvent)
+
 CTK_PLUGINFW_EXPORT QDebug operator<<(QDebug dbg, ctkServiceEvent::Type type);
 CTK_PLUGINFW_EXPORT QDebug operator<<(QDebug dbg, const ctkServiceEvent& event);
 

+ 3 - 0
Libs/PluginFramework/ctkServiceReference.h

@@ -23,6 +23,7 @@
 #define CTKSERVICEREFERENCE_H
 
 #include <QVariant>
+#include <QMetaType>
 
 #include "ctkPlugin.h"
 
@@ -209,5 +210,7 @@ protected:
 uint CTK_PLUGINFW_EXPORT qHash(const ctkServiceReference& serviceRef);
 QDebug CTK_PLUGINFW_EXPORT operator<<(QDebug dbg, const ctkServiceReference& serviceRef);
 
+Q_DECLARE_METATYPE(ctkServiceReference)
+
 
 #endif // CTKSERVICEREFERENCE_H

+ 3 - 0
Libs/PluginFramework/service/log/ctkLogEntry.h

@@ -25,6 +25,7 @@
 
 #include <QSharedPointer>
 #include <QDateTime>
+#include <QMetaType>
 
 #include <ctkServiceReference.h>
 #include <ctkRuntimeException.h>
@@ -145,4 +146,6 @@ struct ctkLogEntry
 
 typedef QSharedPointer<ctkLogEntry> ctkLogEntryPtr;
 
+Q_DECLARE_METATYPE(ctkLogEntryPtr)
+
 #endif // CTKLOGENTRY_H