Quassel no longer gets a nervous breakdown when you select too many buffers - fixes...
[quassel.git] / src / client / buffermodel.cpp
index de41550..2c003f3 100644 (file)
@@ -23,7 +23,6 @@
 #include <QAbstractItemView>
 
 #include "client.h"
 #include <QAbstractItemView>
 
 #include "client.h"
-#include "mappedselectionmodel.h"
 #include "networkmodel.h"
 #include "quassel.h"
 
 #include "networkmodel.h"
 #include "quassel.h"
 
@@ -49,16 +48,8 @@ bool BufferModel::filterAcceptsRow(int sourceRow, const QModelIndex &parent) con
   return false;
 }
 
   return false;
 }
 
-void BufferModel::synchronizeSelectionModel(MappedSelectionModel *selectionModel) {
-  _selectionModelSynchronizer.addSelectionModel(selectionModel);
-}
-
 void BufferModel::synchronizeView(QAbstractItemView *view) {
 void BufferModel::synchronizeView(QAbstractItemView *view) {
-  MappedSelectionModel *mappedSelectionModel = new MappedSelectionModel(view->model());
-  _selectionModelSynchronizer.addSelectionModel(mappedSelectionModel);
-  Q_ASSERT(mappedSelectionModel);
-  delete view->selectionModel();
-  view->setSelectionModel(mappedSelectionModel);
+  _selectionModelSynchronizer.synchronizeSelectionModel(view->selectionModel());
 }
 
 void BufferModel::setCurrentIndex(const QModelIndex &newCurrent) {
 }
 
 void BufferModel::setCurrentIndex(const QModelIndex &newCurrent) {