Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2021-05-31 14:17:10 +0300
committerHannah von Reth <vonreth@kde.org>2021-06-15 14:24:40 +0300
commit81d945e696b5e27e3d51ab69e57dfdf2dd61f956 (patch)
tree5d97ef599409822c5c2bc7487983c0c2f8aa09a3 /src/gui/application.cpp
parent412e077d100beb1276f65649246820a771c02fa8 (diff)
Fix migration of settings
Don't initialize a settings object just to check whether the file exists. Fixes: https://github.com/owncloud/enterprise/issues/4597
Diffstat (limited to 'src/gui/application.cpp')
-rw-r--r--src/gui/application.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/application.cpp b/src/gui/application.cpp
index 7cdbecd66..d11fd5876 100644
--- a/src/gui/application.cpp
+++ b/src/gui/application.cpp
@@ -205,7 +205,7 @@ Application::Application(int &argc, char **argv)
setApplicationName(_theme->appName());
setWindowIcon(_theme->applicationIcon());
- if (!ConfigFile().exists()) {
+ if (!ConfigFile::exists()) {
// Migrate from version <= 2.4
setApplicationName(_theme->appNameGUI());
// We need to use the deprecated QDesktopServices::storageLocation because of its Qt4
@@ -214,7 +214,7 @@ Application::Application(int &argc, char **argv)
if (oldDir.endsWith('/')) oldDir.chop(1); // macOS 10.11.x does not like trailing slash for rename/move.
setApplicationName(_theme->appName());
if (QFileInfo(oldDir).isDir()) {
- auto confDir = ConfigFile().configPath();
+ auto confDir = ConfigFile::configPath();
if (confDir.endsWith('/')) confDir.chop(1); // macOS 10.11.x does not like trailing slash for rename/move.
qCInfo(lcApplication) << "Migrating old config from" << oldDir << "to" << confDir;
@@ -309,7 +309,7 @@ Application::Application(int &argc, char **argv)
tr("Error accessing the configuration file"),
tr("There was an error while accessing the configuration "
"file at %1.")
- .arg(ConfigFile().configFile()),
+ .arg(ConfigFile::configFile()),
tr("Quit ownCloud"));
QTimer::singleShot(0, qApp, SLOT(quit()));
return;