#include "topicwidget.h"
-#include <QIcon>
-
#include "client.h"
+#include "icon.h"
#include "networkmodel.h"
#include "uisettings.h"
#include "graphicalui.h"
: AbstractItemView(parent)
{
ui.setupUi(this);
- ui.topicEditButton->setIcon(QIcon::fromTheme("edit-rename"));
+ ui.topicEditButton->setIcon(icon::get("edit-rename"));
ui.topicLineEdit->setLineWrapEnabled(true);
ui.topicLineEdit->installEventFilter(this);
QModelIndex currentTopicIndex = selectionModel()->currentIndex().sibling(selectionModel()->currentIndex().row(), 1);
if (changedArea.contains(currentTopicIndex))
setTopic(selectionModel()->currentIndex());
-};
+}
void TopicWidget::setUseCustomFont(const QVariant &v)
{
switch (Client::networkModel()->bufferType(id)) {
case BufferInfo::StatusBuffer:
if (network) {
-#if QT_VERSION < 0x050000
- newtopic = QString("%1 (%2) | %3 | %4")
- .arg(Qt::escape(network->networkName()))
- .arg(Qt::escape(network->currentServer()))
- .arg(tr("Users: %1").arg(network->ircUsers().count()))
- .arg(tr("Lag: %1 msecs").arg(network->latency()));
-#else
newtopic = QString("%1 (%2) | %3 | %4")
.arg(network->networkName().toHtmlEscaped())
.arg(network->currentServer().toHtmlEscaped())
.arg(tr("Users: %1").arg(network->ircUsers().count()))
.arg(tr("Lag: %1 msecs").arg(network->latency()));
-#endif
}
else {
newtopic = index0.data(Qt::DisplayRole).toString();
// 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, " ");