D11067: Fix 3 more cases of incorrect parameter to findProtocol

Jaime Torres Amate noreply at phabricator.kde.org
Tue Mar 6 08:11:34 UTC 2018


jtamate added inline comments.

INLINE COMMENTS

> dfaure wrote in kurlcompletion.cpp:626
> I'm not 100% sure about this one because kurl() is only supposed to be called if url.isURL().
> 
> Also, I tried to reproduce this assert with a unittest for kcompletion, but it works here !?
> 
> http://www.davidfaure.fr/2018/kurlcompletion_test.diff

I missed one key stroke. With this test, in a non empty current dirt, it fails.

void KUrlCompletionTest::testInvalidProtocol()
{

  KUrlCompletion* completionHomeCwd = new KUrlCompletion;
  completionHomeCwd->setDir(QUrl("/home/user"));
  
  completionHomeCwd->makeCompletion(QLatin1String(":/"));
  waitForCompletion(completionHomeCwd);
  const auto matches = completionHomeCwd->allMatches();
  // just don't crash

}

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D11067

To: jtamate, #frameworks, dfaure
Cc: michaelh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180306/ae2ce2ac/attachment.html>


More information about the Kde-frameworks-devel mailing list