tuli
13th November 2022, 07:35
Hi,
I have a Q_PROPERTY like so:
Q_PROPERTY(QString name READ name WRITE setName)
clazy warns that
a non-CONSTANT Q_PROPERTY is missing a NOTIFY signal.
https://github.com/KDE/clazy/blob/1.11/docs/checks/README-qproperty-without-notify.md
Why is that? In my case it cant be CONSTANT because it has a WRITE setter. But it cant be NOTIFY either because there is no signal fired when it is set.
I am rarely using Q_PROPERTY, so my best guess is it's not the right tool for the case I am describing. If so, why not?
Qt doc (https://doc.qt.io/qt-6/properties.html) also has some examples that look just like mine.
I have a Q_PROPERTY like so:
Q_PROPERTY(QString name READ name WRITE setName)
clazy warns that
a non-CONSTANT Q_PROPERTY is missing a NOTIFY signal.
https://github.com/KDE/clazy/blob/1.11/docs/checks/README-qproperty-without-notify.md
Why is that? In my case it cant be CONSTANT because it has a WRITE setter. But it cant be NOTIFY either because there is no signal fired when it is set.
I am rarely using Q_PROPERTY, so my best guess is it's not the right tool for the case I am describing. If so, why not?
Qt doc (https://doc.qt.io/qt-6/properties.html) also has some examples that look just like mine.