if (_systemIconTheme.isEmpty() || _systemIconTheme == fallbackTheme || s.value("Icons/OverrideSystemTheme", false).toBool()) {
// We have a valid fallback theme and want to override the system theme (if it's even defined), so we're basically done
QIcon::setThemeName(fallbackTheme);
+ emit iconThemeRefreshed();
return;
}
if (!_dummyThemeDir->isValid() || !QDir{_dummyThemeDir->path()}.mkpath("icons/quassel-icon-proxy/apps/32")) {
qWarning() << "Could not create temporary directory for proxying the system icon theme, using fallback";
QIcon::setThemeName(fallbackTheme);
+ emit iconThemeRefreshed();
return;
}
// Add this to XDG_DATA_DIRS, otherwise KIconLoader complains
if (!indexFile.open(QFile::WriteOnly|QFile::Truncate)) {
qWarning() << "Could not create index file for proxying the system icon theme, using fallback";
QIcon::setThemeName(fallbackTheme);
+ emit iconThemeRefreshed();
return;
}
if (indexFile.write(indexContents.toLatin1()) < 0) {
qWarning() << "Could not write index file for proxying the system icon theme, using fallback";
QIcon::setThemeName(fallbackTheme);
+ emit iconThemeRefreshed();
return;
}
indexFile.close();
// Qt4 doesn't support QTemporaryDir. Since it's deprecated and slated to be removed soon anyway, we don't bother
// writing a replacement and simply don't support not overriding the system theme.
QIcon::setThemeName(fallbackTheme);
+ emit iconThemeRefreshed();
#endif
}