modernize: Replace most remaining old-style connects by PMF ones
[quassel.git] / src / common / ircchannel.cpp
index c4e45d5..37318d9 100644 (file)
@@ -191,7 +191,7 @@ void IrcChannel::joinIrcUsers(const QList<IrcUser *> &users, const QStringList &
 
         _userModes[ircuser] = sortedModes[i];
         ircuser->joinChannel(this, true);
-        connect(ircuser, SIGNAL(nickSet(QString)), this, SLOT(ircUserNickSet(QString)));
+        connect(ircuser, &IrcUser::nickSet, this, selectOverload<QString>(&IrcChannel::ircUserNickSet));
 
         // connect(ircuser, SIGNAL(destroyed()), this, SLOT(ircUserDestroyed()));
         // If you wonder why there is no counterpart to ircUserJoined:
@@ -424,7 +424,7 @@ void IrcChannel::initSetChanModes(const QVariantMap &channelModes)
 
 void IrcChannel::ircUserDestroyed()
 {
-    IrcUser *ircUser = static_cast<IrcUser *>(sender());
+    auto *ircUser = static_cast<IrcUser *>(sender());
     Q_ASSERT(ircUser);
     _userModes.remove(ircUser);
     // no further propagation.
@@ -434,7 +434,7 @@ void IrcChannel::ircUserDestroyed()
 
 void IrcChannel::ircUserNickSet(QString nick)
 {
-    IrcUser *ircUser = qobject_cast<IrcUser *>(sender());
+    auto *ircUser = qobject_cast<IrcUser *>(sender());
     Q_ASSERT(ircUser);
     emit ircUserNickSet(ircUser, nick);
 }