Qt-GenericΒΆ

Selection of generic rules for Qt

Nested Rules

Qt-Generic-DuplicateIncludeGuard

Different include files should not use the same include guard

Qt-Generic-FormatSpecifier

Validates the use of format specifiers

Qt-Generic-InitializeAllFieldsInConstructor

A constructor must initialize all data members of the class

Qt-Generic-MissingBaseCopy

Do call the base class copy constructor or assignment operator, if you implement a copy constructor or assignment operator in a derived class

Qt-Generic-MissingIncludeGuard

Include files need an include guard

Qt-Generic-MissingTrCall

Use QObject::tr() in QWidget constructors

Qt-Generic-NoAbsoluteInclude

Do not use absolute path names in #include

Qt-Generic-NoFunctionDefinitionInHeader

Do not define (non-inline) functions in header files

Qt-Generic-NoIrregularInclude

Avoid #includes which cannot be syntactically integrated

Qt-Generic-NoMixOfClassStruct

Consistently use either the keyword class or struct per composite type, do not mix them

Qt-Generic-NoOverloadedOperators

Do not overload certain operators

Qt-Generic-NoReferenceToLocalVariable

Do not return a reference or pointer to a local variable

Qt-Generic-QNetworkReplyDeleteLater

Check QNetworkReply::deleteLater

Qt-Generic-ThrowByValueCatchByReference

Throw exceptions by value and catch them by reference

Qt-Generic-TypedefCheck

Do not redefine a typedef

Qt-Generic-WrongIncludeCasing

Includes should use same casing as target file name

Options