summaryrefslogtreecommitdiffstats
path: root/common/typeindex.cpp
diff options
context:
space:
mode:
authorRémi Nicole <nicole@kolabsystems.com>2018-07-27 13:32:39 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-27 13:47:43 +0200
commitd1838e575baeb6cd08011645609516acbdabd6c8 (patch)
tree035b99a4d324231c8c44e0e97905383266bacba6 /common/typeindex.cpp
parent1855b8356e4c427efdba4c932fa9f984e6ae5a43 (diff)
downloadsink-d1838e575baeb6cd08011645609516acbdabd6c8.tar.gz
sink-d1838e575baeb6cd08011645609516acbdabd6c8.zip
New Key API in storage layer
Summary: - Use object oriented paradigm for Keys / Identifiers /Revisions - "Compress" keys by using byte representation of Uuids - Still some cleaning left to do - Also run some benchmarks - I'm questioning whether files other than entitystore (tests excluded) are allowed to access this API Reviewers: cmollekopf Reviewed By: cmollekopf Tags: #sink Differential Revision: https://phabricator.kde.org/D13735
Diffstat (limited to 'common/typeindex.cpp')
-rw-r--r--common/typeindex.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/common/typeindex.cpp b/common/typeindex.cpp
index b18791f..0b78d59 100644
--- a/common/typeindex.cpp
+++ b/common/typeindex.cpp
@@ -25,8 +25,6 @@
25#include <QDateTime> 25#include <QDateTime>
26#include <QDataStream> 26#include <QDataStream>
27 27
28#include <cmath>
29
30using namespace Sink; 28using namespace Sink;
31 29
32static QByteArray getByteArray(const QVariant &value) 30static QByteArray getByteArray(const QVariant &value)
@@ -53,13 +51,6 @@ static QByteArray getByteArray(const QVariant &value)
53 return "toplevel"; 51 return "toplevel";
54} 52}
55 53
56template <typename T>
57static QByteArray padNumber(T number)
58{
59 static T uint_num_digits = (T)std::log10(std::numeric_limits<T>::max()) + 1;
60 return QByteArray::number(number).rightJustified(uint_num_digits, '0');
61}
62
63static QByteArray toSortableByteArrayImpl(const QDateTime &date) 54static QByteArray toSortableByteArrayImpl(const QDateTime &date)
64{ 55{
65 // Sort invalid last 56 // Sort invalid last