Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-12800

Changing float display format not possible for localized float output

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 4.0.0-beta1
    • Qt Creator 3.2.0-rc1
    • Debugger
    • 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              hjk hjk
              aha_1980 André Hartmann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes