From 456d18b45a825a4d236ccc10c576da1fcbc4f74d Mon Sep 17 00:00:00 2001 From: Minijackson Date: Wed, 27 Jun 2018 19:03:26 +0200 Subject: Minor fixes --- common/storage/key.cpp | 2 +- tests/pipelinetest.cpp | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/common/storage/key.cpp b/common/storage/key.cpp index 5d26722..01a3e3a 100644 --- a/common/storage/key.cpp +++ b/common/storage/key.cpp @@ -70,7 +70,7 @@ QByteArray Identifier::toDisplayByteArray() const Identifier Identifier::fromDisplayByteArray(const QByteArray &bytes) { Q_ASSERT(bytes.size() == DISPLAY_REPR_SIZE); - return Identifier(QUuid::fromString(QString::fromUtf8(bytes))); + return Identifier(QUuid(bytes)); } // Revision diff --git a/tests/pipelinetest.cpp b/tests/pipelinetest.cpp index 2610305..b41a5c2 100644 --- a/tests/pipelinetest.cpp +++ b/tests/pipelinetest.cpp @@ -22,8 +22,6 @@ #include "adaptorfactoryregistry.h" #include "storage/key.h" -// TODO: fix test - static void removeFromDisk(const QString &name) { Sink::Storage::DataStore store(Sink::Store::storageLocation(), name, Sink::Storage::DataStore::ReadWrite); @@ -254,7 +252,6 @@ private slots: auto keys = getKeys(instanceIdentifier(), "event.main"); QCOMPARE(keys.size(), 1); auto key = Sink::Storage::Key::fromInternalByteArray(keys.first()); - //const auto uid = Sink::Storage::DataStore::uidFromKey(key); const auto uid = key.identifier().toDisplayByteArray(); // Execute the modification -- cgit v1.2.3