diff options
| author | Sebastian Englbrecht <[email protected]> | 2026-05-31 19:02:09 +0200 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2026-06-01 09:04:16 +0000 |
| commit | 5a562e16806e1335ecc594ec36ef9af12e57c040 (patch) | |
| tree | d2c2b89947843eb3be4e72bc8cc9c290df656d9b | |
| parent | 44973c9dd016569e643a73148c32bd1a0b01d71d (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.h | 4 |
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(); } /** |
