Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
Qt Creator 3.4.0, Qt Creator 3.4.2, Qt Creator 3.5.0-beta1
-
None
-
Any Windows, QtCreator 3.4.0 (but previous QtCreator versions had the bug)
Description
In the code like bellow the location of variable ii is incorrectly shifted somewhere next in the text. You can check location in QtCreator if set the cursor to definition of variable ii OR if you try to make renaming refactoring of ii variable (code will be broken ... non-compilable).
#define sn QString::number int main(int argc, char *argv[]) { int ii=1; qDebug() << "Тест" << QString::number(ii) << sn(ii) << QString::number(ii); return 0; }
It seems that the bug happens IF
1. variable in code placed after string literal like "Тест" in the example
AND
2. some letters of string must be non-English (UTF-8 coding is used).
PLUS
3. "macro-shortcut" of QString::number need to be used.
In my projects there are a lot of places like this. Always afraid of using renaming refactoring of QtCreator because of this behavior (it breaks compilable state and I have to reconstruct the code manually after such renaming refactorings).