Skip to content

[cuttlefish] Use KIconTheme's functionalties

Smit Patil requested to merge smitpatil/plasma-sdk:newbranch into master

My last MR became messed up. Sorry for that. This MR uses queryIcons and queryIconsByContext functions from KIconTheme instead of looping via filesystem manually. Some themes don't work well with queryIcons function's size parameter, thus in that case I'm using queryIconsByContext which returns all icons of all sizes and I find size by extracting it from path. it extracting from path fails, it used QImageReader. This MR does not shows hicolor icons but I intent to add support for choosing icon theme in next MR. Also I'm using QtConcurrent to avoid GUI blocking

problems solved by this MR :-

  1. currently cuttlefish does not shows window until load() function is finished, which does not make use of loading animation. this MR loads theme asynchronously solving this issue.
  2. @davidre in !14 (closed), guided me that extracting icon size from path will not work in general and suggested to use KIconThemes functionalities.
Edited by Smit Patil

Merge request reports

Loading