From c16b34c3612049d41edf18cb533dbfc3b9b427a2 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Mon, 23 Jul 2018 10:37:56 +0200 Subject: Convert selection in Reduce filter in datastorequery --- common/storage/key.cpp | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'common/storage/key.cpp') diff --git a/common/storage/key.cpp b/common/storage/key.cpp index 4dacca2..cfeb016 100644 --- a/common/storage/key.cpp +++ b/common/storage/key.cpp @@ -79,6 +79,21 @@ Identifier Identifier::fromDisplayByteArray(const QByteArray &bytes) return Identifier(QUuid(bytes)); } +bool Identifier::isNull() const +{ + return uid.isNull(); +} + +bool Identifier::operator==(const Identifier &other) const +{ + return uid == other.uid; +} + +bool Identifier::operator!=(const Identifier &other) const +{ + return !(*this == other); +} + // Revision QByteArray Revision::toInternalByteArray() const @@ -113,6 +128,16 @@ qint64 Revision::toQint64() const return rev; } +bool Revision::operator==(const Revision &other) const +{ + return rev == other.rev; +} + +bool Revision::operator!=(const Revision &other) const +{ + return !(*this == other); +} + // Key QByteArray Key::toInternalByteArray() const @@ -160,3 +185,19 @@ void Key::setRevision(const Revision &newRev) { rev = newRev; } + +bool Key::isNull() const +{ + return id.isNull(); +} + +bool Key::operator==(const Key &other) const +{ + return (id == other.id) && (rev == other.rev); +} + +bool Key::operator!=(const Key &other) const +{ + return !(*this == other); +} + -- cgit v1.2.3