qt.cfg: Add support for macros `forever` and `Q_FOREVER` (#1662)
Reference: https://doc.qt.io/qt-5/qtglobal.html#forever https://doc.qt.io/qt-5/qtglobal.html#Q_FOREVER
This commit is contained in:
parent
d9241aa532
commit
2c1f97d787
|
@ -1316,6 +1316,7 @@
|
|||
<define name="Q_ENUM(X)" value=""/>
|
||||
<define name="Q_ENUMS(X)" value=""/>
|
||||
<define name="Q_FLAGS(X)" value=""/>
|
||||
<define name="Q_FOREVER" value="for (;;)"/>
|
||||
<define name="Q_INTERFACES(X)" value=""/>
|
||||
<define name="Q_NULLPTR" value="NULL"/>
|
||||
<define name="Q_OBJECT" value=""/>
|
||||
|
@ -1327,6 +1328,7 @@
|
|||
<define name="QVERIFY(expr)" value="assert( expr )"/>
|
||||
<define name="QVERIFY2(cond, msg)" value="assert( cond )"/>
|
||||
<define name="foreach(A,B)" value="for(A:B)"/>
|
||||
<define name="forever" value="for (;;)"/>
|
||||
<define name="emit(X)" value="(X)"/>
|
||||
<define name="Q_PLUGIN_METADATA(x)" value=""/>
|
||||
<!-- https://doc.qt.io/qt-5/qtglobal.html#qreal-typedef -->
|
||||
|
|
|
@ -46,6 +46,14 @@ void validCode(int * pIntPtr)
|
|||
if (pIntPtr != Q_NULLPTR) {
|
||||
*pIntPtr = 5;
|
||||
}
|
||||
|
||||
if (pIntPtr && *pIntPtr == 1) {
|
||||
forever {
|
||||
}
|
||||
} else if (pIntPtr && *pIntPtr == 2) {
|
||||
Q_FOREVER {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ignoredReturnValue()
|
||||
|
|
Loading…
Reference in New Issue