X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Ftopicwidget.cpp;h=b449f12ae8fe84b573653582c42cd8293b6c949a;hp=ae835013b64a4a8bd813c0d39c67ad63e6131573;hb=d3f99ef6bfc13599dcbddc2f84d29351b7a07d87;hpb=84cd3561e97167ffb98ecab0fd2b884ba1d13ada diff --git a/src/qtui/topicwidget.cpp b/src/qtui/topicwidget.cpp index ae835013..b449f12a 100644 --- a/src/qtui/topicwidget.cpp +++ b/src/qtui/topicwidget.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2014 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 * @@ -20,8 +20,9 @@ #include "topicwidget.h" +#include + #include "client.h" -#include "iconloader.h" #include "networkmodel.h" #include "uisettings.h" #include "graphicalui.h" @@ -31,7 +32,7 @@ TopicWidget::TopicWidget(QWidget *parent) : AbstractItemView(parent) { ui.setupUi(this); - ui.topicEditButton->setIcon(SmallIcon("edit-rename")); + ui.topicEditButton->setIcon(QIcon::fromTheme("edit-rename")); ui.topicLineEdit->setLineWrapEnabled(true); ui.topicLineEdit->installEventFilter(this); @@ -280,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, " ");