Stop RFC-violating IRC servers from crashing quassel
[quassel.git] / src / uisupport / bufferviewfilter.cpp
index 2af2515..6bd6565 100644 (file)
@@ -49,7 +49,7 @@ BufferViewFilter::BufferViewFilter(QAbstractItemModel *model, BufferViewConfig *
     _sortOrder(Qt::AscendingOrder),
     _showServerQueries(false),
     _editMode(false),
-    _enableEditMode(tr("Show / Hide buffers"), this)
+    _enableEditMode(tr("Show / Hide Chats"), this)
 {
   setConfig(config);
   setSourceModel(model);
@@ -326,7 +326,7 @@ bool BufferViewFilter::filterAcceptBuffer(const QModelIndex &source_bufferIndex)
   if(!(allowedBufferTypes & bufferType))
     return false;
 
-  if(bufferType & BufferInfo::QueryBuffer && !_showServerQueries) {
+  if(bufferType & BufferInfo::QueryBuffer && !_showServerQueries && sourceModel()->data(source_bufferIndex, Qt::DisplayRole).toString().contains('.')) {
     return false;
   }