aboutsummaryrefslogtreecommitdiff
path: root/accounts.cpp
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>2021-03-13 18:53:09 +0300
committerlink2xt <link2xt@testrun.org>2021-03-13 19:18:04 +0300
commit7f2395c2a4a57df5ff36231904be0a4464c53126 (patch)
treee3179aa6290aa215d1f37288b886ae2e22f54f24 /accounts.cpp
parent43da9dfecf0cf20ff0b4a85af729f2938ca772c8 (diff)
downloadkdeltachat-7f2395c2a4a57df5ff36231904be0a4464c53126.tar.gz
kdeltachat-7f2395c2a4a57df5ff36231904be0a4464c53126.zip
Move database to ~/.config
This has the benefit of using absolute paths, which helps with QML objects that don't accept relative paths, such as MediaPlayer.
Diffstat (limited to 'accounts.cpp')
-rw-r--r--accounts.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/accounts.cpp b/accounts.cpp
index f1486b5..3662dcc 100644
--- a/accounts.cpp
+++ b/accounts.cpp
@@ -1,11 +1,13 @@
#include <QFile>
+#include <QStandardPaths>
#include "accounts.h"
DcAccounts::DcAccounts(QObject *parent)
: QObject(parent)
{
- m_accounts = dc_accounts_new("Qt", "./deltachat-data");
+ QString path = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/db";
+ m_accounts = dc_accounts_new("Qt", path.toUtf8().constData());
}
DcAccounts::~DcAccounts()