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

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.12.2
    • 5.12.0
    • Positioning
    • None
    • All
    • 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

            paangele Paolo Angelelli
            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