aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/UserInterfaceUtils.h
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2023-12-03 12:28:46 +0000
committersaturneric <[email protected]>2023-12-03 12:28:46 +0000
commit883db05d54510e76b6548e107593187e1306117d (patch)
treea4de9d60d3bfeb69ba443129d208feef65250b2c /src/ui/UserInterfaceUtils.h
parentfeat: improve memory security of function framework (diff)
downloadGpgFrontend-883db05d54510e76b6548e107593187e1306117d.tar.gz
GpgFrontend-883db05d54510e76b6548e107593187e1306117d.zip
feat: general improvements of aync execution and memory security
Diffstat (limited to '')
-rw-r--r--src/ui/UserInterfaceUtils.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/ui/UserInterfaceUtils.h b/src/ui/UserInterfaceUtils.h
index 3746526a..a1719016 100644
--- a/src/ui/UserInterfaceUtils.h
+++ b/src/ui/UserInterfaceUtils.h
@@ -28,6 +28,8 @@
#pragma once
+#include <qwidget.h>
+
#include "core/function/result_analyse/GpgVerifyResultAnalyse.h"
#include "core/model/GpgKey.h"
#include "core/thread/ThreadingModel.h"
@@ -43,6 +45,9 @@ namespace GpgFrontend::UI {
class InfoBoardWidget;
class TextEdit;
+using OperaWaitingHd = std::function<void()>;
+using OperaWaitingCb = const std::function<void(OperaWaitingHd)>;
+
/**
* @brief
*
@@ -148,6 +153,28 @@ class CommonUtils : public QWidget {
/**
* @brief
*
+ * @param err
+ */
+ static void WaitForOpera(QWidget* parent, const std::string&,
+ const OperaWaitingCb&);
+
+ /**
+ * @brief
+ *
+ * @param err
+ */
+ static void RaiseMessageBox(QWidget* parent, GpgError err);
+
+ /**
+ * @brief
+ *
+ * @param err
+ */
+ static void RaiseFailureMessageBox(QWidget* parent, GpgError err);
+
+ /**
+ * @brief
+ *
*/
bool isApplicationNeedRestart();