summaryrefslogtreecommitdiff
path: root/quacker/macondo.cpp
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2025-08-24 15:55:08 -0400
committerpommicket <pommicket@gmail.com>2025-08-24 15:55:08 -0400
commitd862a46709d4cf4fabcaeeb0cb6a7bbc4fb4da26 (patch)
tree21c1c4c5903c1d3091f6d2b88e83772c017a2d4a /quacker/macondo.cpp
parentc4db2f06cbfd002d8ef89f783787f7910bee5bb9 (diff)
fix windows line endings maybe?
Diffstat (limited to 'quacker/macondo.cpp')
-rw-r--r--quacker/macondo.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/quacker/macondo.cpp b/quacker/macondo.cpp
index 49f8959..84f7bda 100644
--- a/quacker/macondo.cpp
+++ b/quacker/macondo.cpp
@@ -22,6 +22,10 @@ TODO:
#include "customqsettings.h"
+static bool isWindows() {
+ return QOperatingSystemVersion::currentType() == QOperatingSystemVersion::Windows;
+}
+
// Convenience wrapper around an hbox containing a label and another widget.
class LabelLayout: public QHBoxLayout {
public:
@@ -39,7 +43,7 @@ Macondo::Macondo(Quackle::Game *game) : View() {
m_useMacondo = new QCheckBox(tr("Use Macondo for 'Simulate'"));
m_useMacondo->setChecked(settings.value("macondo/useForSimulate", false).toBool());
QString execExt = "";
- if (QOperatingSystemVersion::currentType() == QOperatingSystemVersion::Windows) {
+ if (isWindows()) {
execExt = ".exe";
}
QString defaultExecPath = QCoreApplication::applicationDirPath() + "/macondo/macondo" + execExt;
@@ -147,7 +151,7 @@ void Macondo::setExecPath(const std::string &path) {
void Macondo::chooseExecPath() {
QString filter;
- if (QOperatingSystemVersion::currentType() == QOperatingSystemVersion::Windows) {
+ if (isWindows()) {
filter = tr("Executable files (*.exe)");
}
QString path = QFileDialog::getOpenFileName(this, tr("Select Macondo executable..."), QString(), filter);