<table><tr><td style="">aboyer added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D25119">View Revision</a></tr></table><br /><div><div><p>I've tested this patch since I'd really like to use Kate with the dark theme on Windows. I built Kate on Windows using Craft, added KF5::BreezeIcons as a dependency for the kate-bin target, and set the QIcon theme name in the KateColorSchemeChooser class. This did not work.</p>
<p>The first problem I ran into was a CMake issue when adding KF5::BreezeIcons as a dependency. It turns out that KF5BreezeIcons.lib is not created since the new KF5BreezeIcons shared library does not export any symbols. Exporting a dummy function with __declspec(dllexport) fixed the problem and Kate compiled successfully.</p>
<p>The second problem was that no icons were rendered regardless of which theme was selected. This was caused by the fact that Kate did not actually link to KF5BreezeIcons since no symbol from that library was used. Calling the dummy function added earlier from main() fixed the linking problem. With this, Kate loaded KF5BreezeIcons.dll and the correct icons were used when switching to the Breeze dark theme. Success!</p>
<p>I did my testing with MSVC and I'm wondering if the patch was originally tested with MinGW. I can't recall if MinGW has a different behavior when it comes to exporting symbols from a shared library and linking to said shared library.</p>
<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>Applications wanting to have breeze icons available, can just link with this and be done</p></blockquote>
<p>It might not be quite so simple as just linking to a library. Obviously, the hacks described above to make this patch work are not acceptable. However, they could be modified slightly. For example, the call to QIcon::setThemeName() could be made in KF5BreezeIcons.dll instead of in Kate. We could export a class with a static function that sets the theme name based on the palette lightness, just like it is now done for the fallback theme. Kate would then call this static function in KateColorSchemeChooser. It's a bit less elegant but would address the issues mentioned above. Unless someone knows how to force the linking to a shared library even if no symbols are exported and/or used. Thoughts?</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R266 Breeze Icons</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D25119">https://phabricator.kde.org/D25119</a></div></div><br /><div><strong>To: </strong>cullmann, Frameworks, vonreth, dfaure, rempt, ndavis, mart, alex-l<br /><strong>Cc: </strong>aboyer, sars, wrobelda, davidedmundson, broulik, rempt, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns<br /></div>