Skip to content

Fix FP returnByReference for implicitly shared Qt types - #9097

Open
FreddyFunk wants to merge 1 commit into
cppcheck-opensource:mainfrom
FreddyFunk:fix/qt-return-by-reference
Open

FreddyFunk wants to merge 1 commit into
cppcheck-opensource:mainfrom
FreddyFunk:fix/qt-return-by-reference

Conversation

@FreddyFunk

Copy link
Copy Markdown

When trying to address cppcheck findings in KDE, I stumbled across misleading returnByReference warnings for implicitly shared Qt types:
https://invent.kde.org/plasma/plasma-mobile/-/merge_requests/972#note_1731500

Instead of individually silencing those warnings in the KDE code base, I decided to try to implement this here, so other projects that utilize Qt and cppcheck would benefit was well.

I based my implementation on the following Qt docs:

This is my first contribution to cppcheck. Please let me know if there is a better way to do this.

@dmcppcheck

Copy link
Copy Markdown
Contributor

There should probably be a trac ticket for this PR. Please create it, or ask us to create it. Then the PR title should be updated.

@FreddyFunk

Copy link
Copy Markdown
Author

The setup of a user account seems very complicated and is required to create a trac ticket. So if you can, please feel free create the required ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants