D11067: Fix 3 more cases of incorrect parameter to findProtocol

David Faure noreply at phabricator.kde.org
Tue Mar 6 09:16:29 UTC 2018


dfaure added inline comments.

INLINE COMMENTS

> jtamate wrote in kurlcompletion.cpp:626
> 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
> 
> }

Thanks for finding this. I made a copy/paste error, the "EmptyCwd" should have been removed, there's already a completion object set up with a base dir, in this test.

Here's the simpler test, with a fix that seems safer to me: https://phabricator.kde.org/D11089

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/b3b430a8/attachment.html>


More information about the Kde-frameworks-devel mailing list