qt.cfg: Add more QString:: methods, fix errors. (#1185)

Additionally fix QString::sprintf() and QString::asprintf()
configurations.

Fix typo in quin[i]tptr.

Add warning for QString::sprintf and QString::vsprintf.
These functions are obsolete since Qt5, see
https://doc.qt.io/qt-5/qstring-obsolete.html
This commit is contained in:
Sebastian 2018-04-24 12:23:23 +02:00 committed by GitHub
parent c3cb0ddf8c
commit 86d54c63c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 364 additions and 2 deletions

View File

@ -158,16 +158,71 @@
<!-- QString & QString::sprintf(const char * cformat, ...); --> <!-- QString & QString::sprintf(const char * cformat, ...); -->
<function name="QString::sprintf"> <function name="QString::sprintf">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<returnValue type="QString &amp;"/>
<leak-ignore/> <leak-ignore/>
<formatstr/> <formatstr/>
<arg nr="1"> <arg nr="1">
<formatstr/> <formatstr/>
<not-uninit/> <not-uninit/>
</arg> </arg>
<warn severity="style" alternatives="QString::asprintf,QString::arg,QTextStream" reason="Obsolete"/>
</function> </function>
<!-- QString & QString::asprintf(const char * cformat, ...); --> <!-- QString & QString::append(const QString &str); -->
<!-- QString & QString::append(const QChar *str, int len); -->
<!-- QString & QString::append(QChar ch); -->
<!-- QString & QString::append(const QStringRef &reference); -->
<!-- QString & QString::append(QLatin1String str); -->
<!-- QString & QString::append(const char *str); -->
<!-- QString & QString::append(const QByteArray &ba); -->
<function name="QString::append">
<noreturn>false</noreturn>
<returnValue type="QString &amp;"/>
<leak-ignore/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2" default="0">
<not-uninit/>
</arg>
</function>
<!-- QString QString::arg(const QString & a, int fieldWidth = 0, const QChar & fillChar = QLatin1Char( ' ' )) const -->
<!-- QString QString::arg(const QString & a1, const QString & a2) const -->
<!-- QString QString::arg(const QString & a1, const QString & a2, const QString & a3) const -->
<!-- QString QString::arg(const QString & a1, const QString & a2, const QString & a3, const QString & a4) const -->
<!-- QString QString::arg(const QString & a1, const QString & a2, const QString & a3, const QString & a4, const QString & a5) const -->
<!-- QString QString::arg(const QString & a1, const QString & a2, const QString & a3, const QString & a4, const QString & a5, const QString & a6) const -->
<!-- QString QString::arg(const QString & a1, const QString & a2, const QString & a3, const QString & a4, const QString & a5, const QString & a6, const QString & a7) const -->
<!-- QString QString::arg(const QString & a1, const QString & a2, const QString & a3, const QString & a4, const QString & a5, const QString & a6, const QString & a7, const QString & a8) const -->
<!-- QString QString::arg(const QString & a1, const QString & a2, const QString & a3, const QString & a4, const QString & a5, const QString & a6, const QString & a7, const QString & a8, const QString & a9) const -->
<!-- QString QString::arg(int a, int fieldWidth = 0, int base = 10, const QChar & fillChar = QLatin1Char( ' ' )) const -->
<!-- QString QString::arg(uint a, int fieldWidth = 0, int base = 10, const QChar & fillChar = QLatin1Char( ' ' )) const -->
<!-- QString QString::arg(long a, int fieldWidth = 0, int base = 10, const QChar & fillChar = QLatin1Char( ' ' )) const -->
<!-- QString QString::arg(ulong a, int fieldWidth = 0, int base = 10, const QChar & fillChar = QLatin1Char( ' ' )) const -->
<!-- QString QString::arg(qlonglong a, int fieldWidth = 0, int base = 10, const QChar & fillChar = QLatin1Char( ' ' )) const -->
<!-- QString QString::arg(qulonglong a, int fieldWidth = 0, int base = 10, const QChar & fillChar = QLatin1Char( ' ' )) const -->
<!-- QString QString::arg(short a, int fieldWidth = 0, int base = 10, const QChar & fillChar = QLatin1Char( ' ' )) const -->
<!-- QString QString::arg(ushort a, int fieldWidth = 0, int base = 10, const QChar & fillChar = QLatin1Char( ' ' )) const -->
<!-- QString QString::arg(QChar a, int fieldWidth = 0, const QChar & fillChar = QLatin1Char( ' ' )) const -->
<!-- QString QString::arg(char a, int fieldWidth = 0, const QChar & fillChar = QLatin1Char( ' ' )) const -->
<!-- QString QString::arg(double a, int fieldWidth = 0, char format = 'g', int precision = -1, const QChar & fillChar = QLatin1Char( ' ' )) const -->
<function name="QString::arg">
<noreturn>false</noreturn>
<returnValue type="QString"/>
<use-retval/>
<leak-ignore/>
<const/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="any">
<not-uninit/>
</arg>
</function>
<!-- QString QString::asprintf(const char * cformat, ...); -->
<function name="QString::asprintf"> <function name="QString::asprintf">
<noreturn>false</noreturn> <noreturn>false</noreturn>
<returnValue type="QString"/>
<use-retval/>
<leak-ignore/> <leak-ignore/>
<formatstr/> <formatstr/>
<arg nr="1"> <arg nr="1">
@ -323,6 +378,20 @@
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- QString QString::fromLocal8Bit(const char * str, int size = -1) //static -->
<function name="QString::fromLocal8Bit">
<noreturn>false</noreturn>
<use-retval/>
<returnValue type="QString"/>
<leak-ignore/>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2" default="-1">
<not-uninit/>
</arg>
</function>
<!-- QString QString::fromStdString(const std::string &str) //static --> <!-- QString QString::fromStdString(const std::string &str) //static -->
<function name="QString::fromStdString"> <function name="QString::fromStdString">
<noreturn>false</noreturn> <noreturn>false</noreturn>
@ -373,6 +442,26 @@
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- QString & QString::insert(int position, const QString & str) -->
<!-- QString & QString::insert(int position, const QLatin1String & str) -->
<!-- QString & QString::insert(int position, const QChar * unicode, int size) -->
<!-- QString & QString::insert(int position, QChar ch) -->
<function name="QString::insert">
<noreturn>false</noreturn>
<returnValue type="QString &amp;"/>
<arg nr="1">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="2">
<not-uninit/>
<not-bool/>
</arg>
<arg nr="3" default="0">
<not-uninit/>
<not-bool/>
</arg>
</function>
<!-- bool QString::isRightToLeft() const --> <!-- bool QString::isRightToLeft() const -->
<function name="QString::isRightToLeft"> <function name="QString::isRightToLeft">
<noreturn>false</noreturn> <noreturn>false</noreturn>
@ -449,6 +538,86 @@
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- QString & QString::prepend(const QString & str) -->
<!-- QString & QString::prepend(const QLatin1String & str) -->
<!-- QString & QString::prepend(const QByteArray & ba) -->
<!-- QString & QString::prepend(const char * str) -->
<!-- QString & QString::prepend(QChar ch) -->
<function name="QString::prepend">
<noreturn>false</noreturn>
<returnValue type="QString &amp;"/>
<leak-ignore/>
<arg nr="1">
<not-null/>
<not-uninit/>
<not-bool/>
</arg>
</function>
<!-- QString & QString::remove(int position, int n) -->
<!-- QString & QString::remove(QChar ch, Qt::CaseSensitivity cs = Qt::CaseSensitive) -->
<!-- QString & QString::remove(const QString & str, Qt::CaseSensitivity cs = Qt::CaseSensitive) -->
<!-- QString & QString::remove(const QRegExp & rx) -->
<function name="QString::remove">
<noreturn>false</noreturn>
<returnValue type="QString &amp;"/>
<leak-ignore/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2" default="0">
<not-uninit/>
</arg>
</function>
<!-- QString QString::repeated(int times) const -->
<function name="QString::repeated">
<noreturn>false</noreturn>
<returnValue type="QString"/>
<use-retval/>
<const/>
<arg nr="1">
<not-uninit/>
</arg>
</function>
<!-- QString & QString::replace(int position, int n, const QString & after) -->
<!-- QString & QString::replace(int position, int n, const QChar * unicode, int size) -->
<!-- QString & QString::replace(int position, int n, QChar after) -->
<!-- QString & QString::replace(const QString & before, const QString & after, Qt::CaseSensitivity cs = Qt::CaseSensitive) -->
<!-- QString & QString::replace(const QChar * before, int blen, const QChar * after, int alen, Qt::CaseSensitivity cs = Qt::CaseSensitive) -->
<!-- QString & QString::replace(QChar ch, const QString & after, Qt::CaseSensitivity cs = Qt::CaseSensitive) -->
<!-- QString & QString::replace(QChar before, QChar after, Qt::CaseSensitivity cs = Qt::CaseSensitive) -->
<!-- QString & QString::replace(const QLatin1String & before, const QLatin1String & after, Qt::CaseSensitivity cs = Qt::CaseSensitive) -->
<!-- QString & QString::replace(const QLatin1String & before, const QString & after, Qt::CaseSensitivity cs = Qt::CaseSensitive) -->
<!-- QString & QString::replace(const QString & before, const QLatin1String & after, Qt::CaseSensitivity cs = Qt::CaseSensitive) -->
<!-- QString & QString::replace(QChar c, const QLatin1String & after, Qt::CaseSensitivity cs = Qt::CaseSensitive) -->
<!-- QString & QString::replace(const QRegExp & rx, const QString & after) -->
<function name="QString::replace">
<noreturn>false</noreturn>
<returnValue type="QString &amp;"/>
<leak-ignore/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3" default="0">
<not-uninit/>
</arg>
<arg nr="4" default="0">
<not-uninit/>
</arg>
<arg nr="5" default="0">
<not-uninit/>
</arg>
</function>
<!-- void QString::reserve(int size) -->
<function name="QString::reserve">
<noreturn>false</noreturn>
<returnValue type="void"/>
<arg nr="1">
<not-uninit/>
</arg>
</function>
<!-- QString QString::right(int n) const --> <!-- QString QString::right(int n) const -->
<function name="QString::right"> <function name="QString::right">
<noreturn>false</noreturn> <noreturn>false</noreturn>
@ -462,6 +631,52 @@
<valid>0:</valid> <valid>0:</valid>
</arg> </arg>
</function> </function>
<!-- QString QString::section(QChar sep, int start, int end = -1, SectionFlags flags = SectionDefault) const -->
<!-- QString QString::section(const QString & sep, int start, int end = -1, SectionFlags flags = SectionDefault) const -->
<!-- QString QString::section(const QRegExp & reg, int start, int end = -1, SectionFlags flags = SectionDefault) const -->
<function name="QString::section">
<noreturn>false</noreturn>
<returnValue type="QString"/>
<use-retval/>
<leak-ignore/>
<const/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<arg nr="3" default="-1">
<not-uninit/>
</arg>
<arg nr="4" default="SectionDefault">
<not-uninit/>
</arg>
</function>
<!-- QString & QString::setNum(int n, int base = 10) -->
<!-- QString & QString::setNum(uint n, int base = 10) -->
<!-- QString & QString::setNum(long n, int base = 10) -->
<!-- QString & QString::setNum(ulong n, int base = 10) -->
<!-- QString & QString::setNum(qlonglong n, int base = 10) -->
<!-- QString & QString::setNum(qulonglong n, int base = 10) -->
<!-- QString & QString::setNum(short n, int base = 10) -->
<!-- QString & QString::setNum(ushort n, int base = 10) -->
<!-- QString & QString::setNum(double n, char format = 'g', int precision = 6) -->
<!-- QString & QString::setNum(float n, char format = 'g', int precision = 6) -->
<function name="QString::setNum">
<noreturn>false</noreturn>
<returnValue type="QString &amp;"/>
<leak-ignore/>
<arg nr="1">
<not-uninit/>
</arg>
<arg nr="2" default="0">
<not-uninit/>
</arg>
<arg nr="3" default="6">
<not-uninit/>
</arg>
</function>
<!-- QStringList QString::split(const QString &sep, SplitBehavior behavior = KeepEmptyParts, Qt::CaseSensitivity cs = Qt::CaseSensitive) const --> <!-- QStringList QString::split(const QString &sep, SplitBehavior behavior = KeepEmptyParts, Qt::CaseSensitivity cs = Qt::CaseSensitive) const -->
<!-- QStringList QString::split(QChar sep, SplitBehavior behavior = KeepEmptyParts, Qt::CaseSensitivity cs = Qt::CaseSensitive) const --> <!-- QStringList QString::split(QChar sep, SplitBehavior behavior = KeepEmptyParts, Qt::CaseSensitivity cs = Qt::CaseSensitive) const -->
<!-- QStringList QString::split(const QRegExp &rx, SplitBehavior behavior = KeepEmptyParts) const --> <!-- QStringList QString::split(const QRegExp &rx, SplitBehavior behavior = KeepEmptyParts) const -->
@ -476,6 +691,26 @@
<not-uninit/> <not-uninit/>
</arg> </arg>
</function> </function>
<!-- double QString::toDouble(bool * ok = 0) const -->
<function name="QString::toDouble">
<noreturn>false</noreturn>
<returnValue type="double"/>
<use-retval/>
<leak-ignore/>
<const/>
<arg nr="1" default="0">
</arg>
</function>
<!-- float QString::toFloat(bool * ok = 0) const -->
<function name="QString::toFloat">
<noreturn>false</noreturn>
<returnValue type="float"/>
<use-retval/>
<leak-ignore/>
<const/>
<arg nr="1" default="0">
</arg>
</function>
<!-- int QString::toInt(bool *ok = Q_NULLPTR, int base = 10) const --> <!-- int QString::toInt(bool *ok = Q_NULLPTR, int base = 10) const -->
<function name="QString::toInt"> <function name="QString::toInt">
<noreturn>false</noreturn> <noreturn>false</noreturn>
@ -491,6 +726,36 @@
<valid>0,2:36</valid> <valid>0,2:36</valid>
</arg> </arg>
</function> </function>
<!-- long QString::toLong(bool * ok = 0, int base = 10) const -->
<function name="QString::toLong">
<noreturn>false</noreturn>
<returnValue type="long"/>
<use-retval/>
<leak-ignore/>
<const/>
<arg nr="1" default="0">
<not-uninit/>
</arg>
<arg nr="2" default="10">
<not-uninit/>
<valid>0,2:36</valid>
</arg>
</function>
<!-- qlonglong QString::toLongLong(bool * ok = 0, int base = 10) const -->
<function name="QString::toLongLong">
<noreturn>false</noreturn>
<returnValue type="qlonglong"/>
<use-retval/>
<leak-ignore/>
<const/>
<arg nr="1" default="0">
<not-uninit/>
</arg>
<arg nr="2" default="10">
<not-uninit/>
<valid>0,2:36</valid>
</arg>
</function>
<!-- QString QString::toLower() const --> <!-- QString QString::toLower() const -->
<function name="QString::toLower"> <function name="QString::toLower">
<noreturn>false</noreturn> <noreturn>false</noreturn>
@ -498,6 +763,21 @@
<use-retval/> <use-retval/>
<const/> <const/>
</function> </function>
<!-- short QString::toShort(bool * ok = 0, int base = 10) const -->
<function name="QString::toShort">
<noreturn>false</noreturn>
<returnValue type="short"/>
<use-retval/>
<leak-ignore/>
<const/>
<arg nr="1" default="0">
<not-uninit/>
</arg>
<arg nr="2" default="10">
<not-uninit/>
<valid>0,2:36</valid>
</arg>
</function>
<!-- std::string QString::toStdString() const --> <!-- std::string QString::toStdString() const -->
<function name="QString::toStdString"> <function name="QString::toStdString">
<noreturn>false</noreturn> <noreturn>false</noreturn>
@ -505,6 +785,66 @@
<use-retval/> <use-retval/>
<const/> <const/>
</function> </function>
<!-- uint QString::toUInt(bool * ok = 0, int base = 10) const -->
<function name="QString::toUInt">
<noreturn>false</noreturn>
<returnValue type="uint"/>
<use-retval/>
<leak-ignore/>
<const/>
<arg nr="1" default="0">
<not-uninit/>
</arg>
<arg nr="2" default="10">
<not-uninit/>
<valid>0,2:36</valid>
</arg>
</function>
<!-- ulong QString::toULong(bool * ok = 0, int base = 10) const -->
<function name="QString::toULong">
<noreturn>false</noreturn>
<returnValue type="ulong"/>
<use-retval/>
<leak-ignore/>
<const/>
<arg nr="1" default="0">
<not-uninit/>
</arg>
<arg nr="2" default="10">
<not-uninit/>
<valid>0,2:36</valid>
</arg>
</function>
<!-- qulonglong QString::toULongLong(bool * ok = 0, int base = 10) const -->
<function name="QString::toULongLong">
<noreturn>false</noreturn>
<returnValue type="qulonglong"/>
<use-retval/>
<leak-ignore/>
<const/>
<arg nr="1" default="0">
<not-uninit/>
</arg>
<arg nr="2" default="10">
<not-uninit/>
<valid>0,2:36</valid>
</arg>
</function>
<!-- ushort QString::toUShort(bool * ok = 0, int base = 10) const -->
<function name="QString::toUShort">
<noreturn>false</noreturn>
<returnValue type="ushort"/>
<use-retval/>
<leak-ignore/>
<const/>
<arg nr="1" default="0">
<not-uninit/>
</arg>
<arg nr="2" default="10">
<not-uninit/>
<valid>0,2:36</valid>
</arg>
</function>
<!-- QString QString::toUpper() const --> <!-- QString QString::toUpper() const -->
<function name="QString::toUpper"> <function name="QString::toUpper">
<noreturn>false</noreturn> <noreturn>false</noreturn>
@ -526,6 +866,28 @@
<use-retval/> <use-retval/>
<const/> <const/>
</function> </function>
<!-- void QString::truncate(int position) -->
<function name="QString::truncate">
<noreturn>false</noreturn>
<returnValue type="void"/>
<arg nr="1">
<not-uninit/>
</arg>
</function>
<!-- QString & QString::vsprintf(const char * cformat, va_list ap) -->
<function name="QString::vsprintf">
<noreturn>false</noreturn>
<returnValue type="QString &amp;"/>
<leak-ignore/>
<arg nr="1">
<not-null/>
<not-uninit/>
</arg>
<arg nr="2">
<not-uninit/>
</arg>
<warn severity="style" alternatives="QString::vasprintf,QString::arg,QTextStream" reason="Obsolete"/>
</function>
<!-- QString QStringList::join(const QString &separator) const --> <!-- QString QStringList::join(const QString &separator) const -->
<!-- QString QStringList::join(QLatin1String separator) const --> <!-- QString QStringList::join(QLatin1String separator) const -->
<!-- QString QStringList::join(QChar separator) const --> <!-- QString QStringList::join(QChar separator) const -->
@ -689,5 +1051,5 @@
<podtype name="ushort" sign="u"/> <podtype name="ushort" sign="u"/>
<podtype name="qptrdiff" sign="s"/> <podtype name="qptrdiff" sign="s"/>
<podtype name="qintptr" sign="s"/> <podtype name="qintptr" sign="s"/>
<podtype name="quinitptr" sign="u"/> <podtype name="quintptr" sign="u"/>
</def> </def>