Could you test it with an SVG file that contains text? From what I remember, painting text requires a QGuiApplication to access the font database. Additionally, I do not like the hand-made command line parsing. We have QCommandLineParser for this.
Is it actually useful on non-Windows systems? If not, please add a conditional similar to the Apple tool above.
QString pngFile = icoFile;
Missing space after comma
- Christoph Feck
On January 11th, 2017, 9:15 p.m. CET, René J.V. Bertin wrote:Review request for KDE Frameworks, kdewin and Christoph Feck. By René J.V. Bertin.
Updated Jan. 11, 2017, 9:15 p.m.Repository: kiconthemes Description
Recently I committed a few changes to ecm_add_app_icon that make use of the fact that KIconThemes includes a ksvg2icns utility, making it possible to generate an application icon from an SVG file instead of from a series of PNG files.
With the present patch I propose to add an updated and partly rewritten version of the ageing svg2ico tool from the KDEWin project to KIconThemes. The goal is to have a proper and up-to-date tool to generate application icons from SVG on MS Windows too.
I considered proposing it to KDEWin instead, but in the end I liked the idea better to provide icon conversion utilities for Mac and Windows with a framework, where they might also serve in a less KDE-centric context (and cross-platform development). I also played with the idea of integrating the png2ico step into the tool, but noticed during testing that Matthias Benkmann's png2ico supports input sizes up to 248x248 while KDEWin's png2ico is currently limited at 48x48 or maybe even 32x32. Lacking a MSWin development system I'm not volunteering to update that code.
On Mac OS X 10.9 with Qt 5.7.1 and KF5 5.29.0 .