projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
interfaces: Fix types in SNI interfaces, remove old annotations
[quassel.git]
/
src
/
uisupport
/
qssparser.cpp
diff --git
a/src/uisupport/qssparser.cpp
b/src/uisupport/qssparser.cpp
index
d1a13e8
..
d42b651
100644
(file)
--- a/
src/uisupport/qssparser.cpp
+++ b/
src/uisupport/qssparser.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-201
6
by the Quassel Project *
+ * Copyright (C) 2005-201
8
by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-322,8
+322,8
@@
std::pair<UiStyle::FormatType, UiStyle::MessageLabel> QssParser::parseFormatType
fmtType |= FormatType::Italic;
else if (condValue == "underline")
fmtType |= FormatType::Underline;
fmtType |= FormatType::Italic;
else if (condValue == "underline")
fmtType |= FormatType::Underline;
- else if (condValue == "
reverse
")
- fmtType |= FormatType::
Reverse
;
+ else if (condValue == "
strikethrough
")
+ fmtType |= FormatType::
Strikethrough
;
else {
qWarning() << Q_FUNC_INFO << tr("Invalid format name: %1").arg(condValue);
return invalid;
else {
qWarning() << Q_FUNC_INFO << tr("Invalid format name: %1").arg(condValue);
return invalid;
@@
-715,7
+715,7
@@
QGradientStops QssParser::parseGradientStops(const QString &str_)
void QssParser::parseFont(const QString &value, QTextCharFormat *format)
{
void QssParser::parseFont(const QString &value, QTextCharFormat *format)
{
- static const QRegExp rx("((?:(?:normal|italic|oblique|underline|bold|100|200|300|400|500|600|700|800|900) ){0,2}) ?(\\d+)(pt|px)? \"(.*)\"");
+ static const QRegExp rx("((?:(?:normal|italic|oblique|underline|
strikethrough|
bold|100|200|300|400|500|600|700|800|900) ){0,2}) ?(\\d+)(pt|px)? \"(.*)\"");
if (!rx.exactMatch(value)) {
qWarning() << Q_FUNC_INFO << tr("Invalid font specification: %1").arg(value);
return;
if (!rx.exactMatch(value)) {
qWarning() << Q_FUNC_INFO << tr("Invalid font specification: %1").arg(value);
return;
@@
-728,6
+728,7
@@
void QssParser::parseFont(const QString &value, QTextCharFormat *format)
format->setFontItalic(true);
else if (prop == "underline")
format->setFontUnderline(true);
format->setFontItalic(true);
else if (prop == "underline")
format->setFontUnderline(true);
+ // Oblique is not a property supported by QTextCharFormat
//else if(prop == "oblique")
// format->setStyle(QFont::StyleOblique);
else if (prop == "bold")
//else if(prop == "oblique")
// format->setStyle(QFont::StyleOblique);
else if (prop == "bold")
@@
-755,6
+756,9
@@
void QssParser::parseFontStyle(const QString &value, QTextCharFormat *format)
format->setFontItalic(true);
else if (value == "underline")
format->setFontUnderline(true);
format->setFontItalic(true);
else if (value == "underline")
format->setFontUnderline(true);
+ else if (value == "strikethrough")
+ format->setFontStrikeOut(true);
+ // Oblique is not a property supported by QTextCharFormat
//else if(value == "oblique")
// format->setStyle(QFont::StyleOblique);
else {
//else if(value == "oblique")
// format->setStyle(QFont::StyleOblique);
else {