forked from qt-creator/qt-creator
Fix Ctrl+n shortcut in locator widget in some configurations
With Gnome, Qt seems to send shortcut override events to the CompletionList, and not to the input field, so handle the shortcut override for Ctrl+N/P there too. Technically this is the correct thing to do anyhow, since CompletionList also handles the corresponding key press events. Task-number: QTCREATORBUG-20867 Change-Id: Ia72aae3b085140f18b0f1007991d38864dfe8426 Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
@@ -514,6 +514,13 @@ bool CompletionList::eventFilter(QObject *watched, QEvent *event)
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case Qt::Key_P:
|
||||
case Qt::Key_N:
|
||||
if (ke->modifiers() == Qt::KeyboardModifiers(Utils::HostOsInfo::controlModifier())) {
|
||||
event->accept();
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return Utils::TreeView::eventFilter(watched, event);
|
||||
|
Reference in New Issue
Block a user