Allow passing custom theme base path together with custom app themes
Review Request #118561 - Created June 5, 2014 and submitted
KIconTheme in kdelibs4 was searching KGlobal::dirs()->resourceDirs("data") to find all icons; the status notifier dataengine was then setting custom resourceDirs(..) with custom SNI theme paths (which the SNIs can pass) and so the SNI icons always ended up in the theme search paths (the SNI icons are stored as a whole theme). With the port to QStandardPaths, we lost the ability to pass custom dirs into the theme search paths and that results in status notifier icons in Plasma Next having "unknown" icons as their icon theme paths are not searched and so icons are not found. This is the case mostly of the Qt4 apps running on Qt with the QSystrayIcon-to-SNI-patches (case of *buntu and I heard opensuse too?) KIconLoader however has "addAppDir(..)" method, so I expanded that method to actually take an "app dir" and add it to the theme search paths. Plasma Next now have proper icons in the systray.
Thanks Martin for looking at the issue. Just one question: Is plasmashell the only application which needs to include the additional search path, or does every application wanting a tray icon call the addAppDir() function? I am bit worried about any additional "stat" calls. Those we have already slow down the icon lookup considerably.
Review request changed
Fixed issues (I'm unsure if the "Please write "directory" instead of "dir"" was meant for the docs or the variable name; I adjusted only the docs, let me know if I should change the var name too)
Revision 2 (+25 -12)