A New Krazy Checker for Classes Requiring Q_OBJECT

Allen Winter winter at kde.org
Fri May 11 00:05:07 BST 2007


Tonight's Krazy run will start looking for QObject derived classes
that are without the Q_OBJECT macro.  This new checker was written
by  Thorsten Roeder.

A test run in kdelibs shows the following  files with this issue:
        ./khtml/misc/paintbuffer.h: line#38 (1)
        ./kross/core/metafunction.h: line#42 (1)
        ./kdeprint/lpr/lprsettings.h: line#34 (1)
        ./kdeprint/lpr/lpchelper.h: line#30 (1)
        ./kdeprint/lpr/lpqhelper.h: line#28 (1)
        ./kdeprint/kmspecialmanager.h: line#31 (1)
        ./kdeprint/kmthreadjob.h: line#29 (1)
        ./kdeprint/lpd/gschecker.h: line#27 (1)
        ./kjsembed/kjsembed/eventproxy.h: line#44 (1)

The checker only looks for classes directly derived from QObject.
It doesn't traverse an inheritance tree -- but still this is useful.
We can make it smarter as time permits.

Report false positives to me or Thorsten.

-Allen




More information about the kde-core-devel mailing list