diff options
author | saturneric <[email protected]> | 2024-01-16 16:54:18 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-16 16:54:18 +0000 |
commit | 394e28ec525077f07ae578161220b3cfafb65591 (patch) | |
tree | 4577dac5ebb3adf93b7e80cb7c23d27fc84eb982 /src/ui/UserInterfaceUtils.cpp | |
parent | refactor: remove libgettext from project (diff) | |
download | GpgFrontend-394e28ec525077f07ae578161220b3cfafb65591.tar.gz GpgFrontend-394e28ec525077f07ae578161220b3cfafb65591.zip |
fix: slove some issues and update translations
Diffstat (limited to 'src/ui/UserInterfaceUtils.cpp')
-rw-r--r-- | src/ui/UserInterfaceUtils.cpp | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/ui/UserInterfaceUtils.cpp b/src/ui/UserInterfaceUtils.cpp index 8f7b07b4..8c928f30 100644 --- a/src/ui/UserInterfaceUtils.cpp +++ b/src/ui/UserInterfaceUtils.cpp @@ -35,7 +35,6 @@ #include <vector> #include "core/GpgConstants.h" -#include "core/function/CacheManager.h" #include "core/function/CoreSignalStation.h" #include "core/function/gpg/GpgKeyGetter.h" #include "core/model/GpgImportInformation.h" @@ -94,12 +93,13 @@ void import_unknown_key_from_keyserver( void refresh_info_board(InfoBoardWidget *info_board, int status, const QString &report_text) { - if (status < 0) + if (status < 0) { info_board->SlotRefresh(report_text, INFO_ERROR_CRITICAL); - else if (status > 0) + } else if (status > 0) { info_board->SlotRefresh(report_text, INFO_ERROR_OK); - else + } else { info_board->SlotRefresh(report_text, INFO_ERROR_WARN); + } } void process_result_analyse(TextEdit *edit, InfoBoardWidget *info_board, @@ -149,7 +149,7 @@ void process_operation(QWidget *parent, const QString &waiting_title, looper.exec(); } -CommonUtils *CommonUtils::GetInstance() { +auto CommonUtils::GetInstance() -> CommonUtils * { if (instance_ == nullptr) { instance_ = std::make_unique<CommonUtils>(); } @@ -242,17 +242,6 @@ void CommonUtils::WaitForOpera(QWidget *parent, }); }); - // handling timeout, default 30s - QTimer::singleShot(30000, parent, [parent, dialog]() { - if (dialog != nullptr) { - dialog->close(); - dialog->reject(); - - QMessageBox::critical(parent, tr("Timeout"), - tr("Operation has timeout, aborted...")); - } - }); - looper.exec(); } |