Review Request 119014: KUrlRequester: fixing handling of start directory

Simon Bachmann simonbachmann at bluewin.ch
Mon Jul 14 22:15:02 BST 2014



> On Juli 9, 2014, 10:40 vorm., David Faure wrote:
> > Looks good, but I'd feel safer if the unittest (kio/tests/kurlrequestertest.cpp) was:
> > 1) checked for no regressions, and
> > 2) extended to cover the case of relative paths, and other things this patch is fixing.

I need some help with the unittest:
I do understand the concept of "regular" unittests - the ones where you basically test output against expected values.
However, kurlrequestertest.cpp (and many other tests in kio/tests) seems to be a different kind of test, and I'm not sure I fully understand how they work.
It is my understanding that the test in question is interactive, i.e. the tester has to click through a series of dialogs showing variations of the widget in question and decide if the test passed, based on comments in the source, behaviour of the widget and console output. 
Is that correct? 
Are there any guidelines / best practices for these tests?
Thanks


- Simon


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


On Juni 29, 2014, 5:04 nachm., Simon Bachmann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119014/
> -----------------------------------------------------------
> 
> (Updated Juni 29, 2014, 5:04 nachm.)
> 
> 
> Review request for kdelibs.
> 
> 
> Bugs: 92237
>     http://bugs.kde.org/show_bug.cgi?id=92237
> 
> 
> Repository: kdelibs
> 
> 
> Description
> -------
> 
> The handling of the start directory in the KUrlRequester is only halfway implemented. 
> More in detail:
> - m_startDir (the private field holding the start directory) is not initialised - the default value of startDir() is an empty URL instead of the current working dir.
> - when the start dir changes, it is not always passed to the KUrlCompletion object of the lineedit. The suggestions showed when entering a relative path into the LineEdit might be wrong as a consequence.
> - when selecting a file, the start directory does not change to the directory of the selected file - the API doc says it should. 
> - when the user entered a relative path into the LineEdit, url() returns a relative path instead of an absolute one.
> 
> This patch should fix these issues. 
> 
> 
> Diffs
> -----
> 
>   kio/kfile/kurlrequester.h 2083d4c 
>   kio/kfile/kurlrequester.cpp 661b428 
> 
> Diff: https://git.reviewboard.kde.org/r/119014/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Simon Bachmann
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20140714/be1a58d7/attachment.htm>


More information about the kde-core-devel mailing list