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

QJsonValue toDouble() conversion causes loss of data

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.1.0
    • Core: Other
    • None
    • windows-7

    Description

      QJsonObject obj;
      obj.insert("dbl",double(73183493944884961));

      double d = obj.value("dbl").toDouble();
      qulonglong ul = d;
      qulonglong ul2 = 73183493944884961;

      qDebug () << ul << ul2;
      //output : 73183493944884960 73183493944884961

      Attachments

        Issue Links

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

          Activity

            People

              thiago Thiago Macieira
              ashish.soni ashish soni
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes