On 2/28/2020 2:37 PM, Max Paperno wrote:

I humbly suggest, in general, that a signal name could be prefixed with "sig", "sig_", "signal" or "signal_".  "sigEmptied()" doesn't look horrible IMHO, and should work semantically with any verb. Using prefixes to signify meaning already has some precedence in C/C++ world as well. And lastly even "dumb" syntax highlighters could pick up on that pretty easily (even w/out access to, or needing to parse, any header files to determine what is a signal), though of course there could be *"false positives"* for any other words starting with "sig" (like "significantElements()" :) ).

Sorry, "significantElements()" is a bad example of course. The "sig" would need to be followed by upper case (or "[nal][_]") and be called w/out a return value (on a new line or at least "standalone" within an [implied] block like "if (foo) sigEmptied();"). So actually false positives are probably not very likely.

-Max

_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to