[Differential] [Commented On] D1841: Tasks model: don't load 4 icon sizes to then just use one.

hein (Eike Hein) noreply at phabricator.kde.org
Mon Jun 13 12:55:35 UTC 2016


hein added inline comments.

INLINE COMMENTS

> dfaure wrote in xwindowtasksmodel.cpp:665
> Oops, didn't see it. I'll adjust the patch.
> 
> However this makes me wonder, given this code
> 
>   if (!data.icon.name().isEmpty()) {
>       return data.url;
>   }
> 
> do I still need to handle the case where data.icon is set (non-null, but no name either, i.e. not from a theme, can this happen?)

Not in XWindowsTasksModel. The way it works is that Private::windowUrl() builds an URL for the window from window/process metadata using a heuristic, then TaskTools::appDataFromUrl() gets app data from it. appDataFromUrl() can set a QIcon without a name in two cases: When it's passed a fallback QIcon to use which lacks a name, and when it reads a pixmap from the URL's query string. The URLs produced by windowUrl() have no query string with an icon yet (obviously), and don't call appDataFromUrl() with a fallback icon (since the fallback is the window icon pixmap). tl;dr: No you don't need to handle that case.

REPOSITORY
  rPLASMAWORKSPACE Plasma Workspace

REVISION DETAIL
  https://phabricator.kde.org/D1841

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: dfaure, hein
Cc: broulik, plasma-devel, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20160613/294b9ed7/attachment-0001.html>


More information about the Plasma-devel mailing list