Review Request: QIcon'ize KoRecentDocumentsPane, fetch big previews only on demand (save memory)

C. Boemann cbr at boemann.dk
Fri Jul 6 18:03:22 BST 2012


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

Ship it!


I'm okay with this change, and yes let's backport too

- C. Boemann


On July 5, 2012, 1:18 p.m., Friedrich W. H. Kossebau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105428/
> -----------------------------------------------------------
> 
> (Updated July 5, 2012, 1:18 p.m.)
> 
> 
> Review request for Calligra.
> 
> 
> Description
> -------
> 
> Real reason for this patch is that KFileItem::pixmap(...) is broken for items constructed with KFileItem(mode_t, mode_t, KUrl, bool) and no other mimetype related call before the one to ::pixmap. It will always return a pixmap with the "unknown" icon.
> You can see this for files for which there is no preview created (for whatever reason).
> 
> But the patch fixes also the size mismatch between the fetched previews (200x200) and the usual ODF preview of 128x128 as well as that the preview just from the icon is set in size 128. And makes the code shorter.
> 
> Also load the big previews only on-demand, not by default. Could spare up to ~500 kB (10 files * (128*128 - 64*64) * 4 bytes) in theory, but I did not measure what the real effect is.
> 
> Also using KIcon instead of setting an own deep copy of the pixmap per each KoFileListItem should spare even more memory, due to KIcon reusing existing icon pixmaps.
> 
> Okay to backport to 2.5 as well?
> 
> 
> Diffs
> -----
> 
>   libs/main/KoDetailsPane.h 6da6133 
>   libs/main/KoDetailsPane.cpp 8aa5965 
>   libs/main/KoRecentDocumentsPane.h 98baeb8 
>   libs/main/KoRecentDocumentsPane.cpp 521c7e6 
>   libs/main/KoTemplatesPane.cpp cc76c05 
> 
> Diff: http://git.reviewboard.kde.org/r/105428/diff/
> 
> 
> Testing
> -------
> 
> Tried the recent template pane at least in Krita, Words, Sheets
> 
> 
> Thanks,
> 
> Friedrich W. H. Kossebau
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120706/f4fe834b/attachment.htm>


More information about the calligra-devel mailing list