Qt-QtMacros

Qt macros should not be misused

Required inputs: IR

Looks for misuses of Qt Macros. This includes:
  • Checks of any macro beginning with Q_OS_* before qglobal.h is included.
  • Uses of Q_OS_WINDOWS instead of Q_OS_WIN.

This rule is based on clazy rule qt-macros

Possible Messages

Key

Text

Severity

Disabled

check_before_include

{} should not be checked before qglobal.h is included

None

False

nonexistent_macro

Q_OS_WINDOWS does not exists, use Q_OS_WIN instead

None

False

Options

check_for_q_os_windows

check_for_q_os_windows : bool = False

Whether this rule should check for uses of the Q_OS_WINDOWS macro.
 

level

level : int = 0

Importance level of the rule as given for clazy. 0 is most desirable, higher values fall off in quality.