summaryrefslogtreecommitdiffstats
path: root/common/storage_common.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/storage_common.cpp')
-rw-r--r--common/storage_common.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/common/storage_common.cpp b/common/storage_common.cpp
index f22150a..28fb4c2 100644
--- a/common/storage_common.cpp
+++ b/common/storage_common.cpp
@@ -93,4 +93,15 @@ bool Storage::isInternalKey(const QByteArray &key)
93 return key.startsWith(s_internalPrefix); 93 return key.startsWith(s_internalPrefix);
94} 94}
95 95
96QByteArray Storage::assembleKey(const QByteArray &key, qint64 revision)
97{
98 Q_ASSERT(key.size() == 38);
99 return key + QByteArray::number(revision);
100}
101
102QByteArray Storage::uidFromKey(const QByteArray &key)
103{
104 return key.mid(0, 38);
105}
106
96} // namespace Akonadi2 107} // namespace Akonadi2