[clazy] [Bug 465408] New: clazy-incorrect-emit give warning about missing emit keyword if emit is in a macro

Trần Nam Tuấn bugzilla_noreply at kde.org
Tue Feb 7 09:06:11 GMT 2023


https://bugs.kde.org/show_bug.cgi?id=465408

            Bug ID: 465408
           Summary: clazy-incorrect-emit give warning about missing emit
                    keyword if emit is in a macro
    Classification: Developer tools
           Product: clazy
           Version: unspecified
          Platform: Archlinux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: unassigned-bugs at kde.org
          Reporter: tuantran1632001 at gmail.com
                CC: smartins at kde.org
  Target Milestone: ---

Created attachment 156019
  --> https://bugs.kde.org/attachment.cgi?id=156019&action=edit
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

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Unassigned-bugs mailing list