┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphincontextmenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dolphincontextmenu.cpp')
-rw-r--r--src/dolphincontextmenu.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp
index e2a41e907..47f0cdd40 100644
--- a/src/dolphincontextmenu.cpp
+++ b/src/dolphincontextmenu.cpp
@@ -116,28 +116,23 @@ DolphinContextMenu::Command DolphinContextMenu::open()
return m_command;
}
-void DolphinContextMenu::childEvent(QChildEvent* event)
+bool DolphinContextMenu::eventFilter(QObject* object, QEvent* event)
{
- if(event->added()) {
- event->child()->installEventFilter(this);
- }
- QMenu::childEvent(event);
-}
+ Q_UNUSED(object)
-bool DolphinContextMenu::eventFilter(QObject* dest, QEvent* event)
-{
if(event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease) {
QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
- if(m_removeAction && keyEvent->key() == Qt::Key_Shift) {
- if(event->type() == QEvent::KeyPress) {
+
+ if (m_removeAction && keyEvent->key() == Qt::Key_Shift) {
+ if (event->type() == QEvent::KeyPress) {
m_removeAction->update(DolphinRemoveAction::ShiftState::Pressed);
} else {
m_removeAction->update(DolphinRemoveAction::ShiftState::Released);
}
- return true;
}
}
- return QMenu::eventFilter(dest, event);
+
+ return false;
}
void DolphinContextMenu::openTrashContextMenu()