diff options
| author | Elvis Angelaccio <[email protected]> | 2017-08-24 18:33:27 +0200 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2017-09-07 21:31:42 +0200 |
| commit | 2fd85facf85b39f84eeada10bcf80060bb72ab51 (patch) | |
| tree | f72067d82a5f6f15486cbb6ae4f7aa806c4ff5a2 /src/dolphincontextmenu.cpp | |
| parent | 735b171451a05cdda77f711ff1ef23408e9389ed (diff) | |
Fix DolphinRemoveAction Shift toggling on Wayland
QGuiApplication::queryKeyboardModifiers() does not work on Wayland [1].
We don't need it in the first place, since we already know (thanks to
the key events) whether Shift has been pressed or released.
So we can just pass this information to DolphinRemoveAction::update().
BUG: 354301
[1]: https://bugreports.qt.io/browse/QTBUG-62786
Differential Revision: https://phabricator.kde.org/D7519
Diffstat (limited to 'src/dolphincontextmenu.cpp')
| -rw-r--r-- | src/dolphincontextmenu.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index b297fb7fb..b4d249d76 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -124,7 +124,7 @@ DolphinContextMenu::Command DolphinContextMenu::open() void DolphinContextMenu::keyPressEvent(QKeyEvent *ev) { if (m_removeAction && ev->key() == Qt::Key_Shift) { - m_removeAction->update(); + m_removeAction->update(DolphinRemoveAction::ShiftState::Pressed); } QMenu::keyPressEvent(ev); } @@ -132,7 +132,7 @@ void DolphinContextMenu::keyPressEvent(QKeyEvent *ev) void DolphinContextMenu::keyReleaseEvent(QKeyEvent *ev) { if (m_removeAction && ev->key() == Qt::Key_Shift) { - m_removeAction->update(); + m_removeAction->update(DolphinRemoveAction::ShiftState::Released); } QMenu::keyReleaseEvent(ev); } |
