This should finally fix the issue with the non working "auto fill
authorMarcus Eggenberger <egs@quassel-irc.org>
Thu, 29 May 2008 14:00:03 +0000 (14:00 +0000)
committerMarcus Eggenberger <egs@quassel-irc.org>
Thu, 29 May 2008 14:00:03 +0000 (14:00 +0000)
mode" in custom views... even on linux... *fingers crossed*

src/uisupport/bufferviewfilter.cpp
src/uisupport/bufferviewfilter.h
version.inc

index 0fe6426..e097c30 100644 (file)
@@ -43,7 +43,6 @@ BufferViewFilter::BufferViewFilter(QAbstractItemModel *model, BufferViewConfig *
 {
   setConfig(config);
   setSourceModel(model);
-  connect(model, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SLOT(source_rowsInserted(const QModelIndex &, int, int)));
                        
   setDynamicSortFilter(true);
 
@@ -191,9 +190,11 @@ bool BufferViewFilter::filterAcceptBuffer(const QModelIndex &source_bufferIndex)
   if(config()->bufferList().contains(bufferId))
     return true;
 
-  if(config()->isInitialized() && !config()->removedBuffers().contains(bufferId) && activityLevel > Buffer::OtherActivity)
+  if(config()->isInitialized() && !config()->removedBuffers().contains(bufferId)
+     && (activityLevel > Buffer::OtherActivity || config()->addNewBuffersAutomatically())) {
     addBuffer(bufferId);
-
+  }
+  
   return false;
 }
 
@@ -276,20 +277,6 @@ QVariant BufferViewFilter::foreground(const QModelIndex &index) const {
   return _FgColorNoActivity;
 }
 
-void BufferViewFilter::source_rowsInserted(const QModelIndex &parent, int start, int end) {
-  if(parent.data(NetworkModel::ItemTypeRole) != NetworkModel::NetworkItemType)
-    return;
-
-  if(!config() || !config()->addNewBuffersAutomatically())
-    return;
-
-  QModelIndex child;
-  for(int row = start; row <= end; row++) {
-    child = sourceModel()->index(row, 0, parent);
-    addBuffer(sourceModel()->data(child, NetworkModel::BufferIdRole).value<BufferId>());
-  }
-}
-
 void BufferViewFilter::checkPreviousCurrentForRemoval(const QModelIndex &current, const QModelIndex &previous) {
   Q_UNUSED(current);
   if(previous.isValid())
index 7fc6239..128b3e8 100644 (file)
@@ -65,7 +65,6 @@ public slots:
   void checkPreviousCurrentForRemoval(const QModelIndex &current, const QModelIndex &previous);
   void checkItemForRemoval(const QModelIndex &index) { checkItemsForRemoval(index, index); }
   void checkItemsForRemoval(const QModelIndex &topLeft, const QModelIndex &bottomRight);
-  void source_rowsInserted(const QModelIndex &parent, int start, int end);
   
 protected:
   bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
index 0b5237c..2c33707 100644 (file)
@@ -4,8 +4,8 @@
 { using namespace Global;
 
   quasselVersion = "0.2.0-beta2-pre";
-  quasselDate = "2008-05-26";
-  quasselBuild = 859;
+  quasselDate = "2008-05-29";
+  quasselBuild = 862;
 
   //! Minimum client build number the core needs
   clientBuildNeeded = 731;