diff options
Diffstat (limited to 'common/domain/applicationdomaintype.cpp')
-rw-r--r-- | common/domain/applicationdomaintype.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/common/domain/applicationdomaintype.cpp b/common/domain/applicationdomaintype.cpp index 5cc89b3..c1ac7e8 100644 --- a/common/domain/applicationdomaintype.cpp +++ b/common/domain/applicationdomaintype.cpp | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "definitions.h" | 23 | #include "definitions.h" |
24 | #include "propertyregistry.h" | 24 | #include "propertyregistry.h" |
25 | #include "storage.h" //for generateUid() | 25 | #include "storage.h" //for generateUid() |
26 | #include "utils.h" //for generateUid() | ||
26 | #include <QFile> | 27 | #include <QFile> |
27 | 28 | ||
28 | QDebug Sink::ApplicationDomain::operator<< (QDebug d, const Sink::ApplicationDomain::Mail::Contact &c) | 29 | QDebug Sink::ApplicationDomain::operator<< (QDebug d, const Sink::ApplicationDomain::Mail::Contact &c) |
@@ -145,7 +146,7 @@ void copyBuffer(Sink::ApplicationDomain::BufferAdaptor &buffer, Sink::Applicatio | |||
145 | const auto value = buffer.getProperty(property); | 146 | const auto value = buffer.getProperty(property); |
146 | if (copyBlobs && value.canConvert<BLOB>()) { | 147 | if (copyBlobs && value.canConvert<BLOB>()) { |
147 | const auto oldPath = value.value<BLOB>().value; | 148 | const auto oldPath = value.value<BLOB>().value; |
148 | const auto newPath = Sink::temporaryFileLocation() + "/" + QUuid::createUuid().toString(); | 149 | const auto newPath = Sink::temporaryFileLocation() + "/" + createUuid(); |
149 | if (!QFile::copy(oldPath, newPath)) { | 150 | if (!QFile::copy(oldPath, newPath)) { |
150 | SinkWarning() << "Failed to copy file from: " << oldPath << "to: " << newPath; | 151 | SinkWarning() << "Failed to copy file from: " << oldPath << "to: " << newPath; |
151 | } | 152 | } |
@@ -257,7 +258,7 @@ QByteArray ApplicationDomainType::getBlobProperty(const QByteArray &key) const | |||
257 | 258 | ||
258 | void ApplicationDomainType::setBlobProperty(const QByteArray &key, const QByteArray &value) | 259 | void ApplicationDomainType::setBlobProperty(const QByteArray &key, const QByteArray &value) |
259 | { | 260 | { |
260 | const auto path = Sink::temporaryFileLocation() + "/" + QUuid::createUuid().toString(); | 261 | const auto path = Sink::temporaryFileLocation() + "/" + createUuid(); |
261 | QFile file(path); | 262 | QFile file(path); |
262 | if (!file.open(QIODevice::WriteOnly)) { | 263 | if (!file.open(QIODevice::WriteOnly)) { |
263 | SinkError() << "Failed to open the file for writing: " << file.errorString() << path << " For property " << key; | 264 | SinkError() << "Failed to open the file for writing: " << file.errorString() << path << " For property " << key; |