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 updated and float type is not highlighted in C any more
Forum Updated to NodeBB v4.3 + New Features

QtCreator updated and float type is not highlighted in C any more

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
18 Posts 3 Posters 4.0k 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.
  • aha_1980A Offline
    aha_1980A Offline
    aha_1980
    Lifetime Qt Champion
    wrote on last edited by
    #6

    @sierdzio was faster ;)

    In any way, if you report a bug you will need a minimal example also.

    And please set a link to the bugreport here.

    Qt has to stay free or it will die.

    1 Reply Last reply
    0
    • Stanislav SilnickiS Offline
      Stanislav SilnickiS Offline
      Stanislav Silnicki
      wrote on last edited by
      #7

      built-in code model.

      0_1504878939280_Screenshot from 2017-09-08 16-54-26.png

      the prob. seems to appear in both .c and .h files

      1 Reply Last reply
      0
      • aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by
        #8

        There has been some changes recently to not display bool, true, false etc. in C files as keywords (they are only keywords in C++).
        Please provide a minimal C file that triggers the wrong behavior.
        Thanks.

        Qt has to stay free or it will die.

        Stanislav SilnickiS 1 Reply Last reply
        0
        • Stanislav SilnickiS Offline
          Stanislav SilnickiS Offline
          Stanislav Silnicki
          wrote on last edited by
          #9

          ups... have just posted bug report.... https://bugreports.qt.io/browse/QTCREATORBUG-18879

          on the way to prepare files...

          1 Reply Last reply
          0
          • Stanislav SilnickiS Offline
            Stanislav SilnickiS Offline
            Stanislav Silnicki
            wrote on last edited by
            #10

            the story is not complete so far...
            pretty strange...

            once I create a new .c file...
            0_1504880266478_Screenshot from 2017-09-08 17-14-05.png

            everything looks fine...
            0_1504880326753_Screenshot from 2017-09-08 17-14-53.png

            but when I add this file to my project....
            0_1504880381178_Screenshot from 2017-09-08 17-16-01.png

            and it appears in files plane (as I know, it just inserted in .files file within project dir)...

            0_1504880454875_Screenshot from 2017-09-08 17-16-11.png

            float type looses its highlighting...

            0_1504880513893_Screenshot from 2017-09-08 17-16-27.png

            1 Reply Last reply
            0
            • aha_1980A aha_1980

              There has been some changes recently to not display bool, true, false etc. in C files as keywords (they are only keywords in C++).
              Please provide a minimal C file that triggers the wrong behavior.
              Thanks.

              Stanislav SilnickiS Offline
              Stanislav SilnickiS Offline
              Stanislav Silnicki
              wrote on last edited by Stanislav Silnicki
              #11

              @aha_1980 said in QtCreator updated and float type is not highlighted in C any more:

              There has been some changes recently to not display bool, true, false etc. in C files as keywords (they are only keywords in C++).

              I'm not an expert in standards, but it looks like float is still a keyword in C... Can you disclose a motivation for demotion of a such within QtCreator's environment?

              1 Reply Last reply
              0
              • aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by
                #12

                @Stanislav-Silnicki said in QtCreator updated and float type is not highlighted in C any more:

                I'm not an expert in standards, but it looks like float is still a keyword in C... Can you disclose a motivation for demotion of a such within QtCreator's environment?

                I said that "bool, true and false" are not highlighted anymore.
                I did not say, that float is not highlighted anymore. Indeed, for me, float is highlighted fine.
                That's why I ask you for a minimal example. In what I see from your side, you include <stdint.h>, so I guess the error is somewhere within stdint.h

                And as soon as you add it to your project, the include file is parsed and I guess therefore highlighting for float stops.

                Qt has to stay free or it will die.

                Stanislav SilnickiS 1 Reply Last reply
                0
                • Stanislav SilnickiS Offline
                  Stanislav SilnickiS Offline
                  Stanislav Silnicki
                  wrote on last edited by
                  #13

                  I've tried from scratch (sorry too many pics):

                  0_1504882617548_Screenshot from 2017-09-08 17-49-01.png

                  0_1504882628841_Screenshot from 2017-09-08 17-49-33.png

                  0_1504882649149_Screenshot from 2017-09-08 17-49-45.png

                  0_1504882668376_Screenshot from 2017-09-08 17-49-51.png

                  0_1504882680190_Screenshot from 2017-09-08 17-49-59.png

                  0_1504882699218_Screenshot from 2017-09-08 17-50-10.png

                  0_1504882713463_Screenshot from 2017-09-08 17-50-26.png

                  removed #include for sure...

                  0_1504882729970_Screenshot from 2017-09-08 17-50-40.png

                  1 Reply Last reply
                  0
                  • aha_1980A aha_1980

                    @Stanislav-Silnicki said in QtCreator updated and float type is not highlighted in C any more:

                    I'm not an expert in standards, but it looks like float is still a keyword in C... Can you disclose a motivation for demotion of a such within QtCreator's environment?

                    I said that "bool, true and false" are not highlighted anymore.
                    I did not say, that float is not highlighted anymore. Indeed, for me, float is highlighted fine.
                    That's why I ask you for a minimal example. In what I see from your side, you include <stdint.h>, so I guess the error is somewhere within stdint.h

                    And as soon as you add it to your project, the include file is parsed and I guess therefore highlighting for float stops.

                    Stanislav SilnickiS Offline
                    Stanislav SilnickiS Offline
                    Stanislav Silnicki
                    wrote on last edited by
                    #14

                    @aha_1980 said in QtCreator updated and float type is not highlighted in C any more:

                    @Stanislav-Silnicki said in QtCreator updated and float type is not highlighted in C any more:

                    I'm not an expert in standards, but it looks like float is still a keyword in C... Can you disclose a motivation for demotion of a such within QtCreator's environment?

                    I said that "bool, true and false" are not highlighted anymore.
                    I did not say, that float is not highlighted anymore. Indeed, for me, float is highlighted fine.
                    That's why I ask you for a minimal example. In what I see from your side, you include <stdint.h>, so I guess the error is somewhere within stdint.h

                    And as soon as you add it to your project, the include file is parsed and I guess therefore highlighting for float stops.

                    sorry if my reply sounded offending.

                    1 Reply Last reply
                    0
                    • aha_1980A Offline
                      aha_1980A Offline
                      aha_1980
                      Lifetime Qt Champion
                      wrote on last edited by
                      #15

                      Wow, so many screenshots :)

                      It would have been enought to post the .pro and main.c file.

                      I'll try to reproduce one I'm at home.

                      Qt has to stay free or it will die.

                      1 Reply Last reply
                      0
                      • Stanislav SilnickiS Offline
                        Stanislav SilnickiS Offline
                        Stanislav Silnicki
                        wrote on last edited by
                        #16

                        it looks like I did something wrong :((

                        I can't upload files any more.....

                        1 Reply Last reply
                        0
                        • Stanislav SilnickiS Offline
                          Stanislav SilnickiS Offline
                          Stanislav Silnicki
                          wrote on last edited by
                          #17

                          0_1504883476945_Screenshot from 2017-09-08 18-10-57.png

                          can upload pics, but not files....

                          ok.

                          main.c:

                          int main()
                          {
                          float foo;

                          printf("Hello World!\n");
                          return 0;
                          

                          }

                          float_my_pity_float.pro:

                          TEMPLATE = app
                          CONFIG += console
                          CONFIG -= app_bundle
                          CONFIG -= qt

                          SOURCES += main.c

                          1 Reply Last reply
                          0
                          • aha_1980A Offline
                            aha_1980A Offline
                            aha_1980
                            Lifetime Qt Champion
                            wrote on last edited by
                            #18

                            @aha_1980 said in QtCreator updated and float type is not highlighted in C any more:

                            I said that "bool, true and false" are not highlighted anymore.

                            And by disabling "false", "float" was disabled too, sorry. The fix is under review: https://codereview.qt-project.org/205025

                            So I guess this can be closed as solved.

                            Qt has to stay free or it will die.

                            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