aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/key_generate/KeyGenerateDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/dialog/key_generate/KeyGenerateDialog.cpp')
-rw-r--r--src/ui/dialog/key_generate/KeyGenerateDialog.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/dialog/key_generate/KeyGenerateDialog.cpp b/src/ui/dialog/key_generate/KeyGenerateDialog.cpp
index 39c39c91..a12db246 100644
--- a/src/ui/dialog/key_generate/KeyGenerateDialog.cpp
+++ b/src/ui/dialog/key_generate/KeyGenerateDialog.cpp
@@ -33,6 +33,7 @@
#include "core/function/gpg/GpgKeyOpera.h"
#include "core/typedef/GpgTypedef.h"
#include "core/utils/CacheUtils.h"
+#include "core/utils/CommonUtils.h"
#include "core/utils/GpgUtils.h"
#include "ui/UISignalStation.h"
#include "ui/UserInterfaceUtils.h"
@@ -600,7 +601,7 @@ void KeyGenerateDialog::slot_easy_combination_changed(const QString& mode) {
void KeyGenerateDialog::do_generate() {
if (!GetSettings()
.value("gnupg/use_pinentry_as_password_input_dialog",
- QString::fromLocal8Bit(qgetenv("container")) != "flatpak")
+ !IsFlatpakENV())
.toBool() &&
!ui_->noPassphraseCheckBox->isChecked()) {
SetCacheValue("PinentryContext", "NEW_PASSPHRASE");