X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Ftopicwidget.cpp;h=712e74ca30b3b4aa9a4ddc3e0ea3cce161da7b3c;hp=95d6284bd4619690188ff3de275ea46cb1eab45a;hb=ac7a58dd970833da2336f6ce035ec55515bac0f1;hpb=e50ae7a06fc4e5d3a911c361d30953410deab609 diff --git a/src/qtui/topicwidget.cpp b/src/qtui/topicwidget.cpp index 95d6284b..712e74ca 100644 --- a/src/qtui/topicwidget.cpp +++ b/src/qtui/topicwidget.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2016 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -202,7 +202,7 @@ void TopicWidget::updateResizeMode() void TopicWidget::clickableActivated(const Clickable &click) { NetworkId networkId = selectionModel()->currentIndex().data(NetworkModel::NetworkIdRole).value(); - UiStyle::StyledString sstr = GraphicalUi::uiStyle()->styleString(GraphicalUi::uiStyle()->mircToInternal(_topic), UiStyle::PlainMsg); + UiStyle::StyledString sstr = GraphicalUi::uiStyle()->styleString(GraphicalUi::uiStyle()->mircToInternal(_topic), UiStyle::FormatType::PlainMsg); click.activate(networkId, sstr.plainText); } @@ -281,6 +281,9 @@ QString TopicWidget::sanitizeTopic(const QString& topic) // some unicode characters with a new line, which then triggers // a stack overflow later QString result(topic); +#if QT_VERSION >= 0x050000 + result.replace(QChar::CarriageReturn, " "); +#endif result.replace(QChar::ParagraphSeparator, " "); result.replace(QChar::LineSeparator, " ");