diff options
author | Saturneric <[email protected]> | 2022-05-19 19:02:22 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-05-19 19:02:22 +0000 |
commit | 6d2f0fec12c142cd378c5515091e1aa5b58597fd (patch) | |
tree | e4dcd5a3e93e6a28a058516e43f0986195bc2083 /src/ui/main_window/MainWindow.cpp | |
parent | pref: improve pch for compiling speed (diff) | |
download | GpgFrontend-6d2f0fec12c142cd378c5515091e1aa5b58597fd.tar.gz GpgFrontend-6d2f0fec12c142cd378c5515091e1aa5b58597fd.zip |
fix: adjust initialized order and organize
1. disable command line file arg input ability
Diffstat (limited to 'src/ui/main_window/MainWindow.cpp')
-rw-r--r-- | src/ui/main_window/MainWindow.cpp | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/ui/main_window/MainWindow.cpp b/src/ui/main_window/MainWindow.cpp index 368c5630..f4d2c7da 100644 --- a/src/ui/main_window/MainWindow.cpp +++ b/src/ui/main_window/MainWindow.cpp @@ -85,14 +85,6 @@ void MainWindow::Init() noexcept { restore_settings(); - // open filename if provided as first command line parameter - QStringList args = qApp->arguments(); - if (args.size() > 1) { - if (!args[1].startsWith("-")) { - if (QFile::exists(args[1])) - edit_->LoadFile(args[1]); - } - } edit_->CurTextPage()->setFocus(); auto &settings = GlobalSettingStation::GetInstance().GetUISettings(); @@ -147,7 +139,6 @@ void MainWindow::restore_settings() { LOG(INFO) << _("Called"); try { - LOG(INFO) << "restore settings main_windows_state"; SettingsObject main_windows_state("main_windows_state"); @@ -230,7 +221,6 @@ void MainWindow::restore_settings() { general.lookupValue("save_key_checked", save_key_checked); try { - LOG(INFO) << "restore settings default_key_checked"; // Checked Keys @@ -248,11 +238,6 @@ void MainWindow::restore_settings() { LOG(ERROR) << "restore default_key_checked failed"; } - LOG(INFO) << "restore settings smtp_passport"; - - SettingsObject smtp_passport("smtp_passport"); - smtp_passport.Check("enable", false); - prohibit_update_checking_ = false; try { prohibit_update_checking_ = @@ -267,6 +252,7 @@ void MainWindow::restore_settings() { } GlobalSettingStation::GetInstance().SyncSettings(); + LOG(INFO) << _("settings restored"); } void MainWindow::save_settings() { @@ -329,4 +315,4 @@ void MainWindow::closeEvent(QCloseEvent *event) { // GpgContext::GetInstance().clearPasswordCache(); } -} // namespace GpgFrontend::UI +} // namespace GpgFrontend::UI |