summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2010-10-12 16:40:21 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2010-10-18 13:45:44 (GMT)
commit5c5a74aa789a876805dbdb0f58de03c2195c3b97 (patch)
treefb9109777a678077db09be96a751c55d5393c77d
parent0aa70ec7195e7a6ee07f73ac3c37030c9d37b132 (diff)
downloadQt-5c5a74aa789a876805dbdb0f58de03c2195c3b97.zip
Qt-5c5a74aa789a876805dbdb0f58de03c2195c3b97.tar.gz
Qt-5c5a74aa789a876805dbdb0f58de03c2195c3b97.tar.bz2
Fix for qfileinfo isExecutable test case.
Files in /sys/bin/ on any drive can be assumed to be executable. So the executable flag is set in the metadata for this path, even though RFs::Entry fails due to permissions (so we don't know if the file exists or not) Reviewed-By: joao
-rw-r--r--src/corelib/io/qfilesystemengine_symbian.cpp3
-rw-r--r--tests/auto/qfileinfo/tst_qfileinfo.cpp3
2 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/io/qfilesystemengine_symbian.cpp b/src/corelib/io/qfilesystemengine_symbian.cpp
index e2dfe53..dcb99d4 100644
--- a/src/corelib/io/qfilesystemengine_symbian.cpp
+++ b/src/corelib/io/qfilesystemengine_symbian.cpp
@@ -244,6 +244,9 @@ bool QFileSystemEngine::fillMetaData(const QFileSystemEntry &entry, QFileSystemM
data.modificationTime_ = TTime(0);
data.entryFlags &= ~(QFileSystemMetaData::SymbianTEntryFlags);
}
+ //files in /sys/bin on any drive are executable, even though we don't normally have permission to check whether they exist or not
+ if(absentry.filePath().midRef(1,10).compare(QLatin1String(":/sys/bin/"), Qt::CaseInsensitive) == 0)
+ data.entryFlags |= QFileSystemMetaData::ExecutePermissions;
}
return data.hasFlags(what);
}
diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp
index e4aa0d3..d2019b1 100644
--- a/tests/auto/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp
@@ -1465,9 +1465,6 @@ void tst_QFileInfo::isWritable()
void tst_QFileInfo::isExecutable()
{
#ifdef Q_OS_SYMBIAN
-# if defined(Q_CC_NOKIAX86)
- QSKIP("Impossible to implement reading/touching of application binaries in Symbian emulator", SkipAll);
-# endif
QString appPath = "c:/sys/bin/tst_qfileinfo.exe";
#else
QString appPath = QCoreApplication::applicationDirPath();