diff options
Diffstat (limited to 'common/definitions.cpp')
-rw-r--r-- | common/definitions.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/common/definitions.cpp b/common/definitions.cpp index 362faf7..3fc4700 100644 --- a/common/definitions.cpp +++ b/common/definitions.cpp | |||
@@ -25,12 +25,22 @@ | |||
25 | 25 | ||
26 | QString Sink::storageLocation() | 26 | QString Sink::storageLocation() |
27 | { | 27 | { |
28 | return QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/sink/storage"; | 28 | return dataLocation() + "/storage"; |
29 | } | ||
30 | |||
31 | QString Sink::dataLocation() | ||
32 | { | ||
33 | return QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/sink"; | ||
34 | } | ||
35 | |||
36 | QString Sink::configLocation() | ||
37 | { | ||
38 | return QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + "/sink"; | ||
29 | } | 39 | } |
30 | 40 | ||
31 | QString Sink::temporaryFileLocation() | 41 | QString Sink::temporaryFileLocation() |
32 | { | 42 | { |
33 | auto path = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/sink/temporaryFiles"; | 43 | auto path = dataLocation() + "/temporaryFiles"; |
34 | //FIXME create in a singleton on startup? | 44 | //FIXME create in a singleton on startup? |
35 | QDir dir; | 45 | QDir dir; |
36 | dir.mkpath(path); | 46 | dir.mkpath(path); |