summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-08-13 15:02:18 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-08-13 15:02:18 (GMT)
commitad133992be8a2739efae231ef9e5930556a24cfa (patch)
tree753b7747e16db138fa74bc1a72b199fa5c860ad7 /src
parentf8b7834ae376c07254cee9f43e38ba74674eaa4a (diff)
downloadQt-ad133992be8a2739efae231ef9e5930556a24cfa.zip
Qt-ad133992be8a2739efae231ef9e5930556a24cfa.tar.gz
Qt-ad133992be8a2739efae231ef9e5930556a24cfa.tar.bz2
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.
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp39
1 files 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;
}