QtCreator updated and float type is not highlighted in C any more
-
Hi!
right after my favorite IDE had updated to 4.4.0, I lost the highlighting of by pity float type (
any guesses?
(I'm in Linux environment.)
-
File a bug report. Is that with clang code model or the built-in one?
-
I'm not sure how to check which one...
If you're about Options->C++->Code Style, then the Current setting is "Qt [built-in]"... -
If Help->About plugins->ClangCodeModel is unchecked, you are using the built-in code model.
In any case, it is worthy of a bug report https://bugreports.qt.io
-
@Stanislav-Silnicki said in QtCreator updated and float type is not highlighted in C any more:
I'm not sure how to check which one...
Help -> About Plugins -> C++ -> ClangCodeModel: If this is checked, then the ClangCodeModel is enabled.
Does this happen for you in C, C++ or header files?
Can you post a minimal file that shows the wrong behavior? (So we can check against)
-
built-in code model.
the prob. seems to appear in both .c and .h files
-
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. -
ups... have just posted bug report.... https://bugreports.qt.io/browse/QTCREATORBUG-18879
on the way to prepare files...
-
the story is not complete so far...
pretty strange...once I create a new .c file...
everything looks fine...
but when I add this file to my project....
and it appears in files plane (as I know, it just inserted in .files file within project dir)...
float type looses its highlighting...
-
@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?
-
@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.hAnd as soon as you add it to your project, the include file is parsed and I guess therefore highlighting for float stops.
-
I've tried from scratch (sorry too many pics):
removed #include for sure...
-
@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.hAnd 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.
-
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.
-
it looks like I did something wrong :((
I can't upload files any more.....
-
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 -= qtSOURCES += main.c
-
@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.