mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge pull request #3711
Diadlo (1): fix(settings): Use old settings instead of default values
This commit is contained in:
commit
5a133b3962
|
@ -174,7 +174,7 @@ void Settings::loadGlobal()
|
||||||
s.beginGroup("General");
|
s.beginGroup("General");
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
// TODO: values in this block are moved -> remove in future
|
// TODO: values in this block are moved -> remove @ v1.8
|
||||||
enableIPv6 = s.value("enableIPv6", true).toBool();
|
enableIPv6 = s.value("enableIPv6", true).toBool();
|
||||||
makeToxPortable = s.value("makeToxPortable", false).toBool();
|
makeToxPortable = s.value("makeToxPortable", false).toBool();
|
||||||
forceTCP = s.value("forceTCP", false).toBool();
|
forceTCP = s.value("forceTCP", false).toBool();
|
||||||
|
@ -214,9 +214,11 @@ void Settings::loadGlobal()
|
||||||
|
|
||||||
s.beginGroup("Advanced");
|
s.beginGroup("Advanced");
|
||||||
{
|
{
|
||||||
makeToxPortable = s.value("makeToxPortable", false).toBool();
|
// TODO: Default values in this block should be changed @ v1.8
|
||||||
enableIPv6 = s.value("enableIPv6", true).toBool();
|
makeToxPortable = s.value("makeToxPortable", makeToxPortable).toBool();
|
||||||
forceTCP = s.value("forceTCP", false).toBool();
|
enableIPv6 = s.value("enableIPv6", enableIPv6).toBool();
|
||||||
|
forceTCP = s.value("forceTCP", forceTCP).toBool();
|
||||||
|
|
||||||
int type = s.value("dbSyncType", static_cast<int>(Db::syncType::stFull)).toInt();
|
int type = s.value("dbSyncType", static_cast<int>(Db::syncType::stFull)).toInt();
|
||||||
Db::syncType sType = static_cast<Db::syncType>(type);
|
Db::syncType sType = static_cast<Db::syncType>(type);
|
||||||
setDbSyncType(sType);
|
setDbSyncType(sType);
|
||||||
|
@ -233,12 +235,13 @@ void Settings::loadGlobal()
|
||||||
|
|
||||||
s.beginGroup("GUI");
|
s.beginGroup("GUI");
|
||||||
{
|
{
|
||||||
showWindow = s.value("showWindow", true).toBool();
|
// TODO: Default values in this block should be changed @ v1.8
|
||||||
showInFront = s.value("showInFront", false).toBool();
|
showWindow = s.value("showWindow", showWindow).toBool();
|
||||||
groupAlwaysNotify = s.value("groupAlwaysNotify", false).toBool();
|
showInFront = s.value("showInFront", showInFront).toBool();
|
||||||
groupchatPosition = s.value("groupchatPosition", true).toBool();
|
groupAlwaysNotify = s.value("groupAlwaysNotify", groupAlwaysNotify).toBool();
|
||||||
separateWindow = s.value("separateWindow", false).toBool();
|
groupchatPosition = s.value("groupchatPosition", groupchatPosition).toBool();
|
||||||
dontGroupWindows = s.value("dontGroupWindows", true).toBool();
|
separateWindow = s.value("separateWindow", separateWindow).toBool();
|
||||||
|
dontGroupWindows = s.value("dontGroupWindows", dontGroupWindows).toBool();
|
||||||
|
|
||||||
const QString DEFAULT_SMILEYS = ":/smileys/emojione/emoticons.xml";
|
const QString DEFAULT_SMILEYS = ":/smileys/emojione/emoticons.xml";
|
||||||
smileyPack = s.value("smileyPack", DEFAULT_SMILEYS).toString();
|
smileyPack = s.value("smileyPack", DEFAULT_SMILEYS).toString();
|
||||||
|
@ -406,7 +409,7 @@ void Settings::loadPersonal(Profile* profile)
|
||||||
}
|
}
|
||||||
ps.endGroup();
|
ps.endGroup();
|
||||||
|
|
||||||
// TODO: values in this group are moved -> remove in future
|
// TODO: values in this group are moved -> remove @ v1.8
|
||||||
ps.beginGroup("General");
|
ps.beginGroup("General");
|
||||||
{
|
{
|
||||||
compactLayout = ps.value("compactLayout", true).toBool();
|
compactLayout = ps.value("compactLayout", true).toBool();
|
||||||
|
@ -415,16 +418,17 @@ void Settings::loadPersonal(Profile* profile)
|
||||||
|
|
||||||
ps.beginGroup("GUI");
|
ps.beginGroup("GUI");
|
||||||
{
|
{
|
||||||
compactLayout = ps.value("compactLayout", true).toBool();
|
// TODO: Default values in this block should be changed @ v1.8
|
||||||
|
compactLayout = ps.value("compactLayout", compactLayout).toBool();
|
||||||
}
|
}
|
||||||
ps.endGroup();
|
ps.endGroup();
|
||||||
|
|
||||||
ps.beginGroup("Proxy");
|
ps.beginGroup("Proxy");
|
||||||
{
|
{
|
||||||
int type = ps.value("proxyType", static_cast<int>(ProxyType::ptNone)).toInt();
|
int type = ps.value("proxyType", static_cast<int>(getProxyType())).toInt();
|
||||||
setProxyType(static_cast<ProxyType>(type));
|
setProxyType(static_cast<ProxyType>(type));
|
||||||
proxyAddr = ps.value("proxyAddr", "").toString();
|
proxyAddr = ps.value("proxyAddr", proxyAddr).toString();
|
||||||
proxyPort = static_cast<quint16>(ps.value("proxyPort", 0).toUInt());
|
proxyPort = static_cast<quint16>(ps.value("proxyPort", proxyPort).toUInt());
|
||||||
}
|
}
|
||||||
ps.endGroup();
|
ps.endGroup();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user