X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Ftopicwidget.cpp;h=2f8f5fa4e29c62f75f4c8813c2dfbd987db4993f;hp=8a49d2758ae621f43730dc15f3dd674b36e8cf3a;hb=6ce1966d5d3070ad461a976a2bee7cc28e8b9149;hpb=f662db526c93bd3411509317d665b4f69c6832a0 diff --git a/src/qtui/topicwidget.cpp b/src/qtui/topicwidget.cpp index 8a49d275..2f8f5fa4 100644 --- a/src/qtui/topicwidget.cpp +++ b/src/qtui/topicwidget.cpp @@ -30,8 +30,9 @@ TopicWidget::TopicWidget(QWidget *parent) ui.setupUi(this); ui.topicEditButton->setIcon(SmallIcon("edit-rename")); ui.topicLineEdit->setWordWrapEnabled(true); - ui.topicLineEdit->installEventFilter(this); + + connect(ui.topicLabel, SIGNAL(clickableActivated(Clickable)), SLOT(clickableActivated(Clickable))); } void TopicWidget::currentChanged(const QModelIndex ¤t, const QModelIndex &previous) { @@ -56,6 +57,11 @@ void TopicWidget::setTopic(const QString &newtopic) { switchPlain(); } +void TopicWidget::clickableActivated(const Clickable &click) { + NetworkId networkId = selectionModel()->currentIndex().data(NetworkModel::NetworkIdRole).value(); + click.activate(networkId, _topic); +} + void TopicWidget::on_topicLineEdit_textEntered() { QModelIndex currentIdx = currentIndex(); if(currentIdx.isValid() && currentIdx.data(NetworkModel::BufferTypeRole) == BufferInfo::ChannelBuffer) {