From 4581d708ff6a218d790ce2b7c1e6e21ae6231778 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Wed, 6 Dec 2017 15:45:17 +0100 Subject: [PATCH] Account: remove dependency with ConfigFile Part of #6213 --- src/cmd/simplesslerrorhandler.cpp | 1 - src/gui/application.cpp | 1 + src/libsync/account.cpp | 5 ++--- src/libsync/capabilities.cpp | 2 -- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/cmd/simplesslerrorhandler.cpp b/src/cmd/simplesslerrorhandler.cpp index 43743850716..b25e9958fbd 100644 --- a/src/cmd/simplesslerrorhandler.cpp +++ b/src/cmd/simplesslerrorhandler.cpp @@ -11,7 +11,6 @@ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. */ -#include "configfile.h" #include "common/utility.h" #include "account.h" #include "simplesslerrorhandler.h" diff --git a/src/gui/application.cpp b/src/gui/application.cpp index 715e81e9a55..8f4b3f1ba4e 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -51,6 +51,7 @@ #include #include #include +#include class QSocket; diff --git a/src/libsync/account.cpp b/src/libsync/account.cpp index 674ab34f902..7907ea530d6 100644 --- a/src/libsync/account.cpp +++ b/src/libsync/account.cpp @@ -15,7 +15,6 @@ #include "account.h" #include "cookiejar.h" #include "networkjobs.h" -#include "configfile.h" #include "accessmanager.h" #include "creds/abstractcredentials.h" #include "capabilities.h" @@ -33,6 +32,7 @@ #include #include #include +#include namespace OCC { @@ -206,8 +206,7 @@ void Account::lendCookieJarTo(QNetworkAccessManager *guest) QString Account::cookieJarPath() { - ConfigFile cfg; - return cfg.configPath() + "/cookies" + id() + ".db"; + return QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + "/cookies" + id() + ".db"; } void Account::resetNetworkAccessManager() diff --git a/src/libsync/capabilities.cpp b/src/libsync/capabilities.cpp index fcf71b7e9aa..3334103733c 100644 --- a/src/libsync/capabilities.cpp +++ b/src/libsync/capabilities.cpp @@ -14,8 +14,6 @@ #include "capabilities.h" -#include "configfile.h" - #include namespace OCC {