diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/domain/applicationdomaintype.cpp | 15 | ||||
-rw-r--r-- | common/domain/applicationdomaintype.h | 2 |
2 files changed, 16 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 | |||
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index 1848224..b4d6f8a 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h | |||
@@ -502,6 +502,8 @@ class SINK_EXPORT TypeImplementation; | |||
502 | REGISTER_TYPE(Sink::ApplicationDomain::SinkAccount); \ | 502 | REGISTER_TYPE(Sink::ApplicationDomain::SinkAccount); \ |
503 | REGISTER_TYPE(Sink::ApplicationDomain::Identity); \ | 503 | REGISTER_TYPE(Sink::ApplicationDomain::Identity); \ |
504 | 504 | ||
505 | QDataStream & SINK_EXPORT operator<<(QDataStream &out, const Sink::ApplicationDomain::Reference &reference); | ||
506 | QDataStream & SINK_EXPORT operator>>(QDataStream &in, Sink::ApplicationDomain::Reference &reference); | ||
505 | 507 | ||
506 | Q_DECLARE_METATYPE(Sink::ApplicationDomain::ApplicationDomainType) | 508 | Q_DECLARE_METATYPE(Sink::ApplicationDomain::ApplicationDomainType) |
507 | Q_DECLARE_METATYPE(Sink::ApplicationDomain::ApplicationDomainType::Ptr) | 509 | Q_DECLARE_METATYPE(Sink::ApplicationDomain::ApplicationDomainType::Ptr) |