"Icon theme * not found." message when the icon theme is found
-
I'm setting up an application, I'm adding custom search paths for the icon theme, and setting the icon theme.
Icons are loaded just fine but I get the message about the theme in stderrThis is the code in my
main:int main(int argc, char *argv[]) { QApplication app(argc, argv); AppInfo& info = AppInfo::instance(); app.setApplicationName(info.slug()); app.setApplicationDisplayName(info.name()); app.setApplicationVersion(info.version()); app.setOrganizationName(info.organization()); app.setWindowIcon(QIcon(info.data_file("icon.svg"))); QStringList search_paths = info.data_paths("icons"); search_paths += QIcon::themeSearchPaths(); QIcon::setThemeSearchPaths(search_paths); QPalette palette = QGuiApplication::palette(); if ( palette.color(QPalette::Button).value() < 100 ) QIcon::setThemeName("icons-dark"); else QIcon::setThemeName("icons"); GlaxnimateWindow window; window.show(); return app.exec(); }The message in stderr:
Icon theme "icons" not found.It seems to be output by
app.exec();.
I'm able to useQIcon::fromThemeand get a pixmap from that icon inmainbeforeexec()and that doesn't cause the message, so I assume it isn't caused byQIcon.
The message doesn't appear if I use one of the system icon themes insetThemeName(I'm on Kubuntu - KDE).Having spurious messages in stderr bothers me so I was trying to find what's causing it. If anyone has ideas it would be great.