aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/keypair_details/KeyPairOperaTab.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2023-12-04 15:06:43 +0000
committersaturneric <[email protected]>2023-12-04 15:06:43 +0000
commitadc30154e8e553f563facc6d1e08b4696f29f15f (patch)
tree2f3324f357fa94868fa6f246fd0c49304c4c0f36 /src/ui/dialog/keypair_details/KeyPairOperaTab.cpp
parentfeat: add reasons explanation to env loading failed message box (diff)
downloadGpgFrontend-adc30154e8e553f563facc6d1e08b4696f29f15f.tar.gz
GpgFrontend-adc30154e8e553f563facc6d1e08b4696f29f15f.zip
fix: slove some ui issues
Diffstat (limited to 'src/ui/dialog/keypair_details/KeyPairOperaTab.cpp')
-rw-r--r--src/ui/dialog/keypair_details/KeyPairOperaTab.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ui/dialog/keypair_details/KeyPairOperaTab.cpp b/src/ui/dialog/keypair_details/KeyPairOperaTab.cpp
index f7a8fb62..8fa7eb9c 100644
--- a/src/ui/dialog/keypair_details/KeyPairOperaTab.cpp
+++ b/src/ui/dialog/keypair_details/KeyPairOperaTab.cpp
@@ -36,6 +36,7 @@
#include "core/utils/GpgUtils.h"
#include "core/utils/IOUtils.h"
#include "ui/UISignalStation.h"
+#include "ui/UserInterfaceUtils.h"
#include "ui/dialog/import_export/KeyUploadDialog.h"
#include "ui/function/SetOwnerTrustLevel.h"
@@ -343,7 +344,7 @@ void KeyPairOperaTab::slot_gen_revoke_cert() {
dialog.setDefaultSuffix(".rev");
dialog.setAcceptMode(QFileDialog::AcceptSave);
- if (dialog.exec()) m_output_file_name = dialog.selectedFiles().front();
+ if (dialog.exec() != 0) m_output_file_name = dialog.selectedFiles().front();
if (!m_output_file_name.isEmpty()) {
GpgKeyOpera::GetInstance().GenerateRevokeCert(
@@ -354,11 +355,7 @@ void KeyPairOperaTab::slot_gen_revoke_cert() {
void KeyPairOperaTab::slot_modify_password() {
GpgKeyOpera::GetInstance().ModifyPassword(
m_key_, [this](GpgError err, const DataObjectPtr&) {
- if (CheckGpgError(err) != GPG_ERR_NO_ERROR) {
- QMessageBox::critical(
- this, _("Not Successful"),
- QString(_("Modify password not successfully.")));
- }
+ CommonUtils::RaiseMessageBox(this, err);
});
}