From 0e628290af2bd3cf35c322e22bf17bad59187ecf Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Tue, 19 Jan 2021 19:44:22 +0100 Subject: Write database to the DataLocation --- src/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index b1dfa9f6..a890a6fd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -93,9 +93,9 @@ screenCenter(int width, int height) } void -createCacheDirectory() +createStandardDirectory(QStandardPaths::StandardLocation path) { - auto dir = QStandardPaths::writableLocation(QStandardPaths::CacheLocation); + auto dir = QStandardPaths::writableLocation(path); if (!QDir().mkpath(dir)) { throw std::runtime_error( @@ -188,7 +188,8 @@ main(int argc, char *argv[]) http::init(); - createCacheDirectory(); + createStandardDirectory(QStandardPaths::CacheLocation); + createStandardDirectory(QStandardPaths::AppDataLocation); registerSignalHandlers(); -- cgit 1.5.1