[cuttlefish] Use KIconTheme's functionalties
My last MR became messed up. Sorry for that. This MR uses
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 :-
- 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.
- @davidre in !14 (closed), guided me that extracting icon size from path will not work in general and suggested to use KIconThemes functionalities.