projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a shortcut for hiding current buffer.
[quassel.git]
/
src
/
uisupport
/
qssparser.cpp
diff --git
a/src/uisupport/qssparser.cpp
b/src/uisupport/qssparser.cpp
index
48a1a06
..
f6927e4
100644
(file)
--- 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) {
/******** 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);
// $1: subelement; $2: msgtype; $3: conditionals
if(!rx.exactMatch(decl)) {
qWarning() << Q_FUNC_INFO << tr("Invalid block declaration: %1").arg(decl);
@@
-226,6
+226,12
@@
quint64 QssParser::parseFormatType(const QString &decl) {
fmtType |= UiStyle::DayChangeMsg;
else if(msgType == "topic")
fmtType |= UiStyle::TopicMsg;
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 if(msgType == "invite")
+ fmtType |= UiStyle::InviteMsg;
else {
qWarning() << Q_FUNC_INFO << tr("Invalid message type in %1").arg(decl);
}
else {
qWarning() << Q_FUNC_INFO << tr("Invalid message type in %1").arg(decl);
}
@@
-462,6
+468,7
@@
QBrush QssParser::parseBrush(const QString &str, bool *ok) {
return QBrush();
}
QLinearGradient gradient(x1, y1, x2, y2);
return QBrush();
}
QLinearGradient gradient(x1, y1, x2, y2);
+ gradient.setCoordinateMode(QGradient::ObjectBoundingMode);
gradient.setStops(stops);
if(ok)
*ok = true;
gradient.setStops(stops);
if(ok)
*ok = true;
@@
-483,6
+490,7
@@
QBrush QssParser::parseBrush(const QString &str, bool *ok) {
return QBrush();
}
QConicalGradient gradient(cx, cy, angle);
return QBrush();
}
QConicalGradient gradient(cx, cy, angle);
+ gradient.setCoordinateMode(QGradient::ObjectBoundingMode);
gradient.setStops(stops);
if(ok)
*ok = true;
gradient.setStops(stops);
if(ok)
*ok = true;
@@
-506,6
+514,7
@@
QBrush QssParser::parseBrush(const QString &str, bool *ok) {
return QBrush();
}
QRadialGradient gradient(cx, cy, radius, fx, fy);
return QBrush();
}
QRadialGradient gradient(cx, cy, radius, fx, fy);
+ gradient.setCoordinateMode(QGradient::ObjectBoundingMode);
gradient.setStops(stops);
if(ok)
*ok = true;
gradient.setStops(stops);
if(ok)
*ok = true;
@@
-658,7
+667,7
@@
void QssParser::parseFontWeight(const QString& value, QTextCharFormat* format) {
}
void QssParser::parseFontSize(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;
if(!rx.exactMatch(value)) {
qWarning() << Q_FUNC_INFO << tr("Invalid font size specification: %1").arg(value);
return;