aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/UserInterfaceUtils.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-04-18 17:56:51 +0000
committersaturneric <[email protected]>2025-04-18 17:56:51 +0000
commita7ea8e6de4bb205d2a3783d5cb9bde8bee0086b9 (patch)
tree54838273836a155033d33b246ec4a4200291825b /src/ui/UserInterfaceUtils.cpp
parentfix: issues found by testing (diff)
parentfix: spelling mistake on project config by nightly build (diff)
downloadGpgFrontend-a7ea8e6de4bb205d2a3783d5cb9bde8bee0086b9.tar.gz
GpgFrontend-a7ea8e6de4bb205d2a3783d5cb9bde8bee0086b9.zip
Merge branch 'develop'
Diffstat (limited to 'src/ui/UserInterfaceUtils.cpp')
-rw-r--r--src/ui/UserInterfaceUtils.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/ui/UserInterfaceUtils.cpp b/src/ui/UserInterfaceUtils.cpp
index 8d277ab4..dbc3f7e3 100644
--- a/src/ui/UserInterfaceUtils.cpp
+++ b/src/ui/UserInterfaceUtils.cpp
@@ -167,16 +167,24 @@ void CommonUtils::RaiseMessageBox(QWidget *parent, GpgError err) {
}
}
-void CommonUtils::RaiseFailureMessageBox(QWidget *parent, GpgError err) {
+void CommonUtils::RaiseMessageBoxNotSupported(QWidget *parent) {
+ QMessageBox::warning(
+ parent, tr("Operation Not Supported"),
+ tr("The current GnuPG version is too low and does not support this "
+ "operation. Please upgrade your GnuPG version to continue."));
+}
+
+void CommonUtils::RaiseFailureMessageBox(QWidget *parent, GpgError err,
+ const QString &msg) {
GpgErrorDesc desc = DescribeGpgErrCode(err);
GpgErrorCode err_code = CheckGpgError2ErrCode(err);
QMessageBox::critical(parent, tr("Failure"),
- tr("Gpg Operation failed.\n\nError code: %1\nSource: "
- " %2\nDescription: %3")
- .arg(err_code)
- .arg(desc.first)
- .arg(desc.second));
+ tr("Gpg Operation failed.") + "\n\n" +
+ tr("Error code: %1").arg(err_code) + "\n\n\n" +
+ tr("Source: %1").arg(desc.first) + "\n" +
+ tr("Description: %1").arg(desc.second) + "\n" +
+ tr("Error Message: %1").arg(msg));
}
void CommonUtils::SlotImportKeys(QWidget *parent, int channel,