diff options
author | link2xt <link2xt@testrun.org> | 2021-03-13 18:53:09 +0300 |
---|---|---|
committer | link2xt <link2xt@testrun.org> | 2021-03-13 19:18:04 +0300 |
commit | 7f2395c2a4a57df5ff36231904be0a4464c53126 (patch) | |
tree | e3179aa6290aa215d1f37288b886ae2e22f54f24 | |
parent | 43da9dfecf0cf20ff0b4a85af729f2938ca772c8 (diff) | |
download | kdeltachat-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.
-rw-r--r-- | accounts.cpp | 4 |
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() |