X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fbufferviewfilter.cpp;h=bb67e506048a9f2edfcbd1339e1fe7266b7c2932;hp=0cd749aa129dac7740d21803bafd9c19d6136d17;hb=73696998505c35c02bd019f78e9f502cbc36da5b;hpb=997fd2faaf19b25128fa7516be89aa5b0c165ae7 diff --git a/src/uisupport/bufferviewfilter.cpp b/src/uisupport/bufferviewfilter.cpp index 0cd749aa..bb67e506 100644 --- a/src/uisupport/bufferviewfilter.cpp +++ b/src/uisupport/bufferviewfilter.cpp @@ -97,6 +97,7 @@ void BufferViewFilter::setConfig(BufferViewConfig *config) { if(!config) { invalidate(); + setObjectName(""); return; } @@ -127,6 +128,8 @@ void BufferViewFilter::configInitialized() { disconnect(config(), SIGNAL(initDone()), this, SLOT(configInitialized())); + setObjectName(config()->bufferViewName()); + invalidate(); emit configChanged(); } @@ -281,7 +284,10 @@ bool BufferViewFilter::filterAcceptBuffer(const QModelIndex &source_bufferIndex) if(config()->networkId().isValid() && config()->networkId() != source_bufferIndex.data(NetworkModel::NetworkIdRole).value()) return false; - if(!(config()->allowedBufferTypes() & (BufferInfo::Type)source_bufferIndex.data(NetworkModel::BufferTypeRole).toInt())) + int allowedBufferTypes = config()->allowedBufferTypes(); + if(!config()->networkId().isValid()) + allowedBufferTypes &= ~BufferInfo::StatusBuffer; + if(!(allowedBufferTypes & source_bufferIndex.data(NetworkModel::BufferTypeRole).toInt())) return false; // the following dynamic filters may not trigger if the buffer is currently selected.