X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fclient%2Fbufferviewoverlay.cpp;h=0769435fc0dfd0bcc61974e282175e35a63e23a6;hb=fcacaaf16551524c7ebb6114254d005274cc3d63;hp=91cad71657222a3e7b30f14d0ceeb808f722b36b;hpb=d6dd4ff24cade95ed49570786c8b81f10c6bddce;p=quassel.git diff --git a/src/client/bufferviewoverlay.cpp b/src/client/bufferviewoverlay.cpp index 91cad716..0769435f 100644 --- a/src/client/bufferviewoverlay.cpp +++ b/src/client/bufferviewoverlay.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -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) { } @@ -130,7 +126,7 @@ void BufferViewOverlay::removeView(int viewId) _bufferViewIds.remove(viewId); BufferViewConfig *config = Client::bufferViewManager()->bufferViewConfig(viewId); if (config) - disconnect(config, 0, this, 0); + disconnect(config, nullptr, this, nullptr); // update initialized State: bool wasInitialized = isInitialized(); @@ -163,7 +159,7 @@ void BufferViewOverlay::viewInitialized(BufferViewConfig *config) } 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 +173,7 @@ void BufferViewOverlay::viewInitialized(BufferViewConfig *config) void BufferViewOverlay::viewInitialized() { - BufferViewConfig *config = qobject_cast(sender()); + auto *config = qobject_cast(sender()); Q_ASSERT(config); viewInitialized(config); @@ -209,7 +205,7 @@ void BufferViewOverlay::updateHelper() QSet tempRemovedBuffers; if (Client::bufferViewManager()) { - BufferViewConfig *config = 0; + BufferViewConfig *config = nullptr; QSet::const_iterator viewIter; for (viewIter = _bufferViewIds.constBegin(); viewIter != _bufferViewIds.constEnd(); ++viewIter) { config = Client::bufferViewManager()->bufferViewConfig(*viewIter);