Bug 404330 - don't warn about const signals
Summary: don't warn about const signals
Status: RESOLVED INTENTIONAL
Alias: None
Product: clazy
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Sergio Martins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-14 09:42 UTC by Milian Wolff
Modified: 2019-02-14 11:21 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milian Wolff 2019-02-14 09:42:02 UTC
cf.: https://stackoverflow.com/questions/39281740/why-are-qt-signals-not-const

when you want to emit a signal from a const method, the signal has to be const. so there is a valid reason for when to make a signal const
Comment 1 Sergio Martins 2019-02-14 11:21:48 UTC
This has been discussed previously, and there's two schools of thought:

The purists say:
- signals are emitted to express that state has changed
- const methods don't change state
- so don't emit from const methods

The rebels say:
- Yeah, but I'm keeping state also in some global variables as I don't care about OOP so much
- And I can change these global variables from any const method


So the only solution is for you to disable the check