Summary: | clazy-incorrect-emit give warning about missing emit keyword if emit is in a macro | ||
---|---|---|---|
Product: | [Developer tools] clazy | Reporter: | Trần Nam Tuấn (Bill) <tuantran1632001> |
Component: | general | Assignee: | Unassigned bugs mailing-list <unassigned-bugs> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | smartins |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Test project |
Created attachment 156019 [details] Test project SUMMARY I write a lot of setters, so I create a macro to avoid retyping a lot of the code: #define UPDATE(NAME) \ if (m_##NAME == newVar) \ return; \ m_##NAME = newVar; \ Q_EMIT NAME##Changed(newVar); Clazy then warn about "missing emit keyword on signal call" if I use the macro. The code does work, however. Tested in QtCreator and Kdevelop. SOFTWARE/OS VERSIONS Linux: Arch Linux KDE Plasma Version: 5.26.5 KDE Frameworks Version: 5.102.0 Qt Version: 5.15.8 Clazy: 1.11