diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-04-10 10:55:56 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-04-10 10:55:56 +0200 |
commit | 5adfceae08872b9d7f143d8b9464578fb8e43a69 (patch) | |
tree | c57dd610148cc7c42ebbfd50490d71d94cfd3beb /common/store.cpp | |
parent | 6b5ec926275ec3d0431ce74c5c5af905f407aa24 (diff) | |
download | sink-5adfceae08872b9d7f143d8b9464578fb8e43a69.tar.gz sink-5adfceae08872b9d7f143d8b9464578fb8e43a69.zip |
Allow clients to request a temporary file for BLOB properties
Diffstat (limited to 'common/store.cpp')
-rw-r--r-- | common/store.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/store.cpp b/common/store.cpp index 4bf1c58..700263b 100644 --- a/common/store.cpp +++ b/common/store.cpp | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <QTime> | 23 | #include <QTime> |
24 | #include <QAbstractItemModel> | 24 | #include <QAbstractItemModel> |
25 | #include <QUuid> | ||
25 | #include <functional> | 26 | #include <functional> |
26 | #include <memory> | 27 | #include <memory> |
27 | 28 | ||
@@ -45,6 +46,11 @@ QString Store::storageLocation() | |||
45 | return Sink::storageLocation(); | 46 | return Sink::storageLocation(); |
46 | } | 47 | } |
47 | 48 | ||
49 | QString Store::getTemporaryFilePath() | ||
50 | { | ||
51 | return Sink::temporaryFileLocation() + "/" + QUuid::createUuid().toString(); | ||
52 | } | ||
53 | |||
48 | static QList<QByteArray> getResources(const QList<QByteArray> &resourceFilter, const QByteArray &type = QByteArray()) | 54 | static QList<QByteArray> getResources(const QList<QByteArray> &resourceFilter, const QByteArray &type = QByteArray()) |
49 | { | 55 | { |
50 | // Return the global resource (signified by an empty name) for types that don't belong to a specific resource | 56 | // Return the global resource (signified by an empty name) for types that don't belong to a specific resource |