┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/kitemviews/kitemlistcontainer.h
diff options
context:
space:
mode:
authorFelix Ernst <[email protected]>2023-11-13 17:50:24 +0100
committerFelix Ernst <[email protected]>2023-11-18 10:49:11 +0000
commit046749b073422646b5ee7f5cbc1646519e471698 (patch)
tree045bafd2e29f6980c931e08880d8c95b0a0ff7dc /src/kitemviews/kitemlistcontainer.h
parentafc47abcb8c143674ba7148cee358c02f4b0fd7a (diff)
Make main view react to context menu events
Before this commit, Dolphin's main view would not react to any context menu events. It only showed context menus based on hard-coded mouse or keyboard events i.e. mouse right-click and presses of the "Menu" key. This commit removes those hard-coded reactions and instead makes it so the view shows a context menu whenever a QContextMenuEvent is received. Therefore, a context menu will now be opened when any platform- or system-specific context menu triggers are invoked e.g. the Shift+F10 keyboard shortcut. Aside from this, the only side-effect is a partial removal of an unrelated bug: Previously, the hover highlight on items was never cleared when the header column in details view mode was hovered. With this commit, the hover is now correctly cleared most of the time.
Diffstat (limited to 'src/kitemviews/kitemlistcontainer.h')
-rw-r--r--src/kitemviews/kitemlistcontainer.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/kitemviews/kitemlistcontainer.h b/src/kitemviews/kitemlistcontainer.h
index 40b075376..93016ab82 100644
--- a/src/kitemviews/kitemlistcontainer.h
+++ b/src/kitemviews/kitemlistcontainer.h
@@ -46,6 +46,7 @@ public:
protected:
void keyPressEvent(QKeyEvent *event) override;
+ void contextMenuEvent(QContextMenuEvent *event) override;
void showEvent(QShowEvent *event) override;
void resizeEvent(QResizeEvent *event) override;
void scrollContentsBy(int dx, int dy) override;