modernize: Use auto where the type is clear from context
[quassel.git] / src / uisupport / nickview.cpp
index eb5dd11..5adaf73 100644 (file)
@@ -47,8 +47,6 @@ NickView::NickView(QWidget *parent)
     setContextMenuPolicy(Qt::CustomContextMenu);
     setSelectionMode(QAbstractItemView::ExtendedSelection);
 
-//   // breaks with Qt 4.8
-//   if(QString("4.8.0") > qVersion()) // FIXME breaks with Qt versions >= 4.10!
     setAnimated(true);
 
     connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), SLOT(showContextMenu(const QPoint &)));
@@ -78,7 +76,7 @@ void NickView::init()
 void NickView::setModel(QAbstractItemModel *model_)
 {
     if (model())
-        disconnect(model(), 0, this, 0);
+        disconnect(model(), nullptr, this, nullptr);
 
     TreeViewTouch::setModel(model_);
     init();
@@ -143,7 +141,7 @@ void NickView::startQuery(const QModelIndex &index)
     if (index.data(NetworkModel::ItemTypeRole) != NetworkModel::IrcUserItemType)
         return;
 
-    IrcUser *ircUser = qobject_cast<IrcUser *>(index.data(NetworkModel::IrcUserRole).value<QObject *>());
+    auto *ircUser = qobject_cast<IrcUser *>(index.data(NetworkModel::IrcUserRole).value<QObject *>());
     NetworkId networkId = index.data(NetworkModel::NetworkIdRole).value<NetworkId>();
     if (!ircUser || !networkId.isValid())
         return;