X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fqssparser.cpp;h=b91aef43c8022b12d5ef6c7898a127945613d7d6;hp=1262be7e3d40959a5fd68009323e1e8f12db9774;hb=09e81c4d2ef4ae577a0e9290a976877d9734970e;hpb=c9057c565220fa7f5e264775fde4bf41c5eae308 diff --git a/src/uisupport/qssparser.cpp b/src/uisupport/qssparser.cpp index 1262be7e..b91aef43 100644 --- a/src/uisupport/qssparser.cpp +++ b/src/uisupport/qssparser.cpp @@ -160,7 +160,7 @@ void QssParser::parsePaletteBlock(const QString &decl, const QString &contents) /******** Determine format types from a block declaration ********/ quint64 QssParser::parseFormatType(const QString &decl) { - QRegExp rx("ChatLine(?:::(\\w+))?(?:#(\\w+))?(?:\\[([=-,\\\"\\w\\s]+)\\])?"); + QRegExp rx("ChatLine(?:::(\\w+))?(?:#([\\w\\-]+))?(?:\\[([=-,\\\"\\w\\s]+)\\])?"); // $1: subelement; $2: msgtype; $3: conditionals if(!rx.exactMatch(decl)) { qWarning() << Q_FUNC_INFO << tr("Invalid block declaration: %1").arg(decl); @@ -226,6 +226,10 @@ quint64 QssParser::parseFormatType(const QString &decl) { fmtType |= UiStyle::DayChangeMsg; else if(msgType == "topic") fmtType |= UiStyle::TopicMsg; + else if(msgType == "netsplit-join") + fmtType |= UiStyle::NetsplitJoinMsg; + else if(msgType == "netsplit-quit") + fmtType |= UiStyle::NetsplitQuitMsg; else { qWarning() << Q_FUNC_INFO << tr("Invalid message type in %1").arg(decl); } @@ -289,9 +293,9 @@ quint64 QssParser::parseFormatType(const QString &decl) { return UiStyle::Invalid; } if(condName == "fg-color") - fmtType |= 0x00400000 | (col << 24); + fmtType |= 0x00400000 | (quint32)(col << 24); else - fmtType |= 0x00800000 | (col << 28); + fmtType |= 0x00800000 | (quint32)(col << 28); } else { qWarning() << Q_FUNC_INFO << tr("Unhandled condition: %1").arg(condName); return UiStyle::Invalid; @@ -658,7 +662,7 @@ void QssParser::parseFontWeight(const QString& value, QTextCharFormat* format) { } void QssParser::parseFontSize(const QString& value, QTextCharFormat* format) { - QRegExp rx("\\(d+)(pt|px)"); + QRegExp rx("(\\d+)(pt|px)"); if(!rx.exactMatch(value)) { qWarning() << Q_FUNC_INFO << tr("Invalid font size specification: %1").arg(value); return;