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

Using qreal as float causing problems in integer value assignment in QML

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.8.6
    • 4.8.4, 4.8.5
    • None
    • embedded linux
    • 1d48b9ea56e42b2cf963090078ee2162bde23a25

    Description

      On systems where qreal is float (like arm), the following test application gives wrong results:

      import QtQuick 1.0 
      Rectangle { 
      width: 800; height: 600; color: "steelblue" 
      property int a: 16777237 
      property int b: 0 
      
      Component.onCompleted: b=a 
      
      Text{ 
      id: t1 
      x: 91 
      y: 9 
      width: 100 
      text: a 
      } 
      Text { 
      id: t2 
      x: 91 
      y: 53 
      width: 100 
      text: b 
      } 
      } 
      

      Results:
      t1 = 16777237
      t2 = 16777236

      Should be the same.

      Attachments

        1. hotfix.patch
          1 kB
        2. qtbug33625.qml
          0.3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            e0150566 Janne Roine
            qtcomsupport Qt Support
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes