X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fclient%2Fbufferviewoverlay.cpp;h=02e570299701c49f559dd96da1ee9d71b7546136;hb=900cce213a6ed000b7131a05a0dec7d04b35b023;hp=d63a26d65cbb0ae95daa7b3752098f14a3ccd55b;hpb=39328183a6a87c6eb10a9dbbffcd5d65bf154a1f;p=quassel.git diff --git a/src/client/bufferviewoverlay.cpp b/src/client/bufferviewoverlay.cpp index d63a26d6..02e57029 100644 --- a/src/client/bufferviewoverlay.cpp +++ b/src/client/bufferviewoverlay.cpp @@ -31,11 +31,7 @@ const int BufferViewOverlay::_updateEventId = QEvent::registerEventType(); BufferViewOverlay::BufferViewOverlay(QObject *parent) - : QObject(parent), - _aboutToUpdate(false), - _uninitializedViewCount(0), - _allowedBufferTypes(0), - _minimumActivity(0) + : QObject(parent) { } @@ -113,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(); } @@ -161,9 +156,7 @@ void BufferViewOverlay::viewInitialized(BufferViewConfig *config) qWarning() << "BufferViewOverlay::viewInitialized() received invalid view!"; return; } - disconnect(config, SIGNAL(initDone()), this, SLOT(viewInitialized())); - - connect(config, SIGNAL(configChanged()), this, SLOT(update())); + connect(config, &BufferViewConfig::configChanged, this, &BufferViewOverlay::update); // check if the view was removed in the meantime... if (_bufferViewIds.contains(config->bufferViewId())) @@ -177,7 +170,7 @@ void BufferViewOverlay::viewInitialized(BufferViewConfig *config) void BufferViewOverlay::viewInitialized() { - BufferViewConfig *config = qobject_cast(sender()); + auto *config = qobject_cast(sender()); Q_ASSERT(config); viewInitialized(config);