summary refs log tree commit diff
diff options
context:
space:
mode:
authorLoren Burkholder <computersemiexpert@outlook.com>2021-02-04 19:01:48 -0500
committerLoren Burkholder <computersemiexpert@outlook.com>2021-02-04 19:01:48 -0500
commit343c9c811630b1321f3f15458c5c802d0c5094eb (patch)
tree2b8e6440a55c7426817e91eb7afe984a44efbceb
parentSet profile to "" if it's the default for compatibility (diff)
downloadnheko-343c9c811630b1321f3f15458c5c802d0c5094eb.tar.xz
Don't attempt to begin group ""
-rw-r--r--src/ChatPage.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp
index ac327b82..d8907740 100644
--- a/src/ChatPage.cpp
+++ b/src/ChatPage.cpp
@@ -449,12 +449,14 @@ ChatPage::deleteConfigs()
 {
         QSettings settings;
 
-        QString profilePrefix = (UserSettings::instance()->profile() == "default" ? "" : QString("profile/%1").arg(UserSettings::instance()->profile()));
-        settings.beginGroup(profilePrefix);
+        if (UserSettings::instance()->profile() != "")
+        {
+            settings.beginGroup("profile");
+            settings.beginGroup(UserSettings::instance()->profile());
+        }
         settings.beginGroup("auth");
         settings.remove("");
         settings.endGroup(); // auth
-        settings.endGroup(); // profilePrefix
 
         http::client()->shutdown();
         cache::deleteData();