diff options
author | Minijackson <minijackson@riseup.net> | 2018-07-19 10:08:39 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2018-07-19 10:08:39 +0200 |
commit | 0e54657272477ad779cc5c0e3f843b9f01b5e928 (patch) | |
tree | 886d026d9de3bd83fcf2656fafa36ad5a9e64268 /common/storage/key.cpp | |
parent | 27a408876e179d62dc25050a6f386bf2d9b80a9b (diff) | |
download | sink-0e54657272477ad779cc5c0e3f843b9f01b5e928.tar.gz sink-0e54657272477ad779cc5c0e3f843b9f01b5e928.zip |
Default constructor of Identifier produces null + safety net
Diffstat (limited to 'common/storage/key.cpp')
-rw-r--r-- | common/storage/key.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/storage/key.cpp b/common/storage/key.cpp index 01a3e3a..4dacca2 100644 --- a/common/storage/key.cpp +++ b/common/storage/key.cpp | |||
@@ -46,8 +46,14 @@ QDebug &operator<<(QDebug &dbg, const Key &key) | |||
46 | 46 | ||
47 | // Identifier | 47 | // Identifier |
48 | 48 | ||
49 | Identifier Identifier::createIdentifier() | ||
50 | { | ||
51 | return Identifier(QUuid::createUuid()); | ||
52 | } | ||
53 | |||
49 | QByteArray Identifier::toInternalByteArray() const | 54 | QByteArray Identifier::toInternalByteArray() const |
50 | { | 55 | { |
56 | Q_ASSERT(!uid.isNull()); | ||
51 | return uid.toRfc4122(); | 57 | return uid.toRfc4122(); |
52 | } | 58 | } |
53 | 59 | ||