Fixed Bug in ModelPropertyMapper where currentChanges where unnoticed cause the rowIn...
[quassel.git] / src / qtui / bufferviewfilter.cpp
index 4fe8fed..d30c313 100644 (file)
 /*****************************************
 * The Filter for the Tree View
 *****************************************/
-BufferViewFilter::BufferViewFilter(QAbstractItemModel *model, const Modes &filtermode, const QStringList &nets) : QSortFilterProxyModel(model) {
+BufferViewFilter::BufferViewFilter(QAbstractItemModel *model, const Modes &filtermode, const QStringList &nets)
+  : QSortFilterProxyModel(model),
+    mode(filtermode),
+    networks(nets)
+{
   setSourceModel(model);
   setSortRole(BufferTreeModel::BufferNameRole);
   setSortCaseSensitivity(Qt::CaseInsensitive);
-    
-  mode = filtermode;
-  networks = nets;
   
   connect(model, SIGNAL(invalidateFilter()), this, SLOT(invalidateMe()));
-  connect(model, SIGNAL(selectionChanged(const QModelIndex &)),
-          this, SLOT(select(const QModelIndex &)));
-  
-  connect(this, SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)),
-          model, SLOT(changeCurrent(const QModelIndex &, const QModelIndex &)));
 }
 
 void BufferViewFilter::invalidateMe() {
   invalidateFilter();
 }
 
-void BufferViewFilter::select(const QModelIndex &index) {
-  emit selectionChanged(mapFromSource(index));
-}
-
-void BufferViewFilter::changeCurrent(const QModelIndex &current, const QModelIndex &previous) {
-  emit currentChanged(mapToSource(current), mapToSource(previous));
-}
-
-void BufferViewFilter::doubleClickReceived(const QModelIndex &clicked) {
-  emit doubleClicked(mapToSource(clicked));
-}
-
 void BufferViewFilter::dropEvent(QDropEvent *event) {
   const QMimeData *data = event->mimeData();
   if(!(mode & FullCustom))