Review Request 119607: Support for ".hidden" files

Bruno Nova brunomb.nova at gmail.com
Thu Dec 18 12:30:32 UTC 2014



> On Set. 17, 2014, 7:59 p.m., David Faure wrote:
> > Thanks for the patch. A few comments:
> > 
> > Is there any sort of spec or reference implementation for ".hidden" files? Are they supposed to support wildcards, for instance?
> > 
> > Something else, it would be good to add a unittest to autotests/kdirlistertest.cpp (or autotests/kdirmodeltest.cpp).
> 
> Bruno Nova wrote:
>     OK, I'll try to add a unittest later.
>     
>     I've searched for a general specification for ".hidden" files, but have found none.
>     However, I have accidentally found, through Wikipedia, the commit that adds ".hidden" support to GNOME glib: https://git.gnome.org/browse/glib/commit/?id=510ba9b4efe1813e24c6dfa7405c3547bf9efdd7
> 
> Bruno Nova wrote:
>     I don't think I will be able to create the unittest.
>     Using Project Neon in Virtualbox, I wasn't able to run `make test` or `ctest` successfully. It always hangs in some of the tests (like the 3rd), even from the latest git commit (patch not applied), and `ctest -VV` doesn't show any error.
>     So, I'll need help here.
>     
>     Here are some special cases that I think the unittest should test (among other cases):
>     * Folder with no *.hidden*
>     * Folder with empty *.hidden*
>     * *.hidden* with empty lines
>     * *.hidden* and filenames that contain leading and/or trailing spaces (the spaces should not be ignored)
>     * *.hidden* with repeated lines
>     * *.hidden* and filenames with special and accented characters, including `*` and `?` (if patterns in the *.hidden* files are not implemented, these characters should not be interpreted)
>     * And possibly more

Maybe it would be better for me not to create the unit test (at least on this patch).
I wanted to create some test files, then test "what the file manager would list" for several different ".hidden" files. But, from looking at the other tests, I didn't figure out how to do that part yet.
I would also like to test the "desktop:/" case, but I don't think that's possible?

And, by the way, I'm seeing some tests (like kdirlistertest and kdirmodeltest) randomly failing on my computer for some reason (it doesn't seem to be because of this patch; maybe it's a timeout).


- Bruno


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


On Dez. 11, 2014, 3:23 p.m., Bruno Nova wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119607/
> -----------------------------------------------------------
> 
> (Updated Dez. 11, 2014, 3:23 p.m.)
> 
> 
> Review request for KDE Frameworks and David Faure.
> 
> 
> Bugs: 64740 and 246260
>     https://bugs.kde.org/show_bug.cgi?id=64740
>     https://bugs.kde.org/show_bug.cgi?id=246260
> 
> 
> Repository: kio
> 
> 
> Description
> -------
> 
> This adds support for *.hidden* files to KDE.
> 
> When listing a directory, the files/folders listed in the *.hidden* file will be hidden, unless the user has chosen to show hidden files.
> 
> This patch was initially based on the patch provided by Mark in Bug #246260.
> 
> 
> Diffs
> -----
> 
>   src/core/kcoredirlister.cpp f5c5627 
>   src/core/kcoredirlister_p.h db096c5 
>   src/core/kfileitem.h a815aee 
>   src/core/kfileitem.cpp 6a2cfa5 
> 
> Diff: https://git.reviewboard.kde.org/r/119607/diff/
> 
> 
> Testing
> -------
> 
> Built and tested the patch in Project Neon.
> Dolphin was still using KDE4/Qt4 version of the library, so I only tested using the desktop folder widget, and "folder desktop".
> It worked correctly when I pointed it to "~" and "~/Desktop" (I added ".hidden" there).
> However, it didn't work when I pointed it to the "Desktop folder" (the default option, not the custom location "~/Desktop").
> More testing is required.
> 
> The version for KDE4/Qt4 submitted to Bug #246260 was tested in Kubuntu 14.04, and it worked everywhere I tested (Dolphin, open/save dialogs, folder widget and detailed/tree view in Dolphin).
> It wasn't an intensive test, though.
> 
> 
> Thanks,
> 
> Bruno Nova
> 
>

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


More information about the Kde-frameworks-devel mailing list