Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
Qt Creator 4.1.0
-
None
-
Windows 10
Description
The auto indent function of qt creator does not work correctly with macros.
How to reproduce:
Create a header file with a macro like this:
#define TEST_MACRO(TEST_PARAM)
the macro basically does nothing, but it doenst matter. you could also have a macro that does something or just creates a semicolon like this:
#define TEST_MACRO(TEST_PARAM) \
;
Now include that header file in your cpp file and use it:
Lets assume the code is
TEST_MACRO(test)
// some comment
std::cout << "hello" << std::endl;
//comment 2
Using Ctrl+I it formats it to
TEST_MACRO(test)
// some comment
std::cout << "hello" << std::endl;
//comment 2
It is 8 white spaces too far to the right. I dont know why, but comment 2 is formatted correctly...
Edit: unfortunately you cant see the wrong white spaces in view mode... i will add a screenshot.