From ad133992be8a2739efae231ef9e5930556a24cfa Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Thu, 13 Aug 2009 17:02:18 +0200 Subject: Fix compilation of unix file engine. Add a bracket to the right place and re-arrange the code a little. The indenting was wrong here in the non-Symbian case since the if (exists) did not have curly bracket. Also copy the union of the Hidden flag into the Symbian #ifdef to make this code slightly more readable. --- src/corelib/io/qfsfileengine_unix.cpp | 39 ++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index d543541..2b7a3f7 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -793,29 +793,30 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(FileFlags type) const if (exists) ret |= ExistsFlag; #if defined(Q_OS_SYMBIAN) - if (d->filePath == QLatin1String("/") || (d->filePath.at(0).isLetter() && d->filePath.mid(1,d->filePath.length()) == QLatin1String(":/"))) - ret |= RootFlag; - - // In Symbian, all symlinks have hidden attribute for some reason; - // lets make them visible for better compatibility with other platforms. - // If somebody actually wants a hidden link, then they are out of luck. - if (!(ret & RootFlag) && !d->isSymlink()) - if(_q_isSymbianHidden(d->filePath, ret & DirectoryType) -#else - if (d->filePath == QLatin1String("/")) { - ret |= RootFlag; - } else { - QString baseName = fileName(BaseName); - if ((baseName.size() > 1 - && baseName.at(0) == QLatin1Char('.') && baseName.at(1) != QLatin1Char('.')) + if (d->filePath == QLatin1String("/") + || (d->filePath.at(0).isLetter() && d->filePath.mid(1,d->filePath.length()) == QLatin1String(":/"))) + ret |= RootFlag; + + // In Symbian, all symlinks have hidden attribute for some reason; + // lets make them visible for better compatibility with other platforms. + // If somebody actually wants a hidden link, then they are out of luck. + if (!(ret & RootFlag) && !d->isSymlink()) + if(_q_isSymbianHidden(d->filePath, ret & DirectoryType)) + ret |= HiddenFlag; +#endif + if (d->filePath == QLatin1String("/")) { + ret |= RootFlag; + } else { + QString baseName = fileName(BaseName); + if ((baseName.size() > 1 + && baseName.at(0) == QLatin1Char('.') && baseName.at(1) != QLatin1Char('.')) #if !defined(QWS) && defined(Q_OS_MAC) || _q_isMacHidden(d->filePath) #endif -#endif // Q_OS_SYMBIAN - ) { - ret |= HiddenFlag; - } + ) { + ret |= HiddenFlag; } + } } return ret; } -- cgit v0.12