X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fold-uistyle.cpp;h=83024aa4e33d52069fdc511cfaf05db92f42805c;hb=dbdca302fc349d0e3d46aa0d8091c08b2df28af5;hp=94c9742bef3b9e57042922eb82cddca07006cb63;hpb=84af2151d56be3ad799a09143e8ac2cad4388ca0;p=quassel.git diff --git a/src/uisupport/old-uistyle.cpp b/src/uisupport/old-uistyle.cpp index 94c9742b..83024aa4 100644 --- a/src/uisupport/old-uistyle.cpp +++ b/src/uisupport/old-uistyle.cpp @@ -139,7 +139,7 @@ UiStyle::StyledText UiStyle::styleString(const QString &_s) { QTextLayout::FormatRange curFmtRng; curFmtRng.format = format(None); curFmtRng.start = 0; - result.formats.append(curFmtRng); + result.formatList.append(curFmtRng); int pos = 0; int length = 0; int fgCol = -1, bgCol = -1; // marks current mIRC color for(;;) { @@ -216,20 +216,20 @@ UiStyle::StyledText UiStyle::styleString(const QString &_s) { } s.remove(pos, length); // remove format code from string // now see if something changed and else insert the format - if(curFmtRng.format == result.formats.last().format) continue; // no change, so we just ignore + if(curFmtRng.format == result.formatList.last().format) continue; // no change, so we just ignore curFmtRng.start = pos; - if(pos == result.formats.last().start) { + if(pos == result.formatList.last().start) { // same starting point -> we just overwrite the old format - result.formats.last() = curFmtRng; + result.formatList.last() = curFmtRng; } else { // fix length of last format - result.formats.last().length = pos - result.formats.last().start; - result.formats.append(curFmtRng); + result.formatList.last().length = pos - result.formatList.last().start; + result.formatList.append(curFmtRng); } } - result.formats.last().length = s.length() - result.formats.last().start; - if(result.formats.last().length == 0) result.formats.removeLast(); - result.text = s; + result.formatList.last().length = s.length() - result.formatList.last().start; + if(result.formatList.last().length == 0) result.formatList.removeLast(); + result.plainText = s; return result; }