diff options
author | saturneric <[email protected]> | 2023-12-24 10:16:45 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2023-12-24 10:16:45 +0000 |
commit | e52215cd31237bcfe343754bdfcfdde65e804432 (patch) | |
tree | 91c4bbbe5d86ffaddd6f111bfa6e27aff1b644a0 /src/ui/UserInterfaceUtils.cpp | |
parent | fix: test the encrypt async api on gui app (diff) | |
download | GpgFrontend-e52215cd31237bcfe343754bdfcfdde65e804432.tar.gz GpgFrontend-e52215cd31237bcfe343754bdfcfdde65e804432.zip |
fix: use the new async encrypt symmetric api at gui app
Diffstat (limited to 'src/ui/UserInterfaceUtils.cpp')
-rw-r--r-- | src/ui/UserInterfaceUtils.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/ui/UserInterfaceUtils.cpp b/src/ui/UserInterfaceUtils.cpp index 838e4fbe..81627ee8 100644 --- a/src/ui/UserInterfaceUtils.cpp +++ b/src/ui/UserInterfaceUtils.cpp @@ -232,14 +232,15 @@ void CommonUtils::WaitForOpera(QWidget *parent, new WaitingDialog(QString::fromStdString(waiting_dialog_title), parent); connect(dialog, &QDialog::finished, &looper, &QEventLoop::quit); connect(dialog, &QDialog::finished, dialog, &QDialog::deleteLater); - dialog->show(); - opera([dialog]() { - SPDLOG_DEBUG("called operating waiting cb, dialog: {}", - static_cast<void *>(dialog)); - dialog->close(); - dialog->accept(); + QTimer::singleShot(64, parent, [=]() { + opera([dialog]() { + SPDLOG_DEBUG("called operating waiting cb, dialog: {}", + static_cast<void *>(dialog)); + dialog->close(); + dialog->accept(); + }); }); looper.exec(); |