_formatCodes["%DU"] = Url;
setTimestampFormatString("[hh:mm:ss]");
+
loadStyleSheet();
}
qDeleteAll(_metricsCache);
}
+void UiStyle::reload() {
+ loadStyleSheet();
+}
+
void UiStyle::loadStyleSheet() {
qDeleteAll(_metricsCache);
_metricsCache.clear();
styleSheet += loadStyleSheet("file:///" + s.value("CustomStyleSheetPath").toString(), true);
styleSheet += loadStyleSheet("file:///" + Quassel::optionValue("qss"), true);
- if(styleSheet.isEmpty())
- return;
-
- QssParser parser;
- parser.processStyleSheet(styleSheet);
- QApplication::setPalette(parser.palette());
- _formatCache = parser.formats();
+ if(!styleSheet.isEmpty()) {
+ QssParser parser;
+ parser.processStyleSheet(styleSheet);
+ QApplication::setPalette(parser.palette());
+ _formatCache = parser.formats();
- qApp->setStyleSheet(styleSheet); // pass the remaining sections to the application
+ qApp->setStyleSheet(styleSheet); // pass the remaining sections to the application
+ }
emit changed();
}
case Message::DayChange:
return DayChangeMsg;
}
- Q_ASSERT(false); // we need to handle all message types
+ //Q_ASSERT(false); // we need to handle all message types
+ qWarning() << Q_FUNC_INFO << "Unknown message type:" << msgType;
return ErrorMsg;
}