summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-09-02 12:56:50 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2019-09-02 12:56:50 -0400
commitec3fb7b3509fb10a8a1392740e209509ae6c092c (patch)
treed420da96940d91d90363bc6ab71c4759fa837ae1 /src/mainwindow.cpp
parent57bef2ab8da5354cc65c3ad0e2cd86d75e1e8b94 (diff)
removed duplicate useProxy()
use dedicated functions to set, get or remove settings, allows for logging
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 4c2594b8..42b19cb7 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -2157,10 +2157,8 @@ void MainWindow::readSettings(const Settings& settings)
ui->displayCategoriesBtn->setChecked(v);
}
- if (auto v=settings.getUseProxy()) {
- if (*v) {
- activateProxy(true);
- }
+ if (settings.getUseProxy()) {
+ activateProxy(true);
}
}
@@ -5014,7 +5012,7 @@ void MainWindow::on_actionSettings_triggered()
QString oldProfilesDirectory(settings.getProfileDirectory());
QString oldManagedGameDirectory(settings.getManagedGameDirectory().value_or(""));
bool oldDisplayForeign(settings.displayForeign());
- bool proxy = settings.useProxy();
+ bool proxy = settings.getUseProxy();
DownloadManager *dlManager = m_OrganizerCore.downloadManager();
@@ -5081,8 +5079,8 @@ void MainWindow::on_actionSettings_triggered()
NexusInterface::instance(&m_PluginContainer)->setCacheDirectory(settings.getCacheDirectory());
}
- if (proxy != settings.useProxy()) {
- activateProxy(settings.useProxy());
+ if (proxy != settings.getUseProxy()) {
+ activateProxy(settings.getUseProxy());
}
ui->statusBar->checkSettings(m_OrganizerCore.settings());