QGeoPath/QGeoPolygon: defer bbox computation


This patch introduces 2 versions of QGeoPath/polygon private:
a lazy version (default) and an eager version.
The reason is that certain classes such as MapItems make heavy use
of the bounding box of the geoshapes, as well as the contains
method, and in those cases it's beneficial to have it eagerly
computed and cached.

Other use cases do not see this feature so much in use, and the added
costs, both in terms of computation and in terms of memory requirements
for cached data can be avoided.

As the patch currently stands, using copy constructors for
QGeoPath and QGeoPolygon with a QGeoPathEager and a QGeoPolygonEager
(and vice-versa) changes the type of d_ptr.
This means that doing, for example, QGeoPath(someQGeoPathEager)
effectively returns a QGeoPath that behaves like a QGeoPathEager
(although not being one).

Change-Id: I8cfed1e0a747139d0fb6d5fb5236bf5f5fbf24c1
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
commite7bb8f636086c04acd97e4eb3c42e7c6c05dc8f2
parent1ac9abf01cf60e817a830f877fe91ef3403a7d3f
authorPaolo Angelelli <paolo.angelelli@qt.io>
committerPaolo Angelelli <paolo.angelelli@qt.io>
commit timeFri, 21 Dec 2018 21:51:12 +0000