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

Stop using #include <QtTest> in Qt tests

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 6.1.0 Alpha
    • None
    • Testing: qtestlib
    • None
    • 27d96b4789b98587e64642bf7bd6ef5f3a07e174 (qt/qtbase/dev)

      To use QtTest the correct include is QTest or QtTest/QTest.

      All other things being equal, it's NOT correct to use QtTest or QtTest/QtTest, as those are the module-wide includes, which recursively include all of QtCore  plus other files (e.g. QtGui stuff).

      There are as of now some 600+ occurences of QtTest inclusions in qtbase tests alone.

      1. Has anyone tried to do a mass search and replace and compare the build times?
      2. How about having the sanity bot automatically flag any usage of module-wide include?

        For Gerrit Dashboard: QTBUG-88831
        # Subject Branch Project Status CR V

            david.skoland David Skoland
            peppe Giuseppe D'Angelo
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes