QssParser parser;
parser.processStyleSheet(styleSheet);
QApplication::setPalette(parser.palette());
- _uiStylePalette = parser.uiStylePalette();
- QTextCharFormat baseFmt = parser.formats().value(Base);
- foreach(quint64 fmtType, parser.formats().keys()) {
- QTextCharFormat fmt = baseFmt;
- fmt.merge(parser.formats().value(fmtType));
- _formats[fmtType] = fmt;
- }
+ _uiStylePalette = parser.uiStylePalette();
+ _formats = parser.formats();
_listItemFormats = parser.listItemFormats();
styleSheet = styleSheet.trimmed();
color &= 0x0f;
if(s[pos+3] == 'f') {
curfmt &= 0xf0ffffff;
- curfmt |= (color << 24) | 0x00400000;
+ curfmt |= (quint32)(color << 24) | 0x00400000;
} else {
curfmt &= 0x0fffffff;
- curfmt |= (color << 28) | 0x00800000;
+ curfmt |= (quint32)(color << 28) | 0x00800000;
}
length = 6;
}