cppcheck/cfg/qt.cfg

435 lines
14 KiB
INI
Raw Normal View History

2014-01-02 20:09:28 +01:00
<?xml version="1.0"?>
<def format="2">
2014-01-02 20:09:28 +01:00
<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"/>
2014-01-02 20:09:28 +01:00
<!-- 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>
2014-01-02 20:09:28 +01:00
<!-- 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 -->
2014-01-02 20:09:28 +01:00
<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>
<define name="SIGNAL(X)" value="#X"/>
<define name="SLOT(X)" value="#X"/>
<function name="connect">
<noreturn>false</noreturn>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3">
<not-null/>
<not-uninit/>
</arg>
<arg nr="4">
<not-uninit/>
</arg>
2014-01-02 20:09:28 +01:00
</function>
<function name="disconnect">
<noreturn>false</noreturn>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3">
<not-null/>
<not-uninit/>
</arg>
<arg nr="4">
<not-uninit/>
</arg>
</function>
<function name="tr">
<noreturn>false</noreturn>
<use-retval/>
<arg nr="1">
<strz/>
</arg>
2014-01-02 20:09:28 +01:00
</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>
2017-04-18 19:21:34 +02:00
<!-- const QChar QString::at(int position) const -->
<function name="QList::at,QString::at,QStringList::at">
2017-04-18 19:21:34 +02:00
<noreturn>false</noreturn>
<use-retval/>
<arg nr="1">
<not-uninit/>
</arg>
</function>
<!-- int QString::capacity() const -->
<function name="QString::capacity">
<noreturn>false</noreturn>
<use-retval/>
</function>
2017-04-23 20:41:34 +02:00
<!-- iterator QList::..() -->
<function name="QList::begin,QList::end,QList::cbegin,QList::cend,QList::constBegin,QList::constEnd,QList::rbegin,QList::rend,QList::crbegin,QList::crend">
2017-04-18 19:21:34 +02:00
<noreturn>false</noreturn>
<use-retval/>
</function>
2017-04-23 20:41:34 +02:00
<!-- iterator QString::..() -->
<function name="QString::begin,QString::end,QString::cbegin,QString::cend,QString::constBegin,QString::constEnd,QString::rbegin,QString::rend,QString::crbegin,QString::crend">
2017-04-18 19:21:34 +02:00
<noreturn>false</noreturn>
<use-retval/>
</function>
<!-- iterator QStringList::..() -->
<function name="QStringList::begin,QStringList::end,QStringList::cbegin,QStringList::cend,QStringList::constBegin,QStringList::constEnd,QStringList::rbegin,QStringList::rend,QStringList::crbegin,QStringList::crend">
<noreturn>false</noreturn>
<use-retval/>
</function>
2017-04-18 19:21:34 +02:00
<!-- void QString::chop() -->
<function name="QString::chop">
<noreturn>false</noreturn>
<arg nr="1">
<not-uninit/>
</arg>
</function>
<!-- void QString::clear() -->
2017-04-23 20:41:34 +02:00
<function name="QList::clear,QString::clear">
2017-04-18 19:21:34 +02:00
<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>
2017-04-23 20:41:34 +02:00
<!-- bool QList::contains(const T &value) const -->
<!-- bool QList::startsWith(const T &value) const -->
<!-- bool QList::endsWith(const T &value) const -->
<function name="QList::contains,QList::startsWith,QList::endsWith">
2017-04-18 19:21:34 +02:00
<noreturn>false</noreturn>
<use-retval/>
2017-04-23 20:41:34 +02:00
<returnValue type="bool"/>
<arg nr="1">
<not-uninit/>
</arg>
2017-04-18 19:21:34 +02:00
</function>
<!-- bool QString::contains(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const -->
2017-04-23 20:41:34 +02:00
<!-- bool QString::startsWith(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const -->
<!-- bool QString::endsWith(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const -->
<function name="QString::contains,QString::startsWith,QString::endsWith">
2017-04-18 19:21:34 +02:00
<noreturn>false</noreturn>
<use-retval/>
2017-04-23 20:41:34 +02:00
<returnValue type="bool"/>
2017-04-18 19:21:34 +02:00
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2" default="Qt::CaseSensitive">
<not-uninit/>
</arg>
</function>
<!-- bool QStringList::contains(const T &value) const -->
<!-- bool QStringList::startsWith(const T &value) const -->
<!-- bool QStringList::endsWith(const T &value) const -->
<function name="QStringList::contains,QStringList::startsWith,QStringList::endsWith">
<noreturn>false</noreturn>
<use-retval/>
<returnValue type="bool"/>
<arg nr="1">
<not-uninit/>
</arg>
</function>
2017-04-23 20:41:34 +02:00
<!-- int QList::count() const -->
<!-- int QList::length() const -->
<!-- int QList::size() const -->
2017-04-18 19:21:34 +02:00
<!-- int QString::count() const -->
2017-04-23 20:41:34 +02:00
<!-- int QString::length() const -->
<!-- int QString::size() const -->
<!-- int QStringList::count() const -->
<!-- int QStringList::length() const -->
<!-- int QStringList::size() const -->
<function name="QList::count,QList::length,QList::size,QString::count,QString::length,QString::size,QStringList::count,QStringList::length,QStringList::size">
2017-04-18 19:21:34 +02:00
<noreturn>false</noreturn>
<use-retval/>
2017-04-23 20:41:34 +02:00
<returnValue type="signed int"/>
2017-04-18 19:21:34 +02:00
</function>
2017-04-23 20:41:34 +02:00
<!-- bool QList::empty() const -->
<!-- bool QList::isEmpty() const -->
<!-- bool QString::isEmpty() const -->
<!-- bool QString::isNull() const -->
<!-- bool QStringList::empty() const -->
<!-- bool QStringList::isEmpty() const -->
<function name="QList::empty,QList::isEmpty::QString::isEmpty,QString::isNull,QStringList::empty,QStringList::isEmpty::">
2017-04-18 19:21:34 +02:00
<noreturn>false</noreturn>
<use-retval/>
2017-04-23 20:41:34 +02:00
<returnValue type="bool"/>
</function>
<!-- int QList::indexOf(const T &) const -->
<!-- int QStringList::indexOf(const QString &) const -->
<function name="QList::indexOf,QStringList::indexOf">
2017-04-23 20:41:34 +02:00
<noreturn>false</noreturn>
<use-retval/>
<returnValue type="signed int"/>
2017-04-18 19:21:34 +02:00
<arg nr="1">
<not-uninit/>
</arg>
</function>
2017-04-23 20:41:34 +02:00
<!-- int QString::indexOf(const QString &str, Qt::CaseSensitivity cs = Qt::CaseSensitive) const -->
2017-04-18 19:21:34 +02:00
<function name="QString::indexOf">
<noreturn>false</noreturn>
<use-retval/>
2017-04-23 20:41:34 +02:00
<returnValue type="signed int"/>
2017-04-18 19:21:34 +02:00
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2" default="Qt::CaseSensitive">
<not-uninit/>
</arg>
</function>
2017-04-23 20:41:34 +02:00
<!-- bool QString::isRightToLeft() const -->
<function name="QString::isRightToLeft">
2017-04-18 19:21:34 +02:00
<noreturn>false</noreturn>
<use-retval/>
</function>
2017-04-23 20:41:34 +02:00
<!-- int QList::lastIndexOf(const T &value, int from = -1) const -->
<!-- int QStringList::lastIndexOf(const QString &value, int from = -1) const -->
<function name="QList::lastIndexOf,QStringList::lastIndexOf">
2017-04-18 19:21:34 +02:00
<noreturn>false</noreturn>
<use-retval/>
2017-04-23 20:41:34 +02:00
<returnValue type="signed int"/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2" default="-1">
<not-uninit/>
</arg>
2017-04-18 19:21:34 +02:00
</function>
2017-04-23 20:41:34 +02:00
<!-- int QString::lastIndexOf(const QString &str, int from = -1, Qt::CaseSensitivity cs = Qt::CaseSensitive) const -->
2017-04-18 19:21:34 +02:00
<function name="QString::lastIndexOf">
<noreturn>false</noreturn>
<use-retval/>
2017-04-23 20:41:34 +02:00
<returnValue type="signed int"/>
2017-04-18 19:21:34 +02:00
<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>
2017-04-23 20:41:34 +02:00
<!-- QList<T> QList::mid(int pos, int length = -1) const -->
2017-04-18 19:21:34 +02:00
<!-- QString QString::mid(int position, int n = -1) const -->
<!-- QStringList QStringList::mid(int pos, int length = -1) const -->
<function name="QList::mid,QString::mid,QStringList::mid">
2017-04-18 19:21:34 +02:00
<noreturn>false</noreturn>
<use-retval/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2" default="-1">
<not-uninit/>
</arg>
</function>
<function name="QString::right">
<noreturn>false</noreturn>
<use-retval/>
<arg nr="1">
<not-uninit/>
<not-bool/>
<valid>0:</valid>
</arg>
</function>
<function name="QString::split">
<noreturn>false</noreturn>
<use-retval/>
<arg nr="1">
<not-uninit/>
</arg>
</function>
<function name="QString::toInt">
<noreturn>false</noreturn>
<use-retval/>
<arg nr="1" default="0">
<not-uninit/>
</arg>
<arg nr="2" default="10">
<not-uninit/>
<valid>0,2:32</valid>
</arg>
</function>
<function name="QString::toLower">
<noreturn>false</noreturn>
<use-retval/>
</function>
<function name="QString::toStdString">
<noreturn>false</noreturn>
<use-retval/>
</function>
<function name="QString::toUpper">
<noreturn>false</noreturn>
<use-retval/>
</function>
2017-04-18 18:04:27 +02:00
<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"/>
2017-04-23 20:41:34 +02:00
<function name="length" yields="size"/>
2017-04-18 18:04:27 +02:00
<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>
2017-04-23 20:41:34 +02:00
<container id="qtList" startPattern="QList &lt;" 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>
2017-04-18 18:04:27 +02:00
<container id="qtString" startPattern="QString" endPattern="" inherits="qtContainer" opLessAllowed="true">
<type string="std-like"/>
<size>
2017-04-23 20:41:34 +02:00
<function name="isNull" yields="empty"/>
2017-04-18 18:04:27 +02:00
<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>
<container id="qtStringList" startPattern="QStringList" 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=""/>
2015-03-21 15:26:32 +01:00
<define name="Q_DECLARE_FLAGS(x,y)" value=""/>
2014-12-14 01:52:00 +01:00
<define name="Q_DISABLE_COPY(C)" value="C(C&amp;);C&amp; operator=(const C&amp;);"/>
<define name="Q_ENUM(X)" value=""/>
2015-03-21 15:26:32 +01:00
<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=""/>
2016-05-23 11:13:25 +02:00
<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"/>
2014-01-02 20:09:28 +01:00
</def>