projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Quassel no longer gets a nervous breakdown when you select too many buffers - fixes...
[quassel.git]
/
src
/
uisupport
/
bufferviewfilter.cpp
diff --git
a/src/uisupport/bufferviewfilter.cpp
b/src/uisupport/bufferviewfilter.cpp
index
0cd749a
..
bb67e50
100644
(file)
--- a/
src/uisupport/bufferviewfilter.cpp
+++ b/
src/uisupport/bufferviewfilter.cpp
@@
-97,6
+97,7
@@
void BufferViewFilter::setConfig(BufferViewConfig *config) {
if(!config) {
invalidate();
if(!config) {
invalidate();
+ setObjectName("");
return;
}
return;
}
@@
-127,6
+128,8
@@
void BufferViewFilter::configInitialized() {
disconnect(config(), SIGNAL(initDone()), this, SLOT(configInitialized()));
disconnect(config(), SIGNAL(initDone()), this, SLOT(configInitialized()));
+ setObjectName(config()->bufferViewName());
+
invalidate();
emit configChanged();
}
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<NetworkId>())
return false;
if(config()->networkId().isValid() && config()->networkId() != source_bufferIndex.data(NetworkModel::NetworkIdRole).value<NetworkId>())
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.
return false;
// the following dynamic filters may not trigger if the buffer is currently selected.