projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix that sometimes % wasn't escaped properly, triggering an assert
[quassel.git]
/
src
/
uisupport
/
uistyle.cpp
diff --git
a/src/uisupport/uistyle.cpp
b/src/uisupport/uistyle.cpp
index
505fbc2
..
84a4099
100644
(file)
--- a/
src/uisupport/uistyle.cpp
+++ b/
src/uisupport/uistyle.cpp
@@
-169,7
+169,11
@@
UiStyle::StyledText UiStyle::styleString(QString s) {
QString code = QString("%") + s[pos+1];
if(s[pos+1] == 'D') code += s[pos+2];
FormatType ftype = formatType(code);
QString code = QString("%") + s[pos+1];
if(s[pos+1] == 'D') code += s[pos+2];
FormatType ftype = formatType(code);
- Q_ASSERT(ftype != Invalid);
+ if(ftype == Invalid) {
+ qWarning(qPrintable(QString("Invalid format code in string: %1").arg(s)));
+ continue;
+ }
+ //Q_ASSERT(ftype != Invalid);
length = code.length();
if(!fmtList.contains(ftype)) {
// toggle it on
length = code.length();
if(!fmtList.contains(ftype)) {
// toggle it on