Don't use QKeySequence::Delete to detect delete key event for play queue, instead check for no modifiers and the Delete key itself. Closing a terminal with Ctrl-D seems to cause Cantata to see QKeySequence::Delete
BUG: 377
This commit is contained in:
committed by
craig.p.drummond
parent
452e0c77fe
commit
20cc2bec8c
@@ -34,6 +34,9 @@
|
||||
max_output_buffer_size setting.
|
||||
18. Add CMake option to disable streams, dynamic, and online services. Refer to
|
||||
INSTALL file for details.
|
||||
19. Don't use QKeySequence::Delete to detect delete key event for play queue,
|
||||
instead check for no modifiers and the Delete key itself. Closing a
|
||||
terminal with Ctrl-D seems to cause Cantata to see QKeySequence::Delete
|
||||
|
||||
1.2.2
|
||||
-----
|
||||
|
||||
@@ -142,8 +142,12 @@ enum Tabs
|
||||
|
||||
bool DeleteKeyEventHandler::eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
if (view->hasFocus() && QEvent::KeyRelease==event->type() && static_cast<QKeyEvent *>(event)->matches(QKeySequence::Delete)) {
|
||||
act->trigger();
|
||||
if (view->hasFocus() && QEvent::KeyRelease==event->type()) {
|
||||
QKeyEvent *keyEvent=static_cast<QKeyEvent *>(event);
|
||||
|
||||
if (Qt::NoModifier==keyEvent->modifiers() && Qt::Key_Delete==keyEvent->key()) {
|
||||
act->trigger();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return QObject::eventFilter(obj, event);
|
||||
|
||||
Reference in New Issue
Block a user