┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/places/placespanel.h
diff options
context:
space:
mode:
authorFushan Wen <[email protected]>2021-12-28 00:51:10 +0800
committerFushan Wen <[email protected]>2021-12-28 22:48:28 +0800
commiteb0a7da653493db272ee6039d5202c5702acffc3 (patch)
treec0d630e5123d546d6c244a362b6eb53c141435ff /src/panels/places/placespanel.h
parentc071150b7d30c8826496f130b792aed47d4f8326 (diff)
kitemlistview: Port KItemListView::itemAt to std::optional
Use `value_or(-1)` for those functions that don't use `std::optional`.
Diffstat (limited to 'src/panels/places/placespanel.h')
-rw-r--r--src/panels/places/placespanel.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/panels/places/placespanel.h b/src/panels/places/placespanel.h
index ce28c8c08..e19447cbf 100644
--- a/src/panels/places/placespanel.h
+++ b/src/panels/places/placespanel.h
@@ -8,6 +8,8 @@
#ifndef PLACESPANEL_H
#define PLACESPANEL_H
+#include <optional>
+
#include "panels/panel.h"
#include <QUrl>
@@ -93,7 +95,7 @@ private:
QMimeData* m_itemDropEventMimeData;
QDropEvent* m_itemDropEvent;
QTimer m_tooltipTimer;
- int m_hoveredIndex;
+ std::optional<int> m_hoveredIndex;
QPoint m_hoverPos;
};