diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-05 21:32:21 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-06-05 21:32:21 +0200 |
commit | 2d8f8861eeb1c7b5888a65ab07d51b0419feeb3e (patch) | |
tree | 10ceae2a5c7a85ba02ca2d9b603e2cabea37aba4 /common/domain | |
parent | 4d4028af66144535634ec8c9c4aa229758b57372 (diff) | |
download | sink-2d8f8861eeb1c7b5888a65ab07d51b0419feeb3e.tar.gz sink-2d8f8861eeb1c7b5888a65ab07d51b0419feeb3e.zip |
A central place to generate uuid's
Diffstat (limited to 'common/domain')
-rw-r--r-- | common/domain/applicationdomaintype.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h index c022cb4..a41882d 100644 --- a/common/domain/applicationdomaintype.h +++ b/common/domain/applicationdomaintype.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <QDebug> | 27 | #include <QDebug> |
28 | #include <QUuid> | 28 | #include <QUuid> |
29 | #include "bufferadaptor.h" | 29 | #include "bufferadaptor.h" |
30 | #include "storage.h" //for generateUid() | ||
30 | 31 | ||
31 | #define SINK_ENTITY(TYPE) \ | 32 | #define SINK_ENTITY(TYPE) \ |
32 | typedef QSharedPointer<TYPE> Ptr; \ | 33 | typedef QSharedPointer<TYPE> Ptr; \ |
@@ -105,7 +106,7 @@ public: | |||
105 | static DomainType createEntity() | 106 | static DomainType createEntity() |
106 | { | 107 | { |
107 | DomainType object; | 108 | DomainType object; |
108 | object.mIdentifier = QUuid::createUuid().toByteArray(); | 109 | object.mIdentifier = Sink::Storage::generateUid(); |
109 | return object; | 110 | return object; |
110 | } | 111 | } |
111 | 112 | ||
@@ -113,7 +114,7 @@ public: | |||
113 | static DomainType createEntity(const QByteArray &resourceInstanceIdentifier) | 114 | static DomainType createEntity(const QByteArray &resourceInstanceIdentifier) |
114 | { | 115 | { |
115 | DomainType object(resourceInstanceIdentifier); | 116 | DomainType object(resourceInstanceIdentifier); |
116 | object.mIdentifier = QUuid::createUuid().toByteArray(); | 117 | object.mIdentifier = Sink::Storage::generateUid(); |
117 | return object; | 118 | return object; |
118 | } | 119 | } |
119 | 120 | ||