qt.cfg: configure some QString methods

This commit is contained in:
Daniel Marjamäki 2017-04-18 19:21:34 +02:00
parent 01c5c2fc5b
commit 296f250caa
2 changed files with 152 additions and 0 deletions

View File

@ -88,6 +88,157 @@
<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"/>

View File

@ -22,6 +22,7 @@ void QString1(QString s) {
int QString2() {
QString s;
// cppcheck-suppress ignoredReturnValue
// cppcheck-suppress reademptycontainer
s.at(10);
}