┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Englbrecht <[email protected]>2026-05-31 19:02:09 +0200
committerMéven Car <[email protected]>2026-06-01 09:04:16 +0000
commit5a562e16806e1335ecc594ec36ef9af12e57c040 (patch)
treed2c2b89947843eb3be4e72bc8cc9c290df656d9b
parent44973c9dd016569e643a73148c32bd1a0b01d71d (diff)
actionwithwidget: use QPointer::data() for explicit pointer extraction
Returning a QPointer<T> where T* is expected relies on an implicit conversion that cppcheck cannot model correctly. Use .data() to make the intent explicit.
-rw-r--r--src/selectionmode/actionwithwidget.h4
1 files 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();
}
/**