Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-67129

Cannot parse double values from XML element

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 5.10.0
    • XML: DOM
    • None
    • Ubuntu 16.04 LTS

    Description

      When I set an attribute like this:

      QDomElement element = doc.createElement("foo");
      element.setAttribute("x", 666.666);

      This results in the value being "666,666".

      Now, if I parse the element like this:

      double x = element.attribute("x", "0").toDouble();

      ...it results in 0.

      I don't find it logical that the element cannot parse a double value that was set by itself. If this is "excepted behavior" then how parsing a double should be handled..?

       

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            juzzlin Jussi Lind
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes