unexpected KUrl behavior: KUrl("someFile.ext").isLocalFile() == false

Milian Wolff mail at milianw.de
Wed Jun 16 17:02:50 BST 2010


Hello,

I was just hit by a to me very unexpected behavior in KUrl, and there is even 
a unit test for it: kurltest.cpp:766

void KUrlTest::testIsRelative()
{
...
  KUrl something("something");
  QCOMPARE(something.url(), QString("something"));
  QCOMPARE(something.protocol(), QString());
  QVERIFY(!something.isLocalFile());

That was added by David Faure in 817333, sadly the commit message is not 
really clear:

"answering Pino's question with a unit test"

;-) see also:

http://websvn.kde.org/trunk/KDE/kdelibs/kdecore/tests/kurltest.cpp?r1=784052&r2=817333&pathrev=817333

Can someone elaborate on why this is the correct behavior? To me something 
like:

KUrl("someFile.txt").isLocalFile() should return true

Bye
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20100616/07a4a2f5/attachment.sig>


More information about the kde-core-devel mailing list