+ /**
+ * Get the position of the view within this widget that has @p item in the view.
+ * This means that the item can be seen by the user in that view when scrolled to the right position.
+ * If the view has folders expanded and @p item is one of them, the view will also be returned.
+ * @param item The URL of the item we want to find.
+ * @return a small struct containing the tab index of the view and whether it is
+ * in the primary view. A std::nullopt is returned if there is no view open that has @p item visible anywhere.
+ */
+ const std::optional<const ViewIndex> viewShowingItem(const QUrl &item) const;
+
+private:
+ QPointer<DolphinTabPage> m_lastViewedTab;
+ QPointer<DolphinNavigatorsWidgetAction> m_navigatorsWidget;