diff options
Diffstat (limited to 'common/resourcecontrol.cpp')
-rw-r--r-- | common/resourcecontrol.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/resourcecontrol.cpp b/common/resourcecontrol.cpp index a69b7fa..678e6c0 100644 --- a/common/resourcecontrol.cpp +++ b/common/resourcecontrol.cpp | |||
@@ -21,7 +21,6 @@ | |||
21 | #include "resourcecontrol.h" | 21 | #include "resourcecontrol.h" |
22 | 22 | ||
23 | #include <QTime> | 23 | #include <QTime> |
24 | #include <QUuid> | ||
25 | #include <functional> | 24 | #include <functional> |
26 | 25 | ||
27 | #include "resourceaccess.h" | 26 | #include "resourceaccess.h" |
@@ -29,6 +28,7 @@ | |||
29 | #include "commands.h" | 28 | #include "commands.h" |
30 | #include "log.h" | 29 | #include "log.h" |
31 | #include "notifier.h" | 30 | #include "notifier.h" |
31 | #include "utils.h" | ||
32 | 32 | ||
33 | namespace Sink { | 33 | namespace Sink { |
34 | 34 | ||
@@ -96,7 +96,7 @@ KAsync::Job<void> ResourceControl::flush(Flush::FlushType type, const QByteArray | |||
96 | { | 96 | { |
97 | auto resourceAccess = ResourceAccessFactory::instance().getAccess(resourceIdentifier, ResourceConfig::getResourceType(resourceIdentifier)); | 97 | auto resourceAccess = ResourceAccessFactory::instance().getAccess(resourceIdentifier, ResourceConfig::getResourceType(resourceIdentifier)); |
98 | auto notifier = QSharedPointer<Sink::Notifier>::create(resourceAccess); | 98 | auto notifier = QSharedPointer<Sink::Notifier>::create(resourceAccess); |
99 | auto id = QUuid::createUuid().toByteArray(); | 99 | auto id = createUuid(); |
100 | return KAsync::start<void>([=](KAsync::Future<void> &future) { | 100 | return KAsync::start<void>([=](KAsync::Future<void> &future) { |
101 | SinkTrace() << "Waiting for flush completion notification " << id; | 101 | SinkTrace() << "Waiting for flush completion notification " << id; |
102 | notifier->registerHandler([&future, id](const Notification ¬ification) { | 102 | notifier->registerHandler([&future, id](const Notification ¬ification) { |
@@ -140,7 +140,7 @@ KAsync::Job<void> ResourceControl::inspect(const Inspection &inspectionCommand) | |||
140 | auto resourceIdentifier = inspectionCommand.resourceIdentifier; | 140 | auto resourceIdentifier = inspectionCommand.resourceIdentifier; |
141 | auto resourceAccess = ResourceAccessFactory::instance().getAccess(resourceIdentifier, ResourceConfig::getResourceType(resourceIdentifier)); | 141 | auto resourceAccess = ResourceAccessFactory::instance().getAccess(resourceIdentifier, ResourceConfig::getResourceType(resourceIdentifier)); |
142 | auto notifier = QSharedPointer<Sink::Notifier>::create(resourceAccess); | 142 | auto notifier = QSharedPointer<Sink::Notifier>::create(resourceAccess); |
143 | auto id = QUuid::createUuid().toByteArray(); | 143 | auto id = createUuid(); |
144 | return KAsync::start<void>([=](KAsync::Future<void> &future) { | 144 | return KAsync::start<void>([=](KAsync::Future<void> &future) { |
145 | notifier->registerHandler([&future, id](const Notification ¬ification) { | 145 | notifier->registerHandler([&future, id](const Notification ¬ification) { |
146 | if (notification.id == id) { | 146 | if (notification.id == id) { |