[Development] Proposition for a new Q_OS_ define

Jake Thomas Petroules jake.petroules at petroules.com
Sat Mar 23 01:51:36 CET 2013


I'd like to suggest that we add a new Q_OS_ define.

Currently, for Apple platforms, we have:

Q_OS_DARWIN
Q_OS_DARWIN32
Q_OS_DARWIN64
Q_OS_IOS
Q_OS_MAC
Q_OS_MAC32
Q_OS_MAC64
Q_OS_MACX

The first three are very straightforward. Q_OS_DARWIN is defined for both Apple platforms, OS X and iOS, with specific defines for 32 and 64 bit. iOS -- also straightforward; means iOS.

Then we get confusing. You'd think Q_OS_MAC is defined for OS X only, but it's just a synonym for Darwin, which makes it mostly useless. Further confusing is Q_OS_MACX which even more strongly implies that  it refers to OS X, but again it's simply a synonym for Darwin.

This results in a ton of #if defined(Q_OS_MAC) && !defined(Q_OS_IOS), which is very counterproductive. I propose that we add a Q_OS_OSX define (and Q_OS_OSX32 / Q_OS_OSX64) which is only defined for OS X. This would be quite helpful, I think.

Any objections? If not, dev or stable?
-- 
Jake Petroules
Chief Technology Officer
Petroules Corporation ยท www.petroules.com
Email: jake.petroules at petroules.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130322/d84b30ee/attachment.html>


More information about the Development mailing list