clazy: Convert many old-style connects into function pointer based
[quassel.git] / src / qtui / topicwidget.cpp
index c083193..e18625c 100644 (file)
@@ -35,8 +35,8 @@ TopicWidget::TopicWidget(QWidget *parent)
     ui.topicLineEdit->setLineWrapEnabled(true);
     ui.topicLineEdit->installEventFilter(this);
 
-    connect(ui.topicLabel, SIGNAL(clickableActivated(Clickable)), SLOT(clickableActivated(Clickable)));
-    connect(ui.topicLineEdit, SIGNAL(noTextEntered()), SLOT(on_topicLineEdit_textEntered()));
+    connect(ui.topicLabel, &StyledLabel::clickableActivated, this, &TopicWidget::clickableActivated);
+    connect(ui.topicLineEdit, &MultiLineEdit::noTextEntered, this, &TopicWidget::on_topicLineEdit_textEntered);
 
     UiSettings s("TopicWidget");
     s.notify("DynamicResize", this, SLOT(updateResizeMode()));
@@ -67,7 +67,7 @@ void TopicWidget::dataChanged(const QModelIndex &topLeft, const QModelIndex &bot
     QModelIndex currentTopicIndex = selectionModel()->currentIndex().sibling(selectionModel()->currentIndex().row(), 1);
     if (changedArea.contains(currentTopicIndex))
         setTopic(selectionModel()->currentIndex());
-};
+}
 
 void TopicWidget::setUseCustomFont(const QVariant &v)
 {
@@ -255,7 +255,7 @@ bool TopicWidget::eventFilter(QObject *obj, QEvent *event)
     if (event->type() != QEvent::KeyRelease)
         return QObject::eventFilter(obj, event);
 
-    QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
+    auto *keyEvent = static_cast<QKeyEvent *>(event);
 
     if (keyEvent->key() == Qt::Key_Escape) {
         switchPlain();