Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 16.0.1
-
None
-
Arch Linux
-
-
472134a39 (master)
Description
When writing the initializer list for a 2D array where one of the sizes is unknown, the syntax highlighting color for keywords changes to the "Attribute" color. For example, when writing the following in a .c or .cpp file:
int foo() { return 3; } unsigned int test[][2] = {{1, 2}, {3, 4}, {5, 6}}; int bar() { return 3; }
The following is displayed with my current theme:
Notice how the return keyword went from light blue to a greenish-brown, which corresponds to the default value for "Attribute", which I had not modified yet in my custom theme. After changing "Attribute" to white, for example, these values now show white instead. This happens for pretty much every non-type keywords as well as preprocessor directives like #if and #else.
After some experimentation:
- I can have the initializer list be empty (i.e. {}) and the issue still arises.
- Putting an explicit size in for the first dimension (4 for this example) avoids the problem.
Attachments
For Gerrit Dashboard: QTCREATORBUG-32848 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
641324,2 | CppEditor: Fix spurious detection of attributes | master | qt-creator/qt-creator | Status: MERGED | +2 | -1 |