Since commit
9f33f6e4 a 'hide current buffer' shortcut is available.
This is the global application shortcut like Sput referenced in
http://bugs.quassel-irc.org/issues/668
Keeping a hard-coded KeyPress event doing the same seems unnecessary.
Users have also expressed dislike in the use of 'Backspace' for this
buffer removal. Unintentional buffer removals are often for some.
This commit removes the 'KeyPress' event and cleans up the
'hideCurrentBuffer' code, removing commented (un-needed) code.
Reference: http://bugs.quassel-irc.org/issues/1403
Fixes #1403. Closes GH-299.
}
-void BufferView::keyPressEvent(QKeyEvent *event)
-{
- if (event->key() == Qt::Key_Backspace || event->key() == Qt::Key_Delete) {
- event->accept();
- removeSelectedBuffers();
- }
- TreeViewTouch::keyPressEvent(event);
-}
-
-
void BufferView::dropEvent(QDropEvent *event)
{
QModelIndex index = indexAt(event->pos());
//The check above means we won't be looking at a network, which should always be the first row, so we can just go backwards.
changeBuffer(Backward);
- /*if(removedRows.contains(bufferId))
- continue;
-
- removedRows << bufferId;*/
- /*if(permanently)
- config()->requestRemoveBufferPermanently(bufferId);
- else*/
config()->requestRemoveBuffer(bufferId);
}
void removeBufferPermanently(const QModelIndex &);
protected:
- virtual void keyPressEvent(QKeyEvent *);
virtual void dropEvent(QDropEvent *event);
virtual void rowsInserted(const QModelIndex &parent, int start, int end);
virtual void wheelEvent(QWheelEvent *);