From: Manuel Nickschas Date: Mon, 24 Aug 2009 19:18:27 +0000 (+0200) Subject: Fix QSS syntax X-Git-Tag: 0.5-rc1~42 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=dfac7b1b66005a76a10a2aa2d64d551d4e11ae94 Fix QSS syntax We want #netsplit-join rather than #netsplitJoin, and #netsplit-quit rather than #netsplitQuit. --- diff --git a/data/default.qss b/data/default.qss index eb7f76a5..b2e47478 100644 --- a/data/default.qss +++ b/data/default.qss @@ -88,8 +88,8 @@ ChatLine#info { foreground: #916409; } ChatLine#error { foreground: #916409; } ChatLine#daychange { foreground: #916409; } ChatLine#topic { foreground: #960096; } -ChatLine#netsplitJoin { foreground: #960096; } -ChatLine#netsplitQuit { foreground: #960096; } +ChatLine#netsplit-join { foreground: #960096; } +ChatLine#netsplit-quit { foreground: #960096; } // BufferView Colors ChatListItem[state="inactive"] { foreground: #a0a0a4; } diff --git a/src/qtui/qtuistyle.cpp b/src/qtui/qtuistyle.cpp index 84b1d14a..396fb9ae 100644 --- a/src/qtui/qtuistyle.cpp +++ b/src/qtui/qtuistyle.cpp @@ -82,8 +82,8 @@ void QtUiStyle::generateSettingsQss() const { << msgTypeQss("error", "ErrorMsg", s) << msgTypeQss("daychange", "ServerMsg", s) << msgTypeQss("topic", "CommandMsg", s) - << msgTypeQss("netsplitJoin", "CommandMsg", s) - << msgTypeQss("netsplitQuit", "CommandMsg", s) + << msgTypeQss("netsplit-join", "CommandMsg", s) + << msgTypeQss("netsplit-quit", "CommandMsg", s) << "\n"; } diff --git a/src/uisupport/qssparser.cpp b/src/uisupport/qssparser.cpp index ceac60ba..56a76122 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,9 +226,9 @@ quint64 QssParser::parseFormatType(const QString &decl) { fmtType |= UiStyle::DayChangeMsg; else if(msgType == "topic") fmtType |= UiStyle::TopicMsg; - else if(msgType == "netsplitJoin") + else if(msgType == "netsplit-join") fmtType |= UiStyle::NetsplitJoinMsg; - else if(msgType == "netsplitQuit") + else if(msgType == "netsplit-quit") fmtType |= UiStyle::NetsplitQuitMsg; else { qWarning() << Q_FUNC_INFO << tr("Invalid message type in %1").arg(decl);