From 4d29e11cd357faf21cc019a5750b1ac667ddeafb Mon Sep 17 00:00:00 2001
From: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
Date: Wed, 7 Feb 2024 08:36:46 -0500
Subject: [PATCH] macOS: fix build for App Store

Change-Id: Ibd7949810559640bb41d6c0ca796c5db9b7dca91
---
 src/app/appsettingsmanager.h | 2 +-
 src/app/main.cpp             | 4 ++--
 src/app/tipsmodel.cpp        | 2 +-
 src/app/utilsadapter.cpp     | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/app/appsettingsmanager.h b/src/app/appsettingsmanager.h
index a31fd941d..011617579 100644
--- a/src/app/appsettingsmanager.h
+++ b/src/app/appsettingsmanager.h
@@ -76,7 +76,7 @@ extern const QString defaultDownloadPath;
     X(EnablePtt, false) \
     X(PttKeys, 32) \
     X(UseFramelessWindow, USE_FRAMELESS_WINDOW_DEFAULT)
-#ifdef APPSTORE
+#if APPSTORE
 #define KEYS COMMON_KEYS
 #else
 // Additional key-value pairs for non-APPSTORE builds including donation
diff --git a/src/app/main.cpp b/src/app/main.cpp
index c84d3dc4d..ece26cc18 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -28,7 +28,7 @@
 #include <QApplication>
 #include <QCryptographicHash>
 #include <QtQuick>
-#ifdef WITH_WEBENGINE
+#if WITH_WEBENGINE
 #include <QtWebEngineCore>
 #include <QtWebEngineQuick>
 #endif
@@ -74,7 +74,7 @@ main(int argc, char* argv[])
     QApplication::setHighDpiScaleFactorRoundingPolicy(
         Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
 
-#ifdef WITH_WEBENGINE
+#if WITH_WEBENGINE
     qputenv("QTWEBENGINE_CHROMIUM_FLAGS",
             "--disable-web-security"
             " --single-process");
diff --git a/src/app/tipsmodel.cpp b/src/app/tipsmodel.cpp
index 77d5d90ec..95dca6178 100644
--- a/src/app/tipsmodel.cpp
+++ b/src/app/tipsmodel.cpp
@@ -75,7 +75,7 @@ TipsModel::reset()
     beginResetModel();
     tips_.clear();
 
-#ifndef APPSTORE
+#if !APPSTORE
     QDate date = QDate::currentDate();
     if (date >= QDate::fromString("2023-11-27", "yyyy-MM-dd")) {
         tips_.append({{"id", "14"}, {"title", tr("Donate")}, {"desc", ""}, {"type", "donation"}});
diff --git a/src/app/utilsadapter.cpp b/src/app/utilsadapter.cpp
index d15758687..ec30a5a36 100644
--- a/src/app/utilsadapter.cpp
+++ b/src/app/utilsadapter.cpp
@@ -96,7 +96,7 @@ UtilsAdapter::setAppValue(const Settings::Key key, const QVariant& value)
         Q_EMIT appThemeChanged();
     else if (key == Settings::Key::UseFramelessWindow)
         Q_EMIT useFramelessWindowChanged();
-#ifndef APPSTORE
+#if !APPSTORE
     // Any donation campaign-related keys can trigger a donation campaign check
     else if (key == Settings::Key::IsDonationVisible
              || key == Settings::Key::Donation2023VisibleDate
-- 
GitLab