X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fuistyle.cpp;h=e04a0bd0508987d8b72416867ab4491aed87b4ef;hp=0420a7c83c60baf7bc865742d6f7b56195d22e38;hb=aa40491595ffec54ba340a9850d99dc14d920eb3;hpb=38090a4af09e05763abf43bf95cd7d4696381a09 diff --git a/src/uisupport/uistyle.cpp b/src/uisupport/uistyle.cpp index 0420a7c8..e04a0bd0 100644 --- a/src/uisupport/uistyle.cpp +++ b/src/uisupport/uistyle.cpp @@ -129,13 +129,9 @@ QString UiStyle::formatCode(FormatType ftype) const { return _formatCodes.key(ftype); } -UiStyle::StyledText UiStyle::styleString(QString s) { - // FIXME - // The following two lines fix garbled fonts for me. I have no effing clue how or why. - // Without comparing s to something (anything), invalid formats with negative lengths are created... - // This smells like a gcc/Qt error or something, but maybe it's my fault somehow. - bool flg = (s == "foo"); - Q_UNUSED(flg); +UiStyle::StyledText UiStyle::styleString(const QString &_s) { + QString s = _s; // we can't use call-by-value since this seems to maybe screw up Qt's implicit sharing somehow + // at least invalid formats are created if we do that StyledText result; QList fmtList;