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 12: Highlighting not properly work
Qt 6.11 is out! See what's new in the release blog

QtCreator 12: Highlighting not properly work

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

    Hi folks!
    I was using Qt-creator 6.0.2 and the word's highlighting worked very well. An example could be "bool" and "assert".
    I always used this IDE for c project.
    Now, i tried to install (through unified installer) qt6 and qt creator 12.
    For some weird reason, the above keywords are not highlighted anymore.
    Why ? How to fix it?
    Best regards

    JoeCFDJ 1 Reply Last reply
    0
    • N Nick79

      Hi folks!
      I was using Qt-creator 6.0.2 and the word's highlighting worked very well. An example could be "bool" and "assert".
      I always used this IDE for c project.
      Now, i tried to install (through unified installer) qt6 and qt creator 12.
      For some weird reason, the above keywords are not highlighted anymore.
      Why ? How to fix it?
      Best regards

      JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by JoeCFD
      #2

      @Nick79 I saw some weird behaviors as well when I started to use qt creator 12. On Ubuntu I removed the contents in ~/ .cache/QtProject/QtCreator and then it seems working fine for me. bool is highlighted in my code.

      N 1 Reply Last reply
      2
      • JoeCFDJ JoeCFD

        @Nick79 I saw some weird behaviors as well when I started to use qt creator 12. On Ubuntu I removed the contents in ~/ .cache/QtProject/QtCreator and then it seems working fine for me. bool is highlighted in my code.

        N Offline
        N Offline
        Nick79
        wrote on last edited by
        #3

        @JoeCFD said in QtCreator 12: Highlighting not properly work:

        @Nick79 I saw some weird behaviors as well when I started to use qt creator 12. On Ubuntu I removed the contents in ~/ .cache/QtProject/QtCreator and then it seems working fine for me. bool is highlighted in my code.

        Thanks for feedback.
        I'll try that and let you know the result.

        1 Reply Last reply
        0
        • N Offline
          N Offline
          Nick79
          wrote on last edited by Nick79
          #4

          Didn't work!
          Following the screenshot of qt creator 6.0.2:
          Screenshot_qtcreator6.0.2.png

          Instead, this is the screenshot of qt creator 12.0.2
          Screenshot_qtcreator12.0.2.png

          you can see the difference about "bool" and "assert" keywords which are not highlighted.

          JoeCFDJ 1 Reply Last reply
          0
          • N Nick79

            Didn't work!
            Following the screenshot of qt creator 6.0.2:
            Screenshot_qtcreator6.0.2.png

            Instead, this is the screenshot of qt creator 12.0.2
            Screenshot_qtcreator12.0.2.png

            you can see the difference about "bool" and "assert" keywords which are not highlighted.

            JoeCFDJ Offline
            JoeCFDJ Offline
            JoeCFD
            wrote on last edited by
            #5

            @Nick79 Try to remove the contents in ~/.config/QtProject. Make a copy of this folder first before removal. just in case.

            N 1 Reply Last reply
            0
            • JoeCFDJ JoeCFD

              @Nick79 Try to remove the contents in ~/.config/QtProject. Make a copy of this folder first before removal. just in case.

              N Offline
              N Offline
              Nick79
              wrote on last edited by Nick79
              #6

              @JoeCFD I tried but didn't work yet.
              Moreover, when i select a variable next to bool keyword, it highlights the next word rather than that word.
              An example:

              bool first, second, third;
              

              When i select "first", the "second" keyword is highlighted.
              Maybe is it a bug ?

              JoeCFDJ 1 Reply Last reply
              0
              • N Nick79

                @JoeCFD I tried but didn't work yet.
                Moreover, when i select a variable next to bool keyword, it highlights the next word rather than that word.
                An example:

                bool first, second, third;
                

                When i select "first", the "second" keyword is highlighted.
                Maybe is it a bug ?

                JoeCFDJ Offline
                JoeCFDJ Offline
                JoeCFD
                wrote on last edited by JoeCFD
                #7

                @Nick79 Could be c code related bug. No issue with C++ code in my app.
                In C, the bool data type is not a built-in data type

                N 1 Reply Last reply
                1
                • JoeCFDJ JoeCFD

                  @Nick79 Could be c code related bug. No issue with C++ code in my app.
                  In C, the bool data type is not a built-in data type

                  N Offline
                  N Offline
                  Nick79
                  wrote on last edited by
                  #8

                  @JoeCFD
                  I only can say you that in qt creator 6.0.2, stdbool.h is placed in /usr/lib64/clang/13.0.0/include/stdbool.h
                  In qt creator 12.0.2 instead, stdbool.h is placed in /opt/Qt6/Tools/QtCreator/libexec/qtcreator/clang/lib/clang/17/include/stdbool.h.
                  The contents seem be different....

                  JoeCFDJ 1 Reply Last reply
                  0
                  • N Nick79

                    @JoeCFD
                    I only can say you that in qt creator 6.0.2, stdbool.h is placed in /usr/lib64/clang/13.0.0/include/stdbool.h
                    In qt creator 12.0.2 instead, stdbool.h is placed in /opt/Qt6/Tools/QtCreator/libexec/qtcreator/clang/lib/clang/17/include/stdbool.h.
                    The contents seem be different....

                    JoeCFDJ Offline
                    JoeCFDJ Offline
                    JoeCFD
                    wrote on last edited by
                    #9

                    @Nick79 do you use clang to build your code. If yes, then select clang-17 for your kit.

                    N 1 Reply Last reply
                    0
                    • JoeCFDJ JoeCFD

                      @Nick79 do you use clang to build your code. If yes, then select clang-17 for your kit.

                      N Offline
                      N Offline
                      Nick79
                      wrote on last edited by
                      #10

                      @JoeCFD
                      I don't use clang. I use meson as build system and gcc as compiler.

                      JoeCFDJ 1 Reply Last reply
                      0
                      • N Offline
                        N Offline
                        Nick79
                        wrote on last edited by
                        #11

                        Now, I don't remember because the project has been created some months ago...perhaps one year ago.
                        Likely, it has been created as C++ project but the added class have been renamed from .cpp in .c, making, basically, a C project.
                        Now, when I import it into Qt creator 12.0.2, the latter see it as C project and then some things don't properly work.

                        1 Reply Last reply
                        0
                        • N Nick79

                          @JoeCFD
                          I don't use clang. I use meson as build system and gcc as compiler.

                          JoeCFDJ Offline
                          JoeCFDJ Offline
                          JoeCFD
                          wrote on last edited by
                          #12

                          @Nick79 If you use meson to build your project, you may not need qt creator. Try VS code to see if it helps.

                          N 1 Reply Last reply
                          0
                          • JoeCFDJ JoeCFD

                            @Nick79 If you use meson to build your project, you may not need qt creator. Try VS code to see if it helps.

                            N Offline
                            N Offline
                            Nick79
                            wrote on last edited by
                            #13

                            @JoeCFD
                            Actually, qt creator has a plugin for meson even if it is esperimental and seems to work well.
                            Anyway, I don't use it, I put it into project and I defined the steps to build and clean the project in a very nice way.
                            In qt creator 6.0.2 works like a charm.

                            JoeCFDJ 1 Reply Last reply
                            0
                            • N Nick79

                              @JoeCFD
                              Actually, qt creator has a plugin for meson even if it is esperimental and seems to work well.
                              Anyway, I don't use it, I put it into project and I defined the steps to build and clean the project in a very nice way.
                              In qt creator 6.0.2 works like a charm.

                              JoeCFDJ Offline
                              JoeCFDJ Offline
                              JoeCFD
                              wrote on last edited by
                              #14

                              @Nick79 I know qt creator has a plugin for meson. But I built a few packages only from command line with meson. meson build is 10 times faster than cmake in one project.

                              N 1 Reply Last reply
                              0
                              • JoeCFDJ JoeCFD

                                @Nick79 I know qt creator has a plugin for meson. But I built a few packages only from command line with meson. meson build is 10 times faster than cmake in one project.

                                N Offline
                                N Offline
                                Nick79
                                wrote on last edited by
                                #15

                                @JoeCFD
                                Yeah, indeed i don't use cmake. The defined some custom steps for building and cleaning the project. Very fast.
                                Qt creator allows me to customize whatever things and my projects are the real examples.
                                I don't like vscode because the debug as root user, which is an important feature for me, is almost hard to configure. In qt creator is very easy to set.

                                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