From 803bbd1ae191a89ffdb3889acb6621431525f96d Mon Sep 17 00:00:00 2001 From: Akseli Lahtinen Date: Fri, 8 Mar 2024 11:37:20 +0000 Subject: Start autoActivationTimer only if hovering over a directory Before starting autoActivationTimer, check that we're hovering the item on top of a directory. If we don't check for it, the the autoActivationTimer will try to open the hovered item in it's default application, which can be distracting and break the actual action the user was trying to do, like moving the file to a directory. BUG:479960 --- src/kitemviews/kitemmodelbase.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/kitemviews/kitemmodelbase.h') diff --git a/src/kitemviews/kitemmodelbase.h b/src/kitemviews/kitemmodelbase.h index 4e1fd8a8f..42a9c54c9 100644 --- a/src/kitemviews/kitemmodelbase.h +++ b/src/kitemviews/kitemmodelbase.h @@ -159,6 +159,15 @@ public: // decision whether it accepts the drop? virtual bool supportsDropping(int index) const; + /** + * @return True, if the item with the index \a index can be entered in during hover actions. + * Per default false is returned. + * + * This is used to check that if the item + * we're hovering on is either directory or a desktop file. + */ + virtual bool canEnterOnHover(int index) const; + /** * @return An internal mimetype to signal that an itemDropEvent() should be rejected by * the receiving model. -- cgit v1.3.1