]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/kitemviews/kitemlistcontroller.h
kitemlistview: Port KItemListView::itemAt to std::optional
[dolphin.git] / src / kitemviews / kitemlistcontroller.h
index f4092576adf56f54aad08f62ee13d9a652da7207..5fe195e9f490b7411b592f2cebd01f9c79332c9c 100644 (file)
@@ -9,6 +9,8 @@
 #ifndef KITEMLISTCONTROLLER_H
 #define KITEMLISTCONTROLLER_H
 
+#include <optional>
+
 #include "dolphin_export.h"
 #include "kitemset.h"
 
@@ -329,7 +331,7 @@ private:
     KItemListView* m_view;
     KItemListSelectionManager* m_selectionManager;
     KItemListKeyboardSearchManager* m_keyboardManager;
-    int m_pressedIndex;
+    std::optional<int> m_pressedIndex;
     QPointF m_pressedMousePos;
 
     QTimer* m_autoActivationTimer;