Review Request 124032: Do not try to complete users and assert when prepend is non-empty.

David Faure faure at kde.org
Sat Jun 6 21:24:08 UTC 2015



> On June 6, 2015, 9:07 p.m., David Faure wrote:
> > The test doesn't check that user completion still works though? (in the case where it's expected, ~foo).
> > 
> > I'm curious btw, why did it crash/assert?
> > 
> > Finally I wonder why this didn't happen in kdelibs4, but ok, the code has had some changes due to the QUrl->KUrl porting, you don't *have* to answer this one ;)
> 
> Milian Wolff wrote:
>     it still works and I also wonder why this has not happened before - I blame the KUrl/QUrl differences here. Who was the expert in that area again to ask? :P Is it OK if I just add a test that expects a non-empty result set when ~ is inserted? Or what should we look out for ~root maybe? Or can I get the shell user name (or actually - home path) via some Qt API?
> 
> David Faure wrote:
>     You could compare that completion with KUser::allUsersNames() :-)
>     
>     Or just using the current user, KUser(KUser::currentUserId()), to check it's in the list, to avoid differences with allUsersNames() due to special users or stuff like that.
> 
> Milian Wolff wrote:
>     should I run this test only on unix platforms or is this also valid on windows e.g.? what about mac os x?

KUser is portable.

The completion in KIO is portable too (in fact it uses KUser::allUserNames() :-)

So you can run the test on all platforms.


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124032/#review81277
-----------------------------------------------------------


On June 6, 2015, 8:58 p.m., Milian Wolff wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124032/
> -----------------------------------------------------------
> 
> (Updated June 6, 2015, 8:58 p.m.)
> 
> 
> Review request for KDE Frameworks and David Faure.
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> BUG: 346920
> REVIEW: 124032
> 
> 
> Diffs
> -----
> 
>   autotests/kurlcompletiontest.cpp 55bd38011c93ea2d35a53a911a4878f28a09c00c 
>   src/widgets/kurlcompletion.cpp d7ae787e6c3d1dba1a168e77cc2d5001b4bed7ef 
> 
> Diff: https://git.reviewboard.kde.org/r/124032/diff/
> 
> 
> Testing
> -------
> 
> added a unit test, it now passes. also kate and the manual kurlrequestertest_gui test don't crash anymore when I insert "~/." into a url requester.
> 
> 
> Thanks,
> 
> Milian Wolff
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150606/eaff25f5/attachment.html>


More information about the Kde-frameworks-devel mailing list