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

Stop using #include <QtTest> in Qt tests

    XMLWordPrintable

Details

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

    Description

      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?

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes