X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtgui%2Fstyle.cpp;h=67e53a8155574c5be726b34dc3c4f02d7e979cb1;hp=54889868dfbf79936cd8ace762402fcfea215812;hb=06a46322b6107fe4a38c310a6292cc1ef3330950;hpb=077d44f36d2f5c730283ef6be839aea7dd073d56 diff --git a/src/qtgui/style.cpp b/src/qtgui/style.cpp index 54889868..67e53a81 100644 --- a/src/qtgui/style.cpp +++ b/src/qtgui/style.cpp @@ -156,26 +156,14 @@ void Style::init() { formats["%DU"] = url; } -QString Style::mircToInternal(QString mirc) { - mirc.replace('%', "%%"); // escape % just to be sure - mirc.replace('\x02', "%B"); - mirc.replace('\x03', "%C"); - mirc.replace('\x0f', "%O"); - mirc.replace('\x12', "%R"); - mirc.replace('\x16', "%R"); - mirc.replace('\x1d', "%S"); - mirc.replace('\x1f', "%U"); - return mirc; -} - /** Returns a string stripped of format codes, and a list of FormatRange objects * describing the formats of the string. * \param s string in internal format (% style format codes) */ -Style::FormattedString Style::internalToFormatted(QString s) { +Style::StyledString Style::formattedToStyled(QString s) { QHash toggles; QString p; - FormattedString sf; + StyledString sf; QTextLayout::FormatRange rng; rng.format = formats["default"]; rng.start = 0; rng.length = -1; sf.formats.append(rng); toggles["default"] = sf.formats.count() - 1;