Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-115796

Port Qt code away from Q_FOREACH/foreach

XMLWordPrintable

    • Q_FOREACH
    • 5d336dad4 (dev)

      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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            cnn Qt Core & Network
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes