modernize: Replace most remaining old-style connects by PMF ones
[quassel.git] / src / client / bufferviewoverlay.cpp
index 0769435..02e5702 100644 (file)
@@ -109,10 +109,9 @@ void BufferViewOverlay::addView(int viewId)
         }
     }
     else {
-        disconnect(config, SIGNAL(initDone()), this, SLOT(viewInitialized()));
         // we use a queued connection here since manipulating the connection list of a sending object
         // doesn't seem to be such a good idea while executing a connected slots.
-        connect(config, SIGNAL(initDone()), this, SLOT(viewInitialized()), Qt::QueuedConnection);
+        connect(config, &BufferViewConfig::initDone, this, selectOverload<>(&BufferViewOverlay::viewInitialized), Qt::QueuedConnection);
     }
     save();
 }
@@ -157,8 +156,6 @@ void BufferViewOverlay::viewInitialized(BufferViewConfig *config)
         qWarning() << "BufferViewOverlay::viewInitialized() received invalid view!";
         return;
     }
-    disconnect(config, SIGNAL(initDone()), this, SLOT(viewInitialized()));
-
     connect(config, &BufferViewConfig::configChanged, this, &BufferViewOverlay::update);
 
     // check if the view was removed in the meantime...