aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/function/RaisePinentry.cpp
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/function/RaisePinentry.cpp
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/function/RaisePinentry.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ui/function/RaisePinentry.cpp b/src/ui/function/RaisePinentry.cpp
index 7ed98b93..65bae527 100644
--- a/src/ui/function/RaisePinentry.cpp
+++ b/src/ui/function/RaisePinentry.cpp
@@ -28,6 +28,8 @@
#include "RaisePinentry.h"
+#include <qwidget.h>
+
#include "core/function/CoreSignalStation.h"
#include "pinentry/pinentrydialog.h"
@@ -43,7 +45,6 @@ auto RaisePinentry::Exec() -> int {
SPDLOG_DEBUG("setting pinetry's arguments");
- pinentry->setPinentryInfo(new struct pinentry());
pinentry->setPrompt(QString::fromStdString(_("PIN:")));
pinentry->setDescription(QString());
pinentry->setRepeatErrorText(
@@ -65,7 +66,7 @@ auto RaisePinentry::Exec() -> int {
connect(pinentry, &PinEntryDialog::finished, this, [pinentry](int result) {
bool ret = result != 0;
- SPDLOG_DEBUG("PinEntryDialog finished, ret: {}", ret);
+ SPDLOG_DEBUG("pinentry finished, ret: {}", ret);
if (!ret) {
emit CoreSignalStation::GetInstance()->SignalUserInputPassphraseCallback(
@@ -78,7 +79,9 @@ auto RaisePinentry::Exec() -> int {
pin);
return 0;
});
+ connect(pinentry, &PinEntryDialog::finished, this, &QWidget::deleteLater);
pinentry->open();
+ return 0;
}
} // namespace GpgFrontend::UI