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

Undefined linker symbols in unit tests when using QT_DEPRECATED_WARNINGS_SINCE = 0x060000

    XMLWordPrintable

    Details

      Description

      During the CMake port we ran into an issue where it was possible to build a test with undefined symbols due to tests disabling deprecation warnings.

      On Windows qtbase/tests/auto/gui/util/qdesktopservices/tst_qdesktopservices fails to link when we build Qt nodules with -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 due to void __cdecl tst_qdesktopservices::testDataLocation(void) being undefined.

      The above happens because the tests forcefully disable the warning check, and the code that should have been disabled is now present and enabled in the test.

      The qmake build of wip/cmake doesn't seem to suffer from this as it compiles all modules with  -DQT_DEPRECATED_WARNINGS_SINCE=0x040800 which does not disable the code in question and the above test builds just fine.

      While we are reporting this particular instance, there may be other tests that may suffer from the same problem by defining QT_DISABLE_DEPRECATED_BEFORE=0.

        Attachments

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

          Activity

            People

            Assignee:
            thiago Thiago Macieira
            Reporter:
            lebeernae Leander Beernaert
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes