Commit b70139c9 authored by Michael Pyne's avatar Michael Pyne
Browse files

ui: Fix return key failing to start playback.

The search bar was broken because a missing `returnPressed` signal
declaration broke the signal/slot chain that was already present. An
update to the existing key press filter was sufficient to make pressing
return on a selected track in the Playlist work again, without the
downsides of using `QListWidget::itemActivated`.
parent b93e8cf4
......@@ -799,6 +799,11 @@ void Playlist::keyPressEvent(QKeyEvent *event)
else if(event->key() == Qt::Key_Return && !event->isAutoRepeat()) {
return; // event completely handled already
......@@ -1240,8 +1245,6 @@ void Playlist::slotInitialize()
connect(this, SIGNAL(customContextMenuRequested(QPoint)),
this, SLOT(slotShowRMBMenu(QPoint)));
connect(this, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)),
this, SLOT(slotPlayCurrent()));
// Disabled for now because adding new items (File->Open) causes Qt to send
// an itemChanged signal for unrelated playlist items which can cause the
......@@ -1372,7 +1375,6 @@ void Playlist::setup()
sortByColumn(1, Qt::AscendingOrder);
// Should this be itemActivated? It is quite annoying when I try it...
connect(this, &QTreeWidget::itemDoubleClicked, this, &Playlist::slotPlayCurrent);
// Use a timer to soak up the multiple dataChanged signals we're going to get
......@@ -55,6 +55,7 @@ protected:
void signalQueryChanged();
void signalDownPressed();
void returnPressed();
private slots:
void slotActivate();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment