diff --git a/autotests/udsentrytest.cpp b/autotests/udsentrytest.cpp index 748551c7..b8644f46 100644 --- a/autotests/udsentrytest.cpp +++ b/autotests/udsentrytest.cpp @@ -235,7 +235,7 @@ void UDSEntryTest::testMove() QTemporaryFile file; QVERIFY(file.open()); const QByteArray filePath = file.fileName().toLocal8Bit(); - const QString fileName = QUrl(file.fileName()).fileName(); // QTemporaryFile::fileName returns the full path. + const QString fileName = QFileInfo(filePath).fileName(); // QTemporaryFile::fileName returns the full path. QVERIFY(!fileName.isEmpty()); // We have a file now. Get the stat data from it to make the UDSEntry. @@ -244,7 +244,7 @@ void UDSEntryTest::testMove() KIO::UDSEntry entry(statBuf, fileName); // Verify that the name in the UDSEntry is the same as we've got from the fileName var. - QCOMPARE(fileName, entry.stringValue(KIO::UDSEntry::UDS_NAME)); + QCOMPARE(entry.stringValue(KIO::UDSEntry::UDS_NAME), fileName); // That was the boilerplate code. Now for move semantics. // First: move assignment. @@ -257,7 +257,7 @@ void UDSEntryTest::testMove() movedEntry = std::move(entryCopy); // And veryfy that this works. - QCOMPARE(fileName, movedEntry.stringValue(KIO::UDSEntry::UDS_NAME)); + QCOMPARE(movedEntry.stringValue(KIO::UDSEntry::UDS_NAME), fileName); } // Move constructor