Deconfuse some heavy use of the preprocessor.
One #if...#endif started in one function's body and ended in another's, which is worth remarking on in comments at both ends. A later #if...#else... opened blocks in both halves, that were closed just after their #endif, leading to simplistic brace-matching failure; so move that closing brace to inside both halves, so each half is brace-balanced and the function, as a whole, brace-balances simply. Commented on each #endif that was distant from its #if. Change-Id: I74d97b6dc4b291ec05053d299077a61cecf41ca1 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
parent
3d64f898d1
commit
2564de7b1e
@ -403,12 +403,11 @@ static const struct {
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns the location specified by \a loc.
|
Returns the location specified by \a loc.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
QString
|
QString
|
||||||
QLibraryInfo::location(LibraryLocation loc)
|
QLibraryInfo::location(LibraryLocation loc)
|
||||||
{
|
{
|
||||||
#ifdef QT_BUILD_QMAKE
|
#ifdef QT_BUILD_QMAKE // ends inside rawLocation !
|
||||||
QString ret = rawLocation(loc, FinalPaths);
|
QString ret = rawLocation(loc, FinalPaths);
|
||||||
|
|
||||||
// Automatically prepend the sysroot to target paths
|
// Automatically prepend the sysroot to target paths
|
||||||
@ -427,7 +426,7 @@ QLibraryInfo::location(LibraryLocation loc)
|
|||||||
QString
|
QString
|
||||||
QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
|
QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
|
||||||
{
|
{
|
||||||
#endif
|
#endif // QT_BUILD_QMAKE, started inside location !
|
||||||
QString ret;
|
QString ret;
|
||||||
#ifdef QT_BUILD_QMAKE
|
#ifdef QT_BUILD_QMAKE
|
||||||
// Logic for choosing the right data source: if EffectivePaths are requested
|
// Logic for choosing the right data source: if EffectivePaths are requested
|
||||||
@ -543,6 +542,7 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
|
|||||||
} else {
|
} else {
|
||||||
// we make any other path absolute to the prefix directory
|
// we make any other path absolute to the prefix directory
|
||||||
baseDir = rawLocation(PrefixPath, group);
|
baseDir = rawLocation(PrefixPath, group);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
if (loc == PrefixPath) {
|
if (loc == PrefixPath) {
|
||||||
if (QCoreApplication::instance()) {
|
if (QCoreApplication::instance()) {
|
||||||
@ -558,10 +558,10 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
|
|||||||
return QDir::cleanPath(bundleContentsDir + ret);
|
return QDir::cleanPath(bundleContentsDir + ret);
|
||||||
#else
|
#else
|
||||||
return QDir::cleanPath(QString(path) + QLatin1Char('/') + ret); // iOS
|
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.
|
// We make the prefix path absolute to the executable's directory.
|
||||||
baseDir = QCoreApplication::applicationDirPath();
|
baseDir = QCoreApplication::applicationDirPath();
|
||||||
} else {
|
} else {
|
||||||
@ -570,8 +570,8 @@ QLibraryInfo::rawLocation(LibraryLocation loc, PathGroup group)
|
|||||||
} else {
|
} else {
|
||||||
// we make any other path absolute to the prefix directory
|
// we make any other path absolute to the prefix directory
|
||||||
baseDir = location(PrefixPath);
|
baseDir = location(PrefixPath);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif // QT_BUILD_QMAKE
|
||||||
ret = QDir::cleanPath(baseDir + QLatin1Char('/') + ret);
|
ret = QDir::cleanPath(baseDir + QLatin1Char('/') + ret);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user