Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 6.0.0-rc1
-
None
-
Kubuntu 21.10, X11
-
-
a3af941adf (qt-creator/qt-creator/master) a3af941adf (qt-creator/qt-creator/qmlprojectstorage)
Description
C++ string literals (as in `printf("hello")`) and character literals (as in `s.push_back('a')`) are colored as solid black, as if the literal is not recognized by the C++ code model.
In the color settings, the "String" line is set to a different color (grey), and I can see it is being applied to include header names, both in angle brackets and double quotes (e.g. in `#include "stddef.h"`), which is expected.
The problem does not reproduce consistently in all contexts (i.e. string literals may get colored correctly in one code region but not the other). I'm not sure what makes it trigger, but I have found that using UDLs is more likely to trigger it. See the attached screenshot for an example.