Clazy-Level-1

Clazy checks from level 1

Nested Rules

Qt-AutoUnexpectedQStringbuilder

Finds places where QStringBuilder is deduced instead of QString, which introduces crashes

Qt-ChildEventQObjectCast

Finds places within child events where qobject_cast can fail

Qt-Connect3argLambda

Warns when using the 3-arg QObject::connect that takes a lambda

Qt-ConstSignalOrSlot

Warns when a signal or non-void slot is const

Qt-DetachingTemporary

Calling non-const member functions on temporaries should be avoided

Qt-IncorrectEmit

The emit (or Q_EMIT) macro shall be used iff emitting a signal

Qt-InstallEventFilter

Warns on potential misuse of QObject::installEventFilter()

Qt-NonPodGlobalStatic

Global statics shall be trivially default constructible and trivially destructible

Qt-OverriddenSignal

Overriding a signal might have unintended effects

Qt-PostEvent

Finds places where an event is not correctly passed to QCoreApplication::postEvent()

Qt-QLatin1StringNonAscii

Finds places where you’re using QLatin1String with a non-ascii literal

Qt-QhashNamespace

The enclosing namespace of an overload of qHash shall match its argument’s namespace

Qt-RangeLoopDetach

Do not use range-based for loops with non-const range-expression on Qt containers

Qt-RangeLoopReference

Finds places where you’re using C++11 range-loops with non-trivial types by value

Qt-ReturningDataFromTemporary

Referencing data from a temporary QByteArray leads to use-after-free

Qt-RuleOfTwoSoft

A trivial copy constructor or copy assignment operator is called despite non-trivial counter parts

Qt-SkippedBaseMethod

Avoid calling methods from indirect base classes that are redefined in a direct one

Qt-VirtualSignal

Signals should not be virtual

Options