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

Fix Clang and Clang-tidy warnings in Qt headers

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.0
    • Core: Other
    • None
    • All

      Please fix next Clang and Clang-tidy (version 9) warnings in Qt headers:

      <pre>
      include/QtCore/qlist.h:632:58: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
      include/QtCore/qlist.h:666:59: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
      include/QtCore/qlist.h:700:59: warning: empty expression statement has no effect; remove unnecessary ';' to silence this warning [-Wextra-semi-stmt]
      include/QtWidgets/qstylepainter.h:63:6: warning: extra ';' after member function definition [-Wextra-semi]
      </pre>

      Destructors in derived classes are not marked with `override`. Warnings appear in other components too. For example:

      <pre>
      include/QtCore/qbuffer.h:66:5: warning: '~QBuffer' overrides a destructor but is not marked 'override' [-Winconsistent-missing-destructor-override]
      include/QtCore/qbuffer.h:66:5: warning: annotate this function with 'override' or (rarely) 'final' [modernize-use-override]
      </pre>

      There are also a lot of -Wused-but-marked-unused warnings on Ubuntu 18.04. For example:

      <pre>
      include/QtCore/qsize.h:303:10: warning: 'qIsNull' was marked unused but was used [-Wused-but-marked-unused]
      </pre>

        1. qtbase.patch
          16 kB
          Eugene Zelenko
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            thiago Thiago Macieira
            eugenezelenko Eugene Zelenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: