[Interest] emit keyword being used with non-signal
Kai Köhne
Kai.Koehne at qt.io
Thu Apr 29 10:58:01 CEST 2021
> -----Ursprüngliche Nachricht-----
> Von: Interest <interest-bounces at qt-project.org> Im Auftrag von Nuno
> Betreff: [Interest] emit keyword being used with non-signal
>
> Hi,
>
> I’ve been having a lot of this warnings by QtCreator.
>
> These are being raised by signals and I don’t find a reason for them to
> appear.
>
> Can anyone explain why this happens and how to solve?
This particular warning is from clazy, and is trying to tell you that you're using 'emit' on a function that is not marked as signal in the declaration using (Q_SIGNAL/signals: sections)
Anyhow, I think there was a recent issue with this warning that caused false positives: https://bugreports.qt.io/browse/QTCREATORBUG-25165
As a workaround, you can disable this very clazy check , see https://doc.qt.io/qtcreator/creator-clang-tools.html
Or you give the Qt Creator 4.15.0 RC a try, where it should be fixed, too 😊
Regards
Kai
More information about the Interest
mailing list