cppcheck/cfg/qt.cfg

302 lines
9.3 KiB
INI

<?xml version="1.0"?>
<def format="1">
<markup ext=".qml" reporterrors="false" aftercode="true">
<!-- keywords in QML code to ignore -->
<keywords>
<keyword name="if"/>
<keyword name="while"/>
<keyword name="typeof"/>
<keyword name="for"/>
</keywords>
<!-- code blocks are meta-code/pseudo code placed in the library
that is used/called by the native c/c++ code -->
<codeblocks>
<!-- need to add all the QML function names below -->
<block name="onClicked"/>
<block name="onFinished"/>
<block name="onTriggered"/>
<block name="onRetrieveTriggered"/>
<block name="onPressed"/>
<block name="onTouch"/>
<block name="onFocusedChanged"/>
<block name="onSubmittedNewStatusChanged"/>
<block name="onCreationCompleted"/>
<block name="onFileSelected"/>
<!-- code block structure in QML is:
onClicked: {
call(var)
} -->
<structure offset="3" start="{" end="}"/>
<!-- the start block is '3' tokens after the
name token so we skip them -->
</codeblocks>
<codeblocks>
<block name="function"/>
<!-- code block structure in QML is:
funnction x(args): {
call(var)
} -->
<structure offset="2" start="{" end="}"/>
</codeblocks>
<!-- Qt Properties have the format :
Q_PROPERTY(<type> <name> READ <func> WRITE <func> NOTIFY <func>)
the READ/WRITE/NOTIFY parts are optional -->
<exported>
<exporter prefix="Q_PROPERTY">
<suffix>READ</suffix>
<!-- catch the element before READ if present -->
<prefix>READ</prefix>
<prefix>WRITE</prefix>
<prefix>NOTIFY</prefix>
</exporter>
</exported>
<!-- qml files can call connect on the c++ code -->
<imported>
<importer>connect</importer>
</imported>
</markup>
<!-- qt can call methods as strings using invokeMethod -->
<reflection>
<call arg="2">invokeMethod</call>
</reflection>
<!-- the SLOT/SIGNAL methods can be cause false-positives for pure
virtual functions being called in the constructor because it sees
the macro as a function. -->
<function name="SLOT">
<ignorefunction>true</ignorefunction>
</function>
<function name="SIGNAL">
<ignorefunction>true</ignorefunction>
</function>
<!-- QString & QString::sprintf(const char * cformat, ...); -->
<function name="QString::sprintf">
<noreturn>false</noreturn>
<leak-ignore/>
<formatstr/>
<arg nr="1">
<formatstr/>
<not-uninit/>
</arg>
</function>
<!-- QString & QString::asprintf(const char * cformat, ...); -->
<function name="QString::asprintf">
<noreturn>false</noreturn>
<leak-ignore/>
<formatstr/>
<arg nr="1">
<formatstr/>
<not-uninit/>
</arg>
</function>
<!-- const QChar QString::at(int position) const -->
<function name="QString::at">
<noreturn>false</noreturn>
<use-retval/>
<arg nr="1">
<not-uninit/>
</arg>
</function>
<!-- iterator QString::begin() -->
<function name="QString::begin">
<noreturn>false</noreturn>
<use-retval/>
</function>
<!-- int QString::capacity() const -->
<function name="QString::capacity">
<noreturn>false</noreturn>
<use-retval/>
</function>
<!-- const_iterator QString::cbegin() const -->
<function name="QString::cbegin">
<noreturn>false</noreturn>
<use-retval/>
</function>
<!-- const_iterator QString::cend() const -->
<function name="QString::cend">
<noreturn>false</noreturn>
<use-retval/>
</function>
<!-- void QString::chop() -->
<function name="QString::chop">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
</arg>
</function>
<!-- void QString::clear() -->
<function name="QString::clear">
<noreturn>false</noreturn>
</function>
<!-- int QString::compare() const -->
<function name="QString::compare">
<noreturn>false</noreturn>
<use-retval/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2" default="Qt::CaseSensitive">
<not-uninit/>
</arg>
</function>
<!-- const_iterator QString::constBegin() const -->
<function name="QString::constBegin">
<noreturn>false</noreturn>
<use-retval/>
</function>
<!-- const_iterator QString::constEnd() const -->
<function name="QString::constEnd">
<noreturn>false</noreturn>
<use-retval/>
</function>
<!-- bool QString::contains(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const -->
<function name="QString::contains">
<noreturn>false</noreturn>
<use-retval/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2" default="Qt::CaseSensitive">
<not-uninit/>
</arg>
</function>
<!-- int QString::count() const -->
<function name="QString::count">
<noreturn>false</noreturn>
<use-retval/>
</function>
<!-- bool QString::endsWith(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const -->
<function name="QString::endsWith">
<noreturn>false</noreturn>
<use-retval/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2" default="Qt::CaseSensitive">
<not-uninit/>
</arg>
</function>
<!-- bool QString::indexOf(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const -->
<function name="QString::indexOf">
<noreturn>false</noreturn>
<use-retval/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2" default="Qt::CaseSensitive">
<not-uninit/>
</arg>
</function>
<!-- bool QString::isEmpty() const -->
<function name="QString::isEmpty">
<noreturn>false</noreturn>
<use-retval/>
</function>
<!-- bool QString::isNull() const -->
<function name="QString::isNull">
<noreturn>false</noreturn>
<use-retval/>
</function>
<!-- bool QString::isRightToLeft() const -->
<function name="QString::isRightToLeft">
<noreturn>false</noreturn>
<use-retval/>
</function>
<!-- bool QString::lastIndexOf(const QString &str, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const -->
<function name="QString::lastIndexOf">
<noreturn>false</noreturn>
<use-retval/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2" default="-1">
<not-uninit/>
</arg>
<arg nr="3" default="Qt::CaseSensitive">
<not-uninit/>
</arg>
</function>
<!-- QString QString::left(int n) const -->
<function name="QString::left">
<noreturn>false</noreturn>
<use-retval/>
<arg nr="1">
<not-uninit/>
</arg>
</function>
<!-- int QString::length() const -->
<function name="QString::length">
<noreturn>false</noreturn>
<use-retval/>
</function>
<!-- QString QString::mid(int position, int n = -1) const -->
<function name="QString::mid">
<noreturn>false</noreturn>
<use-retval/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2" default="-1">
<not-uninit/>
</arg>
</function>
<container id="qtContainer" opLessAllowed="false">
<type templateParameter="0"/>
<size>
<function name="append" action="push"/>
<function name="clear" action="clear"/>
<function name="count" yields="size"/>
<function name="erase" action="erase"/>
<function name="insert" action="insert"/>
<function name="isEmpty" yields="empty"/>
<function name="size" yields="size"/>
<function name="swap" action="change"/>
</size>
<access>
<function name="begin" yields="start-iterator"/>
<function name="cbegin" yields="start-iterator"/>
<function name="constBegin" yields="start-iterator"/>
<function name="end" yields="end-iterator"/>
<function name="cend" yields="end-iterator"/>
<function name="constEnd" yields="end-iterator"/>
</access>
</container>
<container id="qtString" startPattern="QString" endPattern="" inherits="qtContainer" opLessAllowed="true">
<type string="std-like"/>
<size>
<function name="resize" action="resize"/>
</size>
<access indexOperator="array-like">
<function name="at" yields="at_index"/>
<function name="front" yields="item"/>
<function name="back" yields="item"/>
</access>
</container>
<define name="Q_DECL_EXPORT" value=""/>
<define name="Q_DECL_IMPORT" value=""/>
<define name="Q_DECLARE_FLAGS(x,y)" value=""/>
<define name="Q_DISABLE_COPY(C)" value="C(C&amp;);C&amp; operator=(const C&amp;);"/>
<define name="Q_ENUM(X)" value=""/>
<define name="Q_ENUMS(X)" value=""/>
<define name="Q_FLAGS(X)" value=""/>
<define name="Q_INTERFACES(X)" value=""/>
<define name="Q_OBJECT" value=""/>
<define name="Q_PROPERTY(X)" value=""/>
<define name="foreach(A,B)" value="for(A:B)"/>
<podtype name="qint8" sign="s" size="1"/>
<podtype name="qint16" sign="s" size="2"/>
<podtype name="qint32" sign="s" size="4"/>
<podtype name="qint64" sign="s" size="8"/>
<podtype name="quint8" sign="u" size="1"/>
<podtype name="quint16" sign="u" size="2"/>
<podtype name="quint32" sign="u" size="4"/>
<podtype name="quint64" sign="u" size="8"/>
<podtype name="qlonglong" sign="s"/>
<podtype name="qulonglong" sign="u"/>
<podtype name="uchar" sign="u"/>
<podtype name="uint" sign="u"/>
<podtype name="ulong" sign="u"/>
<podtype name="ushort" sign="u"/>
<podtype name="qptrdiff" sign="s"/>
<podtype name="quinitptr" sign="u"/>
</def>