aboutsummaryrefslogtreecommitdiffstats
path: root/src/checks/level1/README-const-signal-or-slot.md
blob: 9a3e71b277e08952eb3ed2b369aeb320758fb277 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# const-signal-or-slot

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.

Warns for the following cases:

- non-void const method marked as slot
- const method marked as signal
- connecting to a method which isn't marked as slot, is const and returns non-void

For exposing methods to QML prefer either Q_PROPERTY or Q_INVOKABLE.