summaryrefslogtreecommitdiffstats
path: root/message.h
diff options
context:
space:
mode:
authorRaquel Medina <raquel.medina@konsulko.com>2020-04-16 17:26:33 +0200
committerRaquel Medina <raquel.medina@konsulko.com>2020-04-16 17:45:00 +0200
commit257c3fbea9d995697206e88402bebe450b027d8a (patch)
treedc32085dd5cee751c6168179fc8b65af736dd271 /message.h
parente57b4f75b55c2befad4f9944f43c8aa2310321b7 (diff)
register with QMetaType
Register std::shared_ptr<Message> with QMetaType to allow for queued signal/slot connections across threads. This change is required for the library split where MessageEngine (signal source) will be part of a core library while the clients (slots) will be spread in different library binaries. TaskManager also requires this change, as it is already implemented in terms of a queued signal/slot connection across threads. Bug-AGL: SPEC-3112 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: I0f412e524c7321d35136860ae0d82c022f1c0d3f
Diffstat (limited to 'message.h')
-rw-r--r--message.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/message.h b/message.h
index 38936f3..acbbefd 100644
--- a/message.h
+++ b/message.h
@@ -17,6 +17,7 @@
#ifndef MESSAGE_H
#define MESSAGE_H
+#include <memory>
#include <QObject>
#include <QMap>
#include <QVariant>
@@ -65,5 +66,6 @@ class Message
bool m_init;
QJsonDocument m_jdoc;
};
+Q_DECLARE_METATYPE(std::shared_ptr<Message>)
#endif // MESSAGE_H