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

QMatrix4x4 QPoint operator* int-float implicit conversions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.14.1
    • GUI: OpenGL
    • None
    • x64 Desktop
    • All

    Description

      Various methods performing implicit conversions from int->float

      Lines 881-886 (qmatrix4x4.h)

      inline QPoint operator*(const QMatrix4x4& matrix, const QPoint& point)
      {
          float xin, yin;
          float x, y, w;
          xin = point.x();
          yin = point.y();
      

      where:

          xin = point.x();
          yin = point.y();
      

      is performing a conversion as point.x() and point.y() return integers but xin and yin are floats.

      Same goes for
      Lines 838-843 (qmatrix4x4.h)

      inline QPoint operator*(const QPoint& point, const QMatrix4x4& matrix)
      {
          float xin, yin;
          float x, y, w;
          xin = point.x();
          yin = point.y();
      

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            watsontandrew Andrew Watson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes