Q_OS_MAC
is deprecated but it is also defined when Qt is configured with -xplatform macx-ios-clang
, and currently it guards some features not available on iOS, like QProcess
.
Q_OS_MAC
is deprecated but it is also defined when Qt is configured with -xplatform macx-ios-clang
, and currently it guards some features not available on iOS, like QProcess
.
-BEGIN VERIFY SCRIPT-
sed -i 's/Q_OS_MAC/Q_OS_MACOS/' $(git grep -l "Q_OS_MAC" src/qt)
-END VERIFY SCRIPT-
Concept ACK
This change is ok to do. I’ve checked qt documentation up to Qt 5.7 that mentions Q_OS_MAC
is deprecated and to not use. Qt 5.7 docs even mention to use Q_OS_MACOS
or Q_OS_DARWIN
if targeting all Darwin platforms (macOS, IOS).
https://doc.qt.io/qt-5/qtglobal.html#Q_OS_MAC
Concept ACK
thought the same thing, didn’t tell because I think they can sort those out later 🤔
On Wed, Apr 27, 2022 at 9:37 PM laanwj @.***> wrote:
Should some of these be Q_OS_DARWIN? Ping @Sjors https://github.com/Sjors he was building for iOS at some point (bitcoin/bitcoin#1255 https://github.com/bitcoin/bitcoin/pull/1255 ).
— Reply to this email directly, view it on GitHub https://github.com/bitcoin-core/gui/pull/594#issuecomment-1111405099, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMRS4WYUEUMYG63OR5M4A4DVHGJN3ANCNFSM5UKFFNBQ . You are receiving this because you commented.Message ID: @.***>
didn’t tell because I think they can sort those out later thinking
I’m not sure there’s such a hurry, might as well do it properly while we’re changing this (and maybe it’s not relevant at all, just thought I’d ask).
I didn’t get very far with iOs builds… Specifically I never even tried to compile QT.
However, the more generic Q_OS_DARWIN
sounds good to me, unless it’s about features that only exists on a Mac.
Update: it’s actually not that clear cut, some of the code is really specific to macOS. Maybe just stick to Q_OS_MACOS
until someone actually compiles QT for iOs.
25@@ -26,7 +26,7 @@
26 #include <qt/walletview.h>
27 #endif // ENABLE_WALLET
28
29-#ifdef Q_OS_MAC
30+#ifdef Q_OS_MACOS
31 #include <qt/macdockiconhandler.h>
Q_OS_MACOS
makes sense.
ACK e3daecae0333e5474b54f64619ae6f512b683787.
Although Q_OS_DARWIN
is a synonym for the deprecated Q_OS_MAC
, I agree to narrow guards to Q_OS_MACOS
as we do not currently support iOS, watchOS, or tvOS.