Review Request: Hide empty additional information lines in icons view mode

Thomas Lübking thomas.luebking at web.de
Sun Sep 2 09:30:05 BST 2012



> On Sept. 1, 2012, 4:25 p.m., Frank Reininghaus wrote:
> > dolphin/src/kitemviews/private/knepomukrolesprovider.cpp, line 112
> > <http://git.reviewboard.kde.org/r/106304/diff/1/?file=82644#file82644line112>
> >
> >     Hm, at first sight this looks like the loop does essentially nothing - if it finds an empty string in the hash, it puts an empty string with the same key into the hash. Am I overlooking something, or could the entire loop be removed?
> 
> Todd Jennings wrote:
>     That depends on whether we can guarantee that the values will always only be strings.  I assumed that since it uses a qvariant that this cannot be guaranteed, in which case the loop overwrites non-string values with an empty string.  If we can guarantee it will always be a string, then does it really need to be a qvariant?

> in which case the loop overwrites non-string values with an empty string

This is wrong.
String, Bool, ByteArray, Char, Date, DateTime, Double, Int, LongLong, StringList, Time, UInt, or ULongLong can be converted to a string with reasonable content
So what this code eventually did was to override few (mostly custom) types with empty strings resp. a dash, ie. at best melt unknown information - what would likely have been a bug since toString() would still return an empty string when this is used. With the patch from "-" -> "" the loop is pointless unless you actively want to destroy information where you explicitly do not know what it is.

QVariant will (likely) be required for Model/View invocation


- Thomas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106304/#review18407
-----------------------------------------------------------


On Sept. 1, 2012, 12:17 p.m., Todd Jennings wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106304/
> -----------------------------------------------------------
> 
> (Updated Sept. 1, 2012, 12:17 p.m.)
> 
> 
> Review request for Dolphin and KDE Base Apps.
> 
> 
> Description
> -------
> 
> Hide empty additional information lines in icons view mode.  Previously they were "-", which took up a lot of space while providing no additional information.
> 
> 
> This addresses bug 304752.
>     http://bugs.kde.org/show_bug.cgi?id=304752
> 
> 
> Diffs
> -----
> 
>   dolphin/src/kitemviews/kstandarditemlistwidget.cpp 7ae7e2efcffc2f68c72a05cdbc3b29abc4c3aff4 
>   dolphin/src/kitemviews/private/knepomukrolesprovider.cpp 0ae9b6bd3edf88ea48c40bb491ef9e57148b8062 
> 
> Diff: http://git.reviewboard.kde.org/r/106304/diff/
> 
> 
> Testing
> -------
> 
> Tested and it works
> 
> 
> Thanks,
> 
> Todd Jennings
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20120902/8e0209aa/attachment.htm>


More information about the kfm-devel mailing list