X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fbufferview.cpp;h=4ad1138eaf3cea587b0729c5f0860106e1bbb997;hb=ef0e65458bf4e1cbc01399fe0e025a5b4fd327dc;hp=c60aa80f4d905f43b868bea0a2027f757e6a83be;hpb=748f25bbae0e0ca8df58ec69df8d19c84ae77252;p=quassel.git diff --git a/src/qtui/bufferview.cpp b/src/qtui/bufferview.cpp index c60aa80f..4ad1138e 100644 --- a/src/qtui/bufferview.cpp +++ b/src/qtui/bufferview.cpp @@ -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 ¤t) { - emit selectionChanged(current, QItemSelectionModel::ClearAndSelect); + } void BufferView::dropEvent(QDropEvent *event) {