aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/UserInterfaceUtils.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2023-12-24 10:16:45 +0000
committersaturneric <[email protected]>2023-12-24 10:16:45 +0000
commite52215cd31237bcfe343754bdfcfdde65e804432 (patch)
tree91c4bbbe5d86ffaddd6f111bfa6e27aff1b644a0 /src/ui/UserInterfaceUtils.cpp
parentfix: test the encrypt async api on gui app (diff)
downloadGpgFrontend-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.cpp13
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();