diff options
author | Eike Ziller <eike.ziller@qt.io> | 2018-08-13 14:27:58 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2018-08-16 10:37:33 +0000 |
commit | b70f2b2a697b7483c2dd24a5e1ddd184b8c1fa84 (patch) | |
tree | 268a8b7bc0f37c6c45ecbc9738ea7bc94b65ac83 | |
parent | 16803bf9ecb548d10124e9056a59fc7ef8e771e7 (diff) |
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>
-rw-r--r-- | src/plugins/coreplugin/locator/locatorwidget.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/coreplugin/locator/locatorwidget.cpp b/src/plugins/coreplugin/locator/locatorwidget.cpp index 55be82072a..f15f645b7b 100644 --- a/src/plugins/coreplugin/locator/locatorwidget.cpp +++ b/src/plugins/coreplugin/locator/locatorwidget.cpp @@ -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); |