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

QPoint has only qreal operators * and /

XMLWordPrintable

    • a562fd2d201e3b618ed99a316275f20385cc5c25

      Today, I has profiling my application. I detect, that huge part of time it converts from double to integer and back!

      // int zoom;
      // QPoint offset
      QPoint screenToGeo(const QPoint& screen)
      {
          return offset + screen * zoom;
      }
      

      Please ADD integer operators, and (possibly) remove qreal operator. Since QPoint intended for integer coordinates, operators should be integer. If one want to have qreal operators, He should write using QPointF.

      I think it is bug, not suggestion....QPoint should not have qreal operators.

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

            rodal Samuel Rødal
            socketpair@gmail.com Коренберг Марк
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes