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

QJsonValue toDouble() conversion causes loss of data

XMLWordPrintable

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

      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

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes