Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to tame clang issues after upgrading to Qt Creator 7.0.2?
Forum Updated to NodeBB v4.3 + New Features

How to tame clang issues after upgrading to Qt Creator 7.0.2?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 1 Posters 554 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.
  • R Offline
    R Offline
    Rich v
    wrote on last edited by Rich v
    #1

    I have been using Qt Creator for several years. Recently I upgraded to the latest version, 7.0.2 and frankly for me it feels like the wheels have fallen off! I understand clang is doing more with this version by default, but I had enabled it previously without experiencing the issues I have now.

    1. My C++ code all seems to be treated like C so I have annoying decorations everywhere in my source telling me keywords like 'class' and 'public' are not valid.
    2. In many many files, my F2 functionality (follow symbol or open header) is broken.
    3. (unrelated to clang) With every file I open I have to choose the encoding before I'm able to edit the file. If I close that file and reopen I have to choose the encoding all over again. Why is this? I don't remember having to do this before.

    If I disable clangd, the above issues go away but I lose the code completion feature that I've been enjoying all these years.

    One clue I have is that now I can with each editor pane select 'clangd' or 'clangd for <myproject>'. When I choose 'clangd' I get all the annoying errors about e.g. class and public not being valid keywords. When I select 'clangd for <myproject>' I seemingly lose my F2 functionality and still get incorrect clang warnings, though not as many.

    Is there a guide or some suggestions on how to tame these newfound problems? Overall it feels like a step backwards from the previous version I was using.

    On a positive note, I really like the extra CMake features with this release!

    Thanks,
    Rich

    R 1 Reply Last reply
    0
    • R Rich v

      I have been using Qt Creator for several years. Recently I upgraded to the latest version, 7.0.2 and frankly for me it feels like the wheels have fallen off! I understand clang is doing more with this version by default, but I had enabled it previously without experiencing the issues I have now.

      1. My C++ code all seems to be treated like C so I have annoying decorations everywhere in my source telling me keywords like 'class' and 'public' are not valid.
      2. In many many files, my F2 functionality (follow symbol or open header) is broken.
      3. (unrelated to clang) With every file I open I have to choose the encoding before I'm able to edit the file. If I close that file and reopen I have to choose the encoding all over again. Why is this? I don't remember having to do this before.

      If I disable clangd, the above issues go away but I lose the code completion feature that I've been enjoying all these years.

      One clue I have is that now I can with each editor pane select 'clangd' or 'clangd for <myproject>'. When I choose 'clangd' I get all the annoying errors about e.g. class and public not being valid keywords. When I select 'clangd for <myproject>' I seemingly lose my F2 functionality and still get incorrect clang warnings, though not as many.

      Is there a guide or some suggestions on how to tame these newfound problems? Overall it feels like a step backwards from the previous version I was using.

      On a positive note, I really like the extra CMake features with this release!

      Thanks,
      Rich

      R Offline
      R Offline
      Rich v
      wrote on last edited by
      #2

      @Rich-v
      I found the blog related to this release here [1]. I disabled indexing with clangd and that seems to have made things better for #1 and #2.

      [1] https://www.qt.io/blog/qt-creator-7-released

      1 Reply Last reply
      0
      • R Offline
        R Offline
        Rich v
        wrote on last edited by Rich v
        #3

        Also, I see now from this [1] that Qt Creator doesn't try to detect encodings if the file is not UTF-8 encoded. I'm not sure why this wasn't an issue for me before upgrading to 7.0.2, but I understand why it keeps pestering me now.

        [1] https://doc.qt.io/qtcreator/creator-editor-options-text.html

        1 Reply Last reply
        0

        • Login

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