We now have a current svn snapshot of libqxt in our contrib dir, and
[quassel.git] / src / qtui / bufferview.cpp
index c57737f..4ad1138 100644 (file)
@@ -45,15 +45,6 @@ void BufferView::init() {
   setSortingEnabled(true);
   sortByColumn(0, Qt::AscendingOrder);
   
-  connect(selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)),
-          model(), SLOT(changeCurrent(const QModelIndex &, const QModelIndex &)));
-  
-  connect(model(), SIGNAL(selectionChanged(const QModelIndex &)),
-          this, SLOT(select(const QModelIndex &)));
-  
-  connect(this, SIGNAL(selectionChanged(const QModelIndex &, QItemSelectionModel::SelectionFlags)),
-          selectionModel(), SLOT(select(const QModelIndex &, QItemSelectionModel::SelectionFlags)));
-
   connect(this, SIGNAL(activated(QModelIndex)), this, SLOT(joinChannel(QModelIndex)));
 }
 
@@ -65,12 +56,10 @@ void BufferView::setFilteredModel(QAbstractItemModel *model, BufferViewFilter::M
 }
 
 void BufferView::setModel(QAbstractItemModel *model) {
+  delete selectionModel();
   QTreeView::setModel(model);
   init();
-}
-
-void BufferView::select(const QModelIndex &current) {
-  emit selectionChanged(current, QItemSelectionModel::ClearAndSelect);
+  
 }
 
 void BufferView::dropEvent(QDropEvent *event) {
@@ -86,7 +75,7 @@ void BufferView::dropEvent(QDropEvent *event) {
 void BufferView::joinChannel(const QModelIndex &index) {
   Buffer::Type bufferType = (Buffer::Type)index.data(BufferTreeModel::BufferTypeRole).toInt();
 
-  if(bufferType != Buffer::ChannelBuffer)
+  if(bufferType != Buffer::ChannelType)
     return;
   
   Client::fakeInput(index.data(BufferTreeModel::BufferUidRole).toUInt(), QString("/JOIN %1").arg(index.sibling(index.row(), 0).data().toString()));