const int BufferViewOverlay::_updateEventId = QEvent::registerEventType();
BufferViewOverlay::BufferViewOverlay(QObject *parent)
- : QObject(parent),
- _aboutToUpdate(false),
- _uninitializedViewCount(0),
- _allowedBufferTypes(0),
- _minimumActivity(0)
+ : QObject(parent)
{
}
}
}
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();
}
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()))
void BufferViewOverlay::viewInitialized()
{
- BufferViewConfig *config = qobject_cast<BufferViewConfig *>(sender());
+ auto *config = qobject_cast<BufferViewConfig *>(sender());
Q_ASSERT(config);
viewInitialized(config);