diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-02-11 12:57:10 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-02-11 12:57:10 +0000 |
commit | 321658d288b8f790ecfe5ab5198bf6c0d27f0f73 (patch) | |
tree | 24a4be4408ad31f82f4f1c3374c66dd986148844 /src/corelib/global | |
parent | 7e85e7ced7079d620ae73f8664a68530992c6af1 (diff) | |
parent | d456f87ece0323982b7601047712545ab95426ad (diff) |
Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qlibraryinfo.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 7d558cbf81..c962f1b4b7 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -53,7 +53,7 @@ QT_END_NAMESPACE # include "qcoreapplication.h" #endif -#ifdef Q_OS_MAC +#ifdef Q_OS_DARWIN # include "private/qcore_mac_p.h" #endif @@ -171,7 +171,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, @@ -409,12 +409,11 @@ static const struct { /*! Returns the location specified by \a loc. - */ QString QLibraryInfo::location(LibraryLocation loc) { -#ifdef QT_BUILD_QMAKE +#ifdef QT_BUILD_QMAKE // ends inside rawLocation ! QString ret = rawLocation(loc, FinalPaths); // Automatically prepend the sysroot to target paths @@ -433,7 +432,7 @@ QLibraryInfo::location(LibraryLocation loc) QString QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group) { -#endif +#endif // QT_BUILD_QMAKE, started inside location ! QString ret; #ifdef QT_BUILD_QMAKE // Logic for choosing the right data source: if EffectivePaths are requested @@ -549,25 +548,26 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group) } else { // we make any other path absolute to the prefix directory baseDir = rawLocation(PrefixPath, 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); #else return QDir::cleanPath(QString(path) + QLatin1Char('/') + ret); // iOS -#endif +#endif // Q_OS_OSX } } -#endif +#endif // Q_OS_DARWIN // We make the prefix path absolute to the executable's directory. baseDir = QCoreApplication::applicationDirPath(); } else { @@ -576,8 +576,8 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group) } else { // we make any other path absolute to the prefix directory baseDir = location(PrefixPath); -#endif } +#endif // QT_BUILD_QMAKE ret = QDir::cleanPath(baseDir + QLatin1Char('/') + ret); } return ret; |