diff options
author | Saturneric <[email protected]> | 2022-01-04 15:49:00 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-01-04 15:49:00 +0000 |
commit | 952d0424ab1a130d4365bd9995b03a9fc1ddd81b (patch) | |
tree | 4c5e5d3b7b41a3e3ac1da007c47a0189e0e1df0f /src/ui/MainWindow.cpp | |
parent | <feature, fix, refactor>(core, ui): fixed known bugs for v2.0.4-beta.1 and ad... (diff) | |
download | GpgFrontend-952d0424ab1a130d4365bd9995b03a9fc1ddd81b.tar.gz GpgFrontend-952d0424ab1a130d4365bd9995b03a9fc1ddd81b.zip |
<fix, refactor>(core, ui): fixed known bugs for v2.0.4-beta.1.
1. fixed proxy settings ui.
2. fixed send mail settings ui.
3. fixed uncaught exception handling.
Diffstat (limited to 'src/ui/MainWindow.cpp')
-rw-r--r-- | src/ui/MainWindow.cpp | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/ui/MainWindow.cpp b/src/ui/MainWindow.cpp index 44d8103d..2af6da78 100644 --- a/src/ui/MainWindow.cpp +++ b/src/ui/MainWindow.cpp @@ -116,16 +116,20 @@ void MainWindow::init() noexcept { emit loaded(); + // if not prohibit update checking + if (!prohibit_update_checking_) { #ifdef RELEASE - auto version_thread = new VersionCheckThread(); + auto version_thread = new VersionCheckThread(); - connect(version_thread, SIGNAL(finished()), version_thread, - SLOT(deleteLater())); - connect(version_thread, &VersionCheckThread::upgradeVersion, this, - &MainWindow::slotVersionUpgrade); + connect(version_thread, SIGNAL(finished()), version_thread, + SLOT(deleteLater())); + connect(version_thread, &VersionCheckThread::upgradeVersion, this, + &MainWindow::slotVersionUpgrade); - version_thread->start(); + version_thread->start(); #endif + } + } catch (...) { LOG(FATAL) << _("Critical error occur while loading GpgFrontend."); QMessageBox::critical(nullptr, _("Loading Failed"), @@ -301,6 +305,15 @@ void MainWindow::restoreSettings() { smtp.add("enable", libconfig::Setting::TypeBoolean) = true; } + prohibit_update_checking_ = false; + try { + prohibit_update_checking_ = + settings.lookup("network.prohibit_update_checking"); + } catch (...) { + LOG(ERROR) << _("Setting Operation Error") + << _("prohibit_update_checking"); + } + } catch (...) { LOG(ERROR) << "cannot resolve settings"; } |