<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace;font-size:small"></div><div class="gmail_extra"><br><div class="gmail_quote">On 7 March 2016 at 13:05, Kåre Särs <span dir="ltr"><<a href="mailto:kare.sars@iki.fi" target="_blank">kare.sars@iki.fi</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<span class=""><br>
On Monday, March 07, 2016 12:41:52 PM Jaroslaw Staniek wrote:<br>
> ><br>
> > Thanks, it works on Windows (no platform theme).<br>
> > How to make it work on Linux too (KF5 5.19.0, Qt 5.5.1), i.e. I'd like<br>
> > to have only used icons from the .rcc regardless of availability of<br>
> > FrameworkIntegrationPlugin.so KDEPlatformTheme.so?<br>
> > <br>
> > We're talking about this code:<br>
> ><br>
> > <a href="https://quickgit.kde.org/?p=kate.git&a=blob&f=icons.h" rel="noreferrer" target="_blank">https://quickgit.kde.org/?p=kate.git&a=blob&f=icons.h</a><br>
> ><br>
> > As soon as QResource::registerResource("breeze.rcc") is called, ":/icons"<br>
> > is<br>
> > appended to the theme search path (checked using<br>
> > QIcon::themeSearchPaths()).<br>
> ><br>
> > There's a line QIcon::setThemeSearchPaths(QStringList() <<<br>
> > QStringLiteral(":/icons")).<br>
> ><br>
> > - When I have this line enabled and I have no<br>
> > FrameworkIntegrationPlugin.so & KDEPlatformTheme.so installed, no icons<br>
> > are<br>
> > available at all<br>
<br>
</span>Notice that the setThemeSearchPaths() call _replaces_ any previous search<br>
paths. Is this your problem?<br>
<span class=""><font color="#888888"><br>
<br></font></span></blockquote><div class="h5"><br><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">No.. but I got it sorted out after reading QIconTheme::QIconTheme and alike and re-reading the "The
name should correspond to a directory name in the themeSearchPath()
containing an index.theme file describing it's contents" sentence of
QIcon::setThemeName docs :)<br><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;display:inline"><br>I was tricked by the fact that on Windows qrc files with these paths work:<br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;display:inline"><br><file>./icons/actions/16/code-block.svg</file><br><file>./icons/actions/16/code-class.svg</file><br>etc.<br><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;display:inline">And not on Linux. No idea why. Here I needed:<br><br><file>./icons/breeze/actions/16/code-block.svg</file><br><file>./icons/breeze/actions/16/code-class.svg</file><br><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;display:inline">Of course also, otherwise the theme is marked as invalid<br><file>./icons/breeze/index.theme</file><br><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;display:inline">(needed
once; if you have the index.theme accessible from breeze.rcc, you can
add an extra application-defined .rcc without index.theme and new icons
will just be "added" to the theme. Looks like useful thing for plugins
for example, shipped completely separate from distros, and maybe not
even packaged. Just make sure you don't use any new subdirs that are are
not defined by the index file (I guess). <br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;display:inline"><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;display:inline">Now
useful thing would be to have option to generate breeze.rcc directly in
breeze-icons.git, so apps can find breeze.rcc at configure time, e.g.
using FindBreezeIcons.cmake.<br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small;display:inline"><br></div>Thanks, sorry for the noise. All the relevant recipes would end up in a howto and/or cmake scripts.<br></div><br></div></div>-- <br><div class="gmail_signature">regards, Jaroslaw Staniek<br><br>KDE:<br>: A world-wide network of software engineers, artists, writers, translators<br>: and facilitators committed to Free Software development - <a href="http://kde.org" target="_blank">http://kde.org</a><br>Calligra Suite:<br>: A graphic art and office suite - <a href="http://calligra.org" target="_blank">http://calligra.org</a><br>Kexi:<br>: A visual database apps builder - <a href="http://calligra.org/kexi" target="_blank">http://calligra.org/kexi</a><br>Qt Certified Specialist:<br>: <a href="http://www.linkedin.com/in/jstaniek" target="_blank">http://www.linkedin.com/in/jstaniek</a></div>
</div></div>