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

Unification of a wrapping and non-wrapping QGeoRectangle is wrong if the former completely covers the latter

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.12.0
    • Fix Version/s: 5.12.2
    • Component/s: Positioning
    • Labels:
      None
    • Platform/s:
      All
    • Commits:
      b544e2fe22333f0a5fbd24a1ee106c5501a6b886 (qt/qtlocation/5.12)

      Description

      Consider a small non-wrapping:

      QGeoRectangle(QGeoCoordinate(-30.0, 160.0), QGeoCoordinate(30.0, 170.0));
      

      and a bigger, wrapping rectangle (which contains the former rectangle entirely):

      QGeoRectangle(QGeoCoordinate(-30.0, 40.0), QGeoCoordinate(30.0, -40.0));
      

      Uniting the two (using united() or the | operator) results in a rectangle with top left coordinate (30; 160) and bottom right coordinate (-30; -40). The left value is obviously wrong, the resulting rectangle should be equal to the bigger wrapping rectangle.

      You can quickly confirm the bug by adding this case to the relevant unit test data collection (tst_QGeoRectangle::unite_data).

        Attachments

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

          Activity

            People

            Assignee:
            paangele Paolo Angelelli
            Reporter:
            yzsolt Zsolt Bölöny
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes