Qt-UnusedNonTrivialVariable

Warns about unused Qt value classes

Required inputs: IR

This rule is based on clazy rule unused-non-trivial-variable

Possible Messages

Key

Text

Severity

Disabled

unused_qt_variable

Unused variable of type {}.

None

False

Options

consider_types

consider_types : set[bauhaus.analysis.config.GlobPattern] = set()

Unused variables of the additional types named here will be reported unless they should be ignored. Globbing patterns are supported. (clazy calls this a whitelist where the blacklist with types to be ignored is only active if no-whitelist is true.)
 

ignore_types

ignore_types : set[bauhaus.analysis.config.GlobPattern] = set()

Variables of the additional types named here are ignored in this check. Globbing patterns are supported. (clazy calls this blacklist.)
 

level

level : int = 0

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

predefined_consider_types

predefined_consider_types

Type: set[bauhaus.analysis.config.GlobPattern]

Default: {'QAssociativeIterable', 'QBitArray', 'QBitmap', 'QBrush', 'QBuffer', 'QByteArray', 'QByteArrayList', 'QCache', 'QCollator', 'QCollatorSortKey', 'QColor', 'QCursor', 'QDateTime', 'QDir', 'QDomNode', 'QEvent', 'QFileInfo', 'QFont', 'QFontInfo', 'QFontMetrics', 'QFontMetricsF', 'QHash', 'QHostAddress', 'QIcon', 'QImage', 'QJSValue', 'QJsonArray', 'QJsonDocument', 'QLine', 'QLineF', 'QLinkedList', 'QList', 'QListSpecialMethods', 'QLocale', 'QMap', 'QMimeType', 'QMultiHash', 'QMultiMap', 'QNetworkConfiguration', 'QNetworkCookie', 'QNetworkRequest', 'QPainterPath', 'QPalette', 'QPen', 'QPersistentModelIndex', 'QPicture', 'QPixmap', 'QQueue', 'QRect', 'QRectF', 'QRegExp', 'QRegion', 'QRegularExpression', 'QSequentialIterable', 'QSet', 'QSqlField', 'QSqlQuery', 'QSqlRecord', 'QStack', 'QStaticText', 'QStorageInfo', 'QString', 'QStringRef', 'QTextCursor', 'QTextFrameFormat', 'QTextImageFormat', 'QUrl', 'QUrlQuery', 'QVarLengthArray', 'QVariant', 'QVector'}

Unused variables of the types named here will be reported unless they should be ignored. Globbing patterns are supported. If this entry is set to empty (and consider_types remains empty) then any type (i.e. all types) will considered but may be explicitly ignored.
 

predefined_ignore_types

predefined_ignore_types

Type: set[bauhaus.analysis.config.GlobPattern]

Default: {'PRNGLocker', 'QBoolBlocker', 'QDBusBlockingCallWatcher', 'QDBusWriteLocker', 'QDebugStateSaver', 'QMutexLocker', 'QOrderedMutexLocker', 'QReadLocker', 'QScopedPointer', 'QScopedScopeLevelCounter', 'QScopedValueRollback', 'QSetValueOnDestroy', 'QSignalBlocker', 'QTextBlockFormat', 'QTextLine', 'QWriteLocker'}

Variables of the types named here are ignored in this check. Globbing patterns are supported.