Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Clang goes crazy?
QtWS25 Last Chance

Clang goes crazy?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
clang
4 Posts 3 Posters 640 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • artwawA Offline
    artwawA Offline
    artwaw
    wrote on last edited by
    #1

    Hello.
    I moved to Qt6 and QtCreator is current. All is well and works however Clang disappoints.

    In Qt5 it kept telling me, that all the signals from QAction are not actually signals and kept putting lots of yellow warnings. Then some update came and it went away.
    Today there is something else and honestly I don't know it that should be reported somewhere or what.

    I had const QStringList animext = {".gif",".giff",".webp"}; and Clang started to complain that I should use QVector instead. "OK", I thought, "whatever, doesn't matter". And so I corrected to QVector, as asked.
    And then:
    d5264d06-5608-4235-9ba1-04702a56eb9d-image.png

    Is there a way to sanitise Clang warnings? I'd rather not turn them off, they're mostly useful.
    Or is there in this warning something inherently deep structure-wise and I am too stupid to comprehend?

    For more information please re-read.

    Kind Regards,
    Artur

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #4

      Simply disable this check for clazy in the analyzer settings.
      CLazy does not know if it's Qt5 or Qt6. In Qt5 QList was not optimal, in Qt6 QVector was renamed to QList ... maybe the next clazy version can somehow fiddle out what Qt version it's currently checking.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1
      • JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on last edited by
        #2

        ignore some of them. If I use for loop, Clang complaints. However, no issues if foreach is used. This is not right. The reason could be g++ version is too low on Linux.

        artwawA 1 Reply Last reply
        0
        • JoeCFDJ JoeCFD

          ignore some of them. If I use for loop, Clang complaints. However, no issues if foreach is used. This is not right. The reason could be g++ version is too low on Linux.

          artwawA Offline
          artwawA Offline
          artwaw
          wrote on last edited by
          #3

          @JoeCFD I would but it is annoying. I am on Mac with quite a bit of processing power and other resources.

          For more information please re-read.

          Kind Regards,
          Artur

          1 Reply Last reply
          0
          • Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #4

            Simply disable this check for clazy in the analyzer settings.
            CLazy does not know if it's Qt5 or Qt6. In Qt5 QList was not optimal, in Qt6 QVector was renamed to QList ... maybe the next clazy version can somehow fiddle out what Qt version it's currently checking.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved