From 7f2395c2a4a57df5ff36231904be0a4464c53126 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 13 Mar 2021 18:53:09 +0300 Subject: 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. --- accounts.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/accounts.cpp b/accounts.cpp index f1486b5..3662dcc 100644 --- a/accounts.cpp +++ b/accounts.cpp @@ -1,11 +1,13 @@ #include +#include #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() -- cgit v1.2.3-70-g09d2