Details
-
Epic
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
-
Q_FOREACH
Description
Port all Qt code away from Q_FOREACH/foreach. According to Lars, this macro was never intended to be used in Qt code, yet it has infiltrated Qt code to a large extent. We can't deprecate it because users have thousands of uses all over the place, but we have QT_NO_FOREACH which can help keep our code base clean.
Porting guide: https://www.kdab.com/goodbye-q_foreach/
Acceptance criteria:
- QT_NO_FOREACH is defined centrally for all Qt code (cf. QT_NO_AS_CONST, QT_NO_QEXCHANGE, ...).
- only test code testing the foreach/Q_FOREACH is #undef'ing QT_NO_FOREACH at the top of the test
Attachments
Issue Links
- relates to
-
QTCREATORBUG-27464 Port away from foreach/Q_FOREACH
- Closed