Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(settings): Added loader for old settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Diadlo committed Aug 26, 2016
1 parent 61f81b8 commit 740d91b
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/persistence/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ void Settings::loadGlobal()

QSettings s(filePath, QSettings::IniFormat);
s.setIniCodec("UTF-8");

s.beginGroup("Login");
{
autoLogin = s.value("autoLogin", false).toBool();
Expand Down Expand Up @@ -169,6 +170,22 @@ void Settings::loadGlobal()

s.beginGroup("General");
{
{
// TODO: values in this block are moved -> remove in future
enableIPv6 = s.value("enableIPv6", true).toBool();
makeToxPortable = s.value("makeToxPortable", false).toBool();
forceTCP = s.value("forceTCP", false).toBool();
proxyType = static_cast<ProxyType>(s.value("proxyType", 0).toInt());
proxyAddr = s.value("proxyAddr", "").toString();
proxyPort = static_cast<quint16>(s.value("proxyPort", 0).toUInt());
showWindow = s.value("showWindow", true).toBool();
showInFront = s.value("showInFront", false).toBool();
groupAlwaysNotify = s.value("groupAlwaysNotify", false).toBool();
separateWindow = s.value("separateWindow", false).toBool();
dontGroupWindows = s.value("dontGroupWindows", true).toBool();
groupchatPosition = s.value("groupchatPosition", true).toBool();
}

translation = s.value("translation", "en").toString();
showSystemTray = s.value("showSystemTray", true).toBool();
autostartInTray = s.value("autostartInTray", false).toBool();
Expand Down Expand Up @@ -386,6 +403,13 @@ void Settings::loadPersonal(Profile* profile)
}
ps.endGroup();

// TODO: values in this group are moved -> remove in future
ps.beginGroup("General");
{
compactLayout = ps.value("compactLayout", true).toBool();
}
ps.endGroup();

ps.beginGroup("GUI");
{
compactLayout = ps.value("compactLayout", true).toBool();
Expand Down

0 comments on commit 740d91b

Please sign in to comment.