diff options
author | Thomas Zander <t.zander@nokia.com> | 2010-09-08 12:38:06 (GMT) |
---|---|---|
committer | Thomas Zander <t.zander@nokia.com> | 2010-09-09 10:17:47 (GMT) |
commit | 881b7547c2be0dc2b7e223175b8c43e4bda78991 (patch) | |
tree | 925f30c8d649f5cad1fe0cc9f7956d3c90332d93 /tests/auto/qfileinfo | |
parent | e34c6ac1146d7bb97da88805764d9fa90763b6b5 (diff) | |
download | Qt-881b7547c2be0dc2b7e223175b8c43e4bda78991.zip Qt-881b7547c2be0dc2b7e223175b8c43e4bda78991.tar.gz Qt-881b7547c2be0dc2b7e223175b8c43e4bda78991.tar.bz2 |
Make QFileInfo use the new filesystemengine
The creation of a QAbstractFileEngine derived class will now
be avoided if the file we are watching is on the native file system
and from then on all access will be through the direct API
Notice that for QFileInfo::path, isRelative, filePath, fileName,
baseName, completeBaseName, completeSuffix and suffix we now use
the QFileSystemEntry instead of asking the engine. This means
that some buggy or just weird user provided engines no longer
get used and as such we might not be bug compatible.
Reviewed-by: João Abecasis
Diffstat (limited to 'tests/auto/qfileinfo')
-rw-r--r-- | tests/auto/qfileinfo/tst_qfileinfo.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp index 08cb68d..cced207 100644 --- a/tests/auto/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp @@ -1255,9 +1255,10 @@ void tst_QFileInfo::isLocalFs() QFileInfo info(path); QFileInfoPrivate *privateInfo = getPrivate(info); - QVERIFY(privateInfo->fileEngine); - QCOMPARE(bool(privateInfo->fileEngine->fileFlags(QAbstractFileEngine::LocalDiskFlag) - & QAbstractFileEngine::LocalDiskFlag), isLocalFs); + QCOMPARE((privateInfo->fileEngine == 0), isLocalFs); + if (privateInfo->fileEngine) + QCOMPARE(bool(privateInfo->fileEngine->fileFlags(QAbstractFileEngine::LocalDiskFlag) + & QAbstractFileEngine::LocalDiskFlag), isLocalFs); } void tst_QFileInfo::refresh() |