aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/controller/GnuPGControllerDialog.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-07-30 17:33:21 +0000
committersaturneric <[email protected]>2024-07-30 17:33:21 +0000
commit02edad4c989f60e248657bb7854253f8297db583 (patch)
tree0fa307c34d270f42ba1ad90da819c259d744f283 /src/ui/dialog/controller/GnuPGControllerDialog.cpp
parentfeat: should check build capability at dev branch (diff)
downloadGpgFrontend-02edad4c989f60e248657bb7854253f8297db583.tar.gz
GpgFrontend-02edad4c989f60e248657bb7854253f8297db583.zip
fix: use standard os detection macro
Diffstat (limited to '')
-rw-r--r--src/ui/dialog/controller/GnuPGControllerDialog.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/ui/dialog/controller/GnuPGControllerDialog.cpp b/src/ui/dialog/controller/GnuPGControllerDialog.cpp
index c62bb33c..4cdc4864 100644
--- a/src/ui/dialog/controller/GnuPGControllerDialog.cpp
+++ b/src/ui/dialog/controller/GnuPGControllerDialog.cpp
@@ -149,19 +149,18 @@ GnuPGControllerDialog::GnuPGControllerDialog(QWidget* parent)
this->slot_set_restart_needed(kDeepRestartCode);
});
-#ifndef MACOS
- connect(ui_->buttonBox, &QDialogButtonBox::accepted, this,
- &GnuPGControllerDialog::SlotAccept);
- connect(ui_->buttonBox, &QDialogButtonBox::rejected, this,
- &GnuPGControllerDialog::reject);
-#else
-
+#if defined(__APPLE__) && defined(__MACH__)
// macOS style settings
ui_->buttonBox->setDisabled(true);
ui_->buttonBox->setHidden(true);
connect(this, &QDialog::finished, this, &GnuPGControllerDialog::SlotAccept);
connect(this, &QDialog::finished, this, &GnuPGControllerDialog::deleteLater);
+#else
+ connect(ui_->buttonBox, &QDialogButtonBox::accepted, this,
+ &GnuPGControllerDialog::SlotAccept);
+ connect(ui_->buttonBox, &QDialogButtonBox::rejected, this,
+ &GnuPGControllerDialog::reject);
#endif
setWindowTitle(tr("GnuPG Controller"));
@@ -356,7 +355,7 @@ auto GnuPGControllerDialog::check_custom_gnupg_path(QString path) -> bool {
QMessageBox::critical(this, tr("Illegal GnuPG Path"),
tr("Target GnuPG Path is not an absolute path."));
}
-#ifdef WINDOWS
+#ifdef __MINGW32__
QFileInfo const gpgconf_info(path + "/gpgconf.exe");
#else
QFileInfo const gpgconf_info(path + "/gpgconf");