qt: fix Q_UNUSED macro defintion (#4925)

This commit is contained in:
ericLemanissier 2023-04-01 16:33:50 +02:00 committed by GitHub
parent 5ec0ad6bed
commit cf280f84d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -5170,7 +5170,7 @@
<define name="Q_Q(Class)" value="Class * const q = q_func()"/> <define name="Q_Q(Class)" value="Class * const q = q_func()"/>
<define name="Q_RETURN_ARG(type, data)" value="QReturnArgument&lt;type &gt;(#type, data)"/> <define name="Q_RETURN_ARG(type, data)" value="QReturnArgument&lt;type &gt;(#type, data)"/>
<define name="Q_UNLIKELY(expr)" value="expr"/> <define name="Q_UNLIKELY(expr)" value="expr"/>
<define name="Q_UNUSED(X)" value="(void)(X)"/> <define name="Q_UNUSED(X)" value="(void)(X);"/>
<define name="QT_BEGIN_NAMESPACE" value=""/> <define name="QT_BEGIN_NAMESPACE" value=""/>
<define name="QT_END_NAMESPACE" value=""/> <define name="QT_END_NAMESPACE" value=""/>
<define name="QT_TR_NOOP(x)" value="x"/> <define name="QT_TR_NOOP(x)" value="x"/>

View File

@ -420,8 +420,9 @@ void MacroTest3()
QVERIFY2(2 >= 0, message.constData()); QVERIFY2(2 >= 0, message.constData());
} }
void validCode(int * pIntPtr, QString & qstrArg) void validCode(int * pIntPtr, QString & qstrArg, double d)
{ {
Q_UNUSED(d)
if (QFile::exists("test")) {} if (QFile::exists("test")) {}
if (pIntPtr != Q_NULLPTR) { if (pIntPtr != Q_NULLPTR) {