diff --git a/app/main.cpp b/app/main.cpp --- a/app/main.cpp +++ b/app/main.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -240,6 +241,16 @@ return projectAsSession; } +static void tryLoadIconResources() +{ + const QString breezeIcons = QStandardPaths::locate(QStandardPaths::DataLocation, QStringLiteral("icons/breeze/breeze-icons.rcc")); + if (!breezeIcons.isEmpty() && QFile::exists(breezeIcons)) { + // prepend /icons to the root to comply with KIcon* machinery + QResource::registerResource(breezeIcons, QStringLiteral("/icons/breeze")); + QIcon::setThemeSearchPaths(QStringList() << QStringLiteral(":/icons")); + } +} + static qint64 findSessionPid(const QString &sessionId) { KDevelop::SessionRunInfo sessionInfo = KDevelop::SessionController::sessionRunInfo( sessionId ); @@ -379,6 +390,8 @@ KCrash::initialize(); + tryLoadIconResources(); + Kdelibs4ConfigMigrator migrator(QStringLiteral("kdevelop")); migrator.setConfigFiles({QStringLiteral("kdeveloprc")}); migrator.setUiFiles({QStringLiteral("kdevelopui.rc")});