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. QtCreator 4.x has incorrect syntax highlighting with Clang code model
Forum Updated to NodeBB v4.3 + New Features

QtCreator 4.x has incorrect syntax highlighting with Clang code model

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
8 Posts 2 Posters 2.1k Views 2 Watching
  • 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.
  • D Offline
    D Offline
    Dragonmaster Lou
    wrote on last edited by
    #1

    Has anyone else seen this behavior? I'm seeing things such as all code within a function/method being highlighted as it was a type name, even keywords and local variables, member variables not being highlighted properly all the time, etc.

    Highlighting seems to work fine with the regular code model.

    I've seen this with 4.0 and 4.1 RC1.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You should check the bug report system to see if it's something known.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        Dragonmaster Lou
        wrote on last edited by
        #3

        Thanks. I looked at it before, but I'll look a bit closer this time. I probably need to narrow down my search a bit.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          Dragonmaster Lou
          wrote on last edited by
          #4

          I looked at the bug report system and couldn't quite find something that matches up. There certainly are issues with the Clang code model.

          The existing issues sometimes have a QtCreator debug log attached. Where do I find the log on Linux? I'd like to know to see if I can either better match up with the issues that I can find or open a new one.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by SGaist
            #5

            Start Qt Creator from the command line, you'll see what is happening.

            You can also use QtLoggingCategory tom modify what's printed there.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            D 1 Reply Last reply
            0
            • SGaistS SGaist

              Start Qt Creator from the command line, you'll see what is happening.

              You can also use QtLoggingCategory tom modify what's printed there.

              D Offline
              D Offline
              Dragonmaster Lou
              wrote on last edited by
              #6

              @SGaist Ah, thanks for the tip. I usually start it from the command line, so we'll see what I can dig up.

              Curiously, I set up a new project with all new files for experimenting with new features in C++11 (our current compiler here at work only supports C++03, but we're planning on updating our tools soon). I didn't see these errors in the new project, so I wonder if it's something odd with our existing code base or the settings for that code base.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Without knowing the code base it's pretty difficult to guess.

                I'd compare the two projects to see if there's anything different.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                D 1 Reply Last reply
                0
                • SGaistS SGaist

                  Without knowing the code base it's pretty difficult to guess.

                  I'd compare the two projects to see if there's anything different.

                  D Offline
                  D Offline
                  Dragonmaster Lou
                  wrote on last edited by
                  #8

                  @SGaist True... I'm going to try to see if I can come up with a simplified project that can reproduce the issue.

                  The project where I did not see the issue was just a glorified "Hello world," whereas the one where I do see the issues is my company's code base.

                  I'll see if I can somehow boil things down to be reproducible.

                  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