diff options
Diffstat (limited to 'common/domain/applicationdomaintype.cpp')
-rw-r--r-- | common/domain/applicationdomaintype.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/common/domain/applicationdomaintype.cpp b/common/domain/applicationdomaintype.cpp index 42ae11a..c59a01e 100644 --- a/common/domain/applicationdomaintype.cpp +++ b/common/domain/applicationdomaintype.cpp | |||
@@ -31,12 +31,13 @@ namespace ApplicationDomain { | |||
31 | 31 | ||
32 | constexpr const char *Mail::ThreadId::name; | 32 | constexpr const char *Mail::ThreadId::name; |
33 | 33 | ||
34 | int foo = [] { | 34 | static const int foo = [] { |
35 | QMetaType::registerEqualsComparator<Reference>(); | 35 | QMetaType::registerEqualsComparator<Reference>(); |
36 | QMetaType::registerDebugStreamOperator<Reference>(); | 36 | QMetaType::registerDebugStreamOperator<Reference>(); |
37 | QMetaType::registerConverter<Reference, QByteArray>(); | 37 | QMetaType::registerConverter<Reference, QByteArray>(); |
38 | QMetaType::registerDebugStreamOperator<BLOB>(); | 38 | QMetaType::registerDebugStreamOperator<BLOB>(); |
39 | QMetaType::registerDebugStreamOperator<Mail::Contact>(); | 39 | QMetaType::registerDebugStreamOperator<Mail::Contact>(); |
40 | qRegisterMetaTypeStreamOperators<Sink::ApplicationDomain::Reference>(); | ||
40 | return 0; | 41 | return 0; |
41 | }(); | 42 | }(); |
42 | 43 | ||
@@ -395,3 +396,15 @@ bool isGlobalType(const QByteArray &type) { | |||
395 | } | 396 | } |
396 | } | 397 | } |
397 | 398 | ||
399 | QDataStream &operator<<(QDataStream &out, const Sink::ApplicationDomain::Reference &reference) | ||
400 | { | ||
401 | out << reference.value; | ||
402 | return out; | ||
403 | } | ||
404 | |||
405 | QDataStream &operator>>(QDataStream &in, Sink::ApplicationDomain::Reference &reference) | ||
406 | { | ||
407 | in >> reference.value; | ||
408 | return in; | ||
409 | } | ||
410 | |||