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

Making the conversion of QPoint to QPointF explicit

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P4: Low
    • None
    • 4.1.0, 5.15.8, 6.2.4, 6.3.0
    • None
    • 8

    Description

      When doing something like:

      QPoint pt;
      QPointF fPt;
      QMatrix mat;
      fPt = mat.map( pt );

      the automatic conversion of QPoint to QPointF kicks in and this can cause a problem. By making the relevant constructor explicit and by providing a to...() function it could be prevented.

      Answer from Trolltech:

      In general we agree. The only problem is that making the constructor explicit will break a lot of code that expects exactly this behavior. Since we promised full source code compatibility in the Qt 4 series, this issue is now scheduled for Qt 5.

      Attachments

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

        Activity

          People

            cnn Qt Core & Network
            anshaw Andy Shaw (closed Nokia identity) (Inactive)
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes