Switch to lowercase for subelement and message types in QssParser
[quassel.git] / src / uisupport / uistyle.cpp
index e1684f2..6322fb8 100644 (file)
@@ -105,7 +105,7 @@ QTextCharFormat UiStyle::format(quint32 ftype, quint32 label) {
 
   // check if we have exactly this format readily cached already
   QTextCharFormat fmt = cachedFormat(key);
-  if(fmt.isValid())
+  if(fmt.properties().count())
     return fmt;
 
   fmt.merge(cachedFormat(key & 0x0000000000000000));  // basic
@@ -462,5 +462,9 @@ void UiStyle::loadStyleSheet() {
 
   // TODO handle results
   QApplication::setPalette(parser.palette());
-  //QApplication::setStyleSheet(qApp->styleSheet()); // reload with custom palette settings
+
+  qDeleteAll(_metricsCache);
+  _metricsCache.clear();
+  _formatCache = parser.formats();
+
 }