From: Marcus Eggenberger Date: Thu, 29 May 2008 14:00:03 +0000 (+0000) Subject: This should finally fix the issue with the non working "auto fill X-Git-Tag: 0.2.0-rc1~79 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=233deaba96777471b8c51c6561195691ea9419b0 This should finally fix the issue with the non working "auto fill mode" in custom views... even on linux... *fingers crossed* --- diff --git a/src/uisupport/bufferviewfilter.cpp b/src/uisupport/bufferviewfilter.cpp index 0fe64269..e097c30f 100644 --- a/src/uisupport/bufferviewfilter.cpp +++ b/src/uisupport/bufferviewfilter.cpp @@ -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()); - } -} - void BufferViewFilter::checkPreviousCurrentForRemoval(const QModelIndex ¤t, const QModelIndex &previous) { Q_UNUSED(current); if(previous.isValid()) diff --git a/src/uisupport/bufferviewfilter.h b/src/uisupport/bufferviewfilter.h index 7fc62394..128b3e83 100644 --- a/src/uisupport/bufferviewfilter.h +++ b/src/uisupport/bufferviewfilter.h @@ -65,7 +65,6 @@ public slots: void checkPreviousCurrentForRemoval(const QModelIndex ¤t, 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; diff --git a/version.inc b/version.inc index 0b5237cb..2c33707c 100644 --- a/version.inc +++ b/version.inc @@ -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;