Correct usage of Apple-related #if-ery.

As requested by sanity-bot.

Change-Id: I8f6793a26f5cf600d4e6225ca219496cfbb25799
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
bb10
Edward Welbourne 2016-02-01 19:17:34 +01:00
parent bb1924c345
commit 3d64f898d1
1 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ QT_END_NAMESPACE
# include "qcoreapplication.h"
#endif
#ifdef Q_OS_MAC
#ifdef Q_OS_DARWIN
# include "private/qcore_mac_p.h"
#endif
@ -165,7 +165,7 @@ QSettings *QLibraryInfoPrivate::findConfiguration()
if (QFile::exists(qtconfig))
return new QSettings(qtconfig, QSettings::IniFormat);
#else
#ifdef Q_OS_MAC
#ifdef Q_OS_DARWIN
CFBundleRef bundleRef = CFBundleGetMainBundle();
if (bundleRef) {
QCFType<CFURLRef> urlRef = CFBundleCopyResourceURL(bundleRef,
@ -546,13 +546,13 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
#else
if (loc == PrefixPath) {
if (QCoreApplication::instance()) {
#ifdef Q_OS_MAC
#ifdef Q_OS_DARWIN
CFBundleRef bundleRef = CFBundleGetMainBundle();
if (bundleRef) {
QCFType<CFURLRef> urlRef = CFBundleCopyBundleURL(bundleRef);
if (urlRef) {
QCFString path = CFURLCopyFileSystemPath(urlRef, kCFURLPOSIXPathStyle);
#ifdef Q_OS_MACX
#ifdef Q_OS_OSX
QString bundleContentsDir = QString(path) + QLatin1String("/Contents/");
if (QDir(bundleContentsDir).exists())
return QDir::cleanPath(bundleContentsDir + ret);