X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fnickview.cpp;h=2fdb7081b164fb928539773d5ace230245cf341d;hp=2bd783b14f02a681ade10ee3c076ae684c68d0f2;hb=2c8434f74c68194d56f2084f637419123e61d18b;hpb=ab7ef4d24f62b5848b628482b7762ebfc0b53e1a diff --git a/src/uisupport/nickview.cpp b/src/uisupport/nickview.cpp index 2bd783b1..2fdb7081 100644 --- a/src/uisupport/nickview.cpp +++ b/src/uisupport/nickview.cpp @@ -49,13 +49,13 @@ NickView::NickView(QWidget *parent) setAnimated(true); - connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), SLOT(showContextMenu(const QPoint &))); + connect(this, &QWidget::customContextMenuRequested, this, &NickView::showContextMenu); #if defined Q_OS_MACOS || defined Q_OS_WIN // afaik this is better on Mac and Windows - connect(this, SIGNAL(activated(QModelIndex)), SLOT(startQuery(QModelIndex))); + connect(this, &QAbstractItemView::activated, this, &NickView::startQuery); #else - connect(this, SIGNAL(doubleClicked(QModelIndex)), SLOT(startQuery(QModelIndex))); + connect(this, &QAbstractItemView::doubleClicked, this, &NickView::startQuery); #endif } @@ -68,15 +68,15 @@ void NickView::init() for (int i = 1; i < model()->columnCount(); i++) setColumnHidden(i, true); - connect(selectionModel(), SIGNAL(currentChanged(QModelIndex, QModelIndex)), SIGNAL(selectionUpdated())); - connect(selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), SIGNAL(selectionUpdated())); + connect(selectionModel(), &QItemSelectionModel::currentChanged, this, &NickView::selectionUpdated); + connect(selectionModel(), &QItemSelectionModel::selectionChanged, this, &NickView::selectionUpdated); } void NickView::setModel(QAbstractItemModel *model_) { if (model()) - disconnect(model(), 0, this, 0); + disconnect(model(), nullptr, this, nullptr); TreeViewTouch::setModel(model_); init(); @@ -141,7 +141,7 @@ void NickView::startQuery(const QModelIndex &index) if (index.data(NetworkModel::ItemTypeRole) != NetworkModel::IrcUserItemType) return; - IrcUser *ircUser = qobject_cast(index.data(NetworkModel::IrcUserRole).value()); + auto *ircUser = qobject_cast(index.data(NetworkModel::IrcUserRole).value()); NetworkId networkId = index.data(NetworkModel::NetworkIdRole).value(); if (!ircUser || !networkId.isValid()) return;