Skip to content

Commit

Permalink
const-signal-or-slot: Improve readme
Browse files Browse the repository at this point in the history
Clarify what's bad about const signals
  • Loading branch information
iamsergio committed Jul 10, 2018
1 parent b63df9f commit 5407f16
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion docs/checks/README-const-signal-or-slot.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
Warns when a signal or non-void slot is const.

This aims to prevent unintentionally marking a getter as slot, or connecting to
the wrong method. For signals, it's just pointless to mark them as const.
the wrong method.

For signals it's more of a minor issue. Prevents you from emitting signals from
const methods, as these methods shouldn't change state, and a signal implies state
was changed. Helps minimizing having global state (which is the only state you can
change from a const method).

Warns for the following cases:

Expand Down

0 comments on commit 5407f16

Please sign in to comment.