From 5a562e16806e1335ecc594ec36ef9af12e57c040 Mon Sep 17 00:00:00 2001 From: Sebastian Englbrecht Date: Sun, 31 May 2026 19:02:09 +0200 Subject: actionwithwidget: use QPointer::data() for explicit pointer extraction Returning a QPointer where T* is expected relies on an implicit conversion that cppcheck cannot model correctly. Use .data() to make the intent explicit. --- src/selectionmode/actionwithwidget.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/selectionmode/actionwithwidget.h b/src/selectionmode/actionwithwidget.h index 8e09e92e0..52369bf85 100644 --- a/src/selectionmode/actionwithwidget.h +++ b/src/selectionmode/actionwithwidget.h @@ -45,13 +45,13 @@ public: inline QAction *action() { Q_ASSERT(m_action); - return m_action; + return m_action.data(); }; /** @returns the widget of this object. */ inline QWidget *widget() { - return m_widget; + return m_widget.data(); } /** -- cgit v1.3.1