Looking at some unit tests I found that a test for KUrl fails:
FAIL! : KUrlTest::testSetFileName() Compared values are not the same
Actual (singleFile.path()): /bar.bin
Expected (QString("bar.bin")): bar.bin
..\..\..\..\..\..\svn\trunk\KDE\kdelibs\kdecore\tests\kurltest.cpp(634) :
failure location
In KUrl I found this comment:
//This is necessary because QUrl has the "path" part including the first
slash
//Without this QUrl doesn't understand that this is a path, and some
operations fail
//e.g. C:/blah needs to become /C:/blah
Therefore I assume the FAIL is a false alarm, see attached patch.
Any comments?
Peter
Index: kdecore/tests/kurltest.cpp
===================================================================
--- kdecore/tests/kurltest.cpp (revision 1047643)
+++ kdecore/tests/kurltest.cpp (working copy)
@@ -631,8 +631,12 @@
QCOMPARE( singleFile.path(), QString("foo.txt") );
QCOMPARE( singleFile.pathOrUrl(), QString("foo.txt") );
singleFile.setFileName( "bar.bin" );
- QCOMPARE( singleFile.path(), QString("bar.bin") );
- QCOMPARE( singleFile.pathOrUrl(), QString("bar.bin") );
+ QString prepended;
+#ifdef Q_WS_WIN
+ prepended = "/";
+#endif
+ QCOMPARE( singleFile.path(), prepended + QString("bar.bin") );
+ QCOMPARE( singleFile.pathOrUrl(), prepended + QString("bar.bin") );
}
void KUrlTest::testDirectory()
_______________________________________________
Kde-windows mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-windows