fsengine: Fix toLower / compare test

Fixed test on windows

Change-Id: I1652af82499e6820eb9850a3d79d3d1c5bc18614
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Marcus Tillmanns
2022-07-21 15:19:04 +02:00
parent 3462bc67be
commit 556bc48839
2 changed files with 3 additions and 2 deletions

View File

@@ -116,7 +116,7 @@ private:
{ {
if (!m_hasSetPath) { if (!m_hasSetPath) {
const QString p = path(); const QString p = path();
if (p.toLower() == QDir::rootPath()) if (p.compare(QDir::rootPath(), Qt::CaseInsensitive) == 0)
m_status = State::IteratingRoot; m_status = State::IteratingRoot;
((*m_baseIterator).*get(QAFEITag()))(p); ((*m_baseIterator).*get(QAFEITag()))(p);

View File

@@ -319,7 +319,8 @@ void tst_fileutils::toString()
filePath.setPath(path); filePath.setPath(path);
QCOMPARE(filePath.toString(), result); QCOMPARE(filePath.toString(), result);
QCOMPARE(filePath.toUserOutput(), userResult); QString cleanedOutput = filePath.needsDevice() ? filePath.toUserOutput() : QDir::cleanPath(filePath.toUserOutput());
QCOMPARE(cleanedOutput, userResult);
} }
void tst_fileutils::fromString_data() void tst_fileutils::fromString_data()