summaryrefslogtreecommitdiffstats
path: root/common/definitions.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-08-31 13:57:25 -0600
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-08-31 13:57:25 -0600
commit4a1bcc63cd2919f74f29b41c7b000f80da7449f4 (patch)
treecb213c45c610bff106761bbc0d4117ba6c0f8bd1 /common/definitions.h
parentbbf14304d1112882c20f4ad3818712cdfecdedaa (diff)
downloadsink-4a1bcc63cd2919f74f29b41c7b000f80da7449f4.tar.gz
sink-4a1bcc63cd2919f74f29b41c7b000f80da7449f4.zip
Avoid non threadsafe initialization.
local static initialization is only threadsafe if initialized on construction. The other codepath is not threadsafe, but is only used in testcode.
Diffstat (limited to 'common/definitions.h')
-rw-r--r--common/definitions.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/common/definitions.h b/common/definitions.h
index ce9e794..7ef215b 100644
--- a/common/definitions.h
+++ b/common/definitions.h
@@ -25,10 +25,16 @@
25#include <QByteArray> 25#include <QByteArray>
26 26
27namespace Sink { 27namespace Sink {
28void SINK_EXPORT clearLocationCache();
29QString SINK_EXPORT storageLocation(); 28QString SINK_EXPORT storageLocation();
30QString SINK_EXPORT dataLocation(); 29QString SINK_EXPORT dataLocation();
31QString SINK_EXPORT configLocation(); 30QString SINK_EXPORT configLocation();
32QString SINK_EXPORT temporaryFileLocation(); 31QString SINK_EXPORT temporaryFileLocation();
33QString SINK_EXPORT resourceStorageLocation(const QByteArray &resourceInstanceIdentifier); 32QString SINK_EXPORT resourceStorageLocation(const QByteArray &resourceInstanceIdentifier);
33
34/**
35 * Clear the location cache and lookup locations again.
36 *
37 * Warning: Calling this results in non-threadsafe initialization, only use it in test-code.
38 */
39void SINK_EXPORT clearLocationCache();
34} 40}