qt.cfg: Add macro QStringLiteral()

Use the fallback value that always works. This should be fine for static
analyzers.
References:
https://doc.qt.io/qt-5/qstring.html#QStringLiteral
https://www.qt.io/blog/2014/06/13/qt-weekly-13-qstringliteral
https://woboq.com/blog/qstringliteral.html
This commit is contained in:
versat 2019-09-13 13:46:34 +02:00
parent 742c437953
commit f9d29a4ab9
1 changed files with 2 additions and 0 deletions

View File

@ -4671,6 +4671,8 @@
<define name="QTC_CHECK(cond)" value="if (Q_LIKELY(cond)) {} else { QTC_ASSERT_STRING(#cond); } do {} while (0)"/>
<define name="QTC_GUARD(cond)" value="((Q_LIKELY(cond)) ? true : (QTC_ASSERT_STRING(#cond), false))"/>
<define name="Q_LOGGING_CATEGORY(name,...)" value=""/>
<!-- https://doc.qt.io/qt-5/qstring.html#QStringLiteral -->
<define name="QStringLiteral(str)" value="QString::fromUtf8(str, sizeof(str) - 1)"/>
<!-- https://doc.qt.io/qt-5/qtglobal.html#qreal-typedef -->
<define name="qreal" value="double"/>
<podtype name="qint8" sign="s" size="1"/>