Bug 381976

Summary: connect-not-normalized triggered because of spaces around the signature
Product: [Developer tools] clazy Reporter: Eugenio <jfrusciante>
Component: generalAssignee: Mathias Kraus <k.hias>
Status: RESOLVED NOT A BUG    
Severity: normal CC: smartins
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Eugenio 2017-07-04 07:01:47 UTC
If a signal connection looks like this

  SIGNAL( loadStepFinished( QString, int ) )

instead of

  SIGNAL( loadStepFinished(QString, int) )

then an error is triggered:

  Signature is not normalized. Use triggerNextLoadStep(QString,int) instead of triggerNextLoadStep( QString, int )...

Removing the spaces in the parentheses solves the false positive. It is however not easily feasible in big project with automatic code styling.
Comment 1 Christoph Feck 2017-07-04 09:04:01 UTC
For which tool did you want to report this? Qt Creator? Clazy? KDevelop?
Comment 2 Eugenio 2017-07-04 11:00:33 UTC
clazy, somehow I changed id before submitting, sorry.
Comment 3 Sergio Martins 2017-07-04 11:15:01 UTC
This is not a false positive, in fact that's the whole point of this check.

Your signature is not normalized, it will allocate memory.

If you have a big project and don't want to fix it then you can disable the check instead.

There's a script in KDE somewhere that helps normalizing signatures though
Comment 4 Eugenio 2017-07-04 12:20:19 UTC
I see, I though it applied to parameter types and not to spaces. Thank you.