Skip to content

Conversation

@promag
Copy link
Contributor

@promag promag commented Apr 26, 2022

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-
@jarolrod jarolrod added the macOS label Apr 26, 2022
Copy link
Contributor

@jarolrod jarolrod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@promag
Copy link
Contributor Author

promag commented Apr 26, 2022

@fanquake should also rename this?

MOC_DEFS="${MOC_DEFS} -DQ_OS_MAC"

@katesalazar
Copy link

@jarolrod
Copy link
Contributor

@fanquake should also rename this?

MOC_DEFS="${MOC_DEFS} -DQ_OS_MAC"

yes, it would be appropriate to update what we want defined here. Should be opened up on the main repo though

@jarolrod
Copy link
Contributor

tACK e3daeca

@laanwj
Copy link
Member

laanwj commented Apr 27, 2022

Should some of these be Q_OS_DARWIN?
Ping @Sjors he was building for iOS at some point (bitcoin/bitcoin#1255).

@katesalazar
Copy link

katesalazar commented Apr 27, 2022 via email

@laanwj
Copy link
Member

laanwj commented Apr 27, 2022

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).

@Sjors
Copy link
Member

Sjors commented Apr 28, 2022

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.


#ifdef Q_OS_MAC
#ifdef Q_OS_MACOS
#include <qt/macdockiconhandler.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is macOS specific, so Q_OS_MACOS makes sense.

Copy link
Member

@hebasto hebasto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK e3daeca.

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.

@hebasto hebasto merged commit 8118970 into bitcoin-core:master May 20, 2022
@promag promag deleted the q_os_macos branch May 20, 2022 10:47
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants