Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 3.2.0-rc1
-
None
-
Linux: reproduceable, (Windows: at least seen once)
-
2a59bd65149078dd0f383d60240b9321efaf1a11
Description
GNU gdb (GDB) 7.6.1-ubuntu (and I think Microsoft CDB also, at least in some cases) prints floating point numbers with German locale (e.g. 1,234 instead of 1.234).
Changing the watch format is therefore not possible.
I see the following possibilities:
1. call gdb with LANG=C so it outputs 1.234 (In a programming background, I would never expect localized floating point numbers)
1.1 I'm not sure if this is possible for Microsoft CDB.
2. rely on QString::toDouble() that should, regarding the docs try to convert localized floats too, however that does not work. Maybe Creator calls QLocale::setDefault somewhere? (I didn't found it).
3. Use an ugly hack (I already have one but will only push to Gerrit if I'm forced to) and try to convert again with QLocale::toDouble() if QString::toDouble() returns not ok.
Notes to 2 and 3:
Reformated floating point numbers should use localized output also, for consistency.
Attachments
Issue Links
- relates to
-
QTCREATORBUG-16024 Locals and Expressions view is empty
- Closed
-
QTCREATORBUG-13776 Cannot select double value with comma as a decimal separator in the debugger Locals window
- Closed