Signature not normalized warning
-
Hi,
I got following annoying problem:I have following warning in my code:
Signature is not normalized. Use locationCodeChanged(QString) instead of locationCodeChanged( QString ) [clazy-connect-not-normalized]I found this:
https://forum.qt.io/topic/18651/understanding-signature-normalization-for-signals-and-slots
but it doesn't help.My signal takes QString and slot takes const QString&.
How should it look like to get rid of it?
-
-
Or even better - use the new signal slot syntax.
-
@Christian-Ehrlicher ok, I will use new syntax, but regarding old one:
removed all spaces as @Pl45m4 suggested, but it doesn't help at all:
Is it even possible to get rid of this warning in old syntax?
-
@Kaluss said in Signature not normalized warning:
My signal takes QString and slot takes const QString&.
Then why does your
SLOT()
not takeconst QString&
?I would save file, exit, re-enter, and show exact warning being shown, not chopped off as per your last....
-
@Kaluss said in Signature not normalized warning:
My signal takes QString and slot takes const QString&.
Out of curiosity, why not use a ˋconst QString &` as well for your signal ? There no reason to force a copy when it's not needed.