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

QPoint has only qreal operators * and /

    XMLWordPrintable

Details

    • a562fd2d201e3b618ed99a316275f20385cc5c25

    Description

      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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes