projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
included qca2 into build system
[quassel.git]
/
src
/
uisupport
/
qssparser.cpp
diff --git
a/src/uisupport/qssparser.cpp
b/src/uisupport/qssparser.cpp
index
d5b9984
..
06e4db2
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);
@@
-186,6
+186,8
@@
quint64 QssParser::parseFormatType(const QString &decl) {
fmtType |= UiStyle::Hostmask;
else if(subElement == "modeflags")
fmtType |= UiStyle::ModeFlags;
fmtType |= UiStyle::Hostmask;
else if(subElement == "modeflags")
fmtType |= UiStyle::ModeFlags;
+ else if(subElement == "url")
+ fmtType |= UiStyle::Url;
else {
qWarning() << Q_FUNC_INFO << tr("Invalid subelement name in %1").arg(decl);
return UiStyle::Invalid;
else {
qWarning() << Q_FUNC_INFO << tr("Invalid subelement name in %1").arg(decl);
return UiStyle::Invalid;
@@
-222,6
+224,12
@@
quint64 QssParser::parseFormatType(const QString &decl) {
fmtType |= UiStyle::ErrorMsg;
else if(msgType == "daychange")
fmtType |= UiStyle::DayChangeMsg;
fmtType |= UiStyle::ErrorMsg;
else if(msgType == "daychange")
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);
}
else {
qWarning() << Q_FUNC_INFO << tr("Invalid message type in %1").arg(decl);
}
@@
-285,9
+293,9
@@
quint64 QssParser::parseFormatType(const QString &decl) {
return UiStyle::Invalid;
}
if(condName == "fg-color")
return UiStyle::Invalid;
}
if(condName == "fg-color")
- fmtType |= 0x00400000 | (col << 24);
+ fmtType |= 0x00400000 | (
quint32)(
col << 24);
else
else
- fmtType |= 0x00800000 | (col << 28);
+ fmtType |= 0x00800000 | (
quint32)(
col << 28);
} else {
qWarning() << Q_FUNC_INFO << tr("Unhandled condition: %1").arg(condName);
return UiStyle::Invalid;
} else {
qWarning() << Q_FUNC_INFO << tr("Unhandled condition: %1").arg(condName);
return UiStyle::Invalid;
@@
-344,7
+352,7
@@
quint32 QssParser::parseItemFormatType(const QString &decl) {
if(!state.isEmpty()) {
if(state == "inactive")
fmtType |= UiStyle::InactiveBuffer;
if(!state.isEmpty()) {
if(state == "inactive")
fmtType |= UiStyle::InactiveBuffer;
- else if(state == "event")
+ else if(state == "
channel-
event")
fmtType |= UiStyle::ActiveBuffer;
else if(state == "unread-message")
fmtType |= UiStyle::UnreadBuffer;
fmtType |= UiStyle::ActiveBuffer;
else if(state == "unread-message")
fmtType |= UiStyle::UnreadBuffer;
@@
-458,6
+466,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;
@@
-479,6
+488,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;
@@
-502,6
+512,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;
@@
-654,7
+665,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;