Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.10.0, 5.11.1
-
None
-
All
Description
C++ standard allows using ' as a spliter when writing hex numbers for better readability, such as:
unsigned long long x = 0x00000000'00000000;
This, however, does not work well with Qt Linguist tools lupdate. Not only it will warn "Unterminated C++ character", but also can it affect later tr() parsing IN CERTAIN CASES.
Attached is a minimal test to reproduce this issue.
Steps to reproduce:
- Unzip it
- Run
lupdate QtBugTest.pro -ts en.ts
- EXPECTED:
Updating 'en.ts'... Found 1 source text(s) (1 new and 0 already existing)
- ACTUAL:
xxx/mainwindow.cpp:6: Unterminated C++ character xxx/mainwindow.cpp:7: Unterminated C++ character xxx/mainwindow.cpp:8: Unterminated C++ character xxx/mainwindow.cpp:11: Excess closing brace in C++ code (or abuse of the C++ preprocessor) xxx/mainwindow.cpp:16: tr() cannot be called without context xxx/mainwindow.cpp:7: Unbalanced opening parenthesis in C++ code (or abuse of the C++ preprocessor) Updating 'en.ts'... Found 0 source text(s) (0 new and 0 already existing)
I had the issue on my Qt 5.10.0 MSVC AND Qt 5.11.1 MinGW.
Thank you!
Attachments
Issue Links
- duplicates
-
QTBUG-53326 integer literal notation not recognized
-
- Closed
-