QGeoCameraTiles: fix default value of the side length


The class was introduced in a9506a1c73ada80262157ae4736a16cbc0fcb435.
Back then, it did not store the side length as a member variable, but
rather defined a helper sideLength() function like that:

  double QGeoCameraTilesPrivate::sideLength() const
  { return double(1 << camera_.zoomLevel()); }

The implementation implies that even for a default-constructed
QGeoCameraData object with zoomLevel == 0 the side length is 1.

That assumption was broken when
fabea2739711a27f0b53f614476a098a5137a5a5 introduced the member
variable and set it to 0 in the default c-tor.

However, the implementation still assumes that the side length cannot
be equal to zero.
For example, QGeoCameraTilesPrivate::tilesFromPolygon() uses it
like this:

  x = static_cast<int>(p.x()) % m_sideLength;

This is UB when m_sideLength == 0.

This patch fixes it be setting the default value to 1.

Found while checking the correctness of qFuzzyCompare() usage.

Task-number: QTBUG-144282
Pick-to: 6.11 6.10 6.8 6.5
Change-Id: I57d7675538191e0cea7be22366294736fb9efa03
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
commit5192f95e22a5182276acbba5c1a838367ecafb72
parent589ed66a8e0270e865facc7416bf0a689b7acda9
authorIvan Solovev <ivan.solovev@qt.io>
committerMarc Mutz <marc.mutz@qt.io>
commit timeMon, 23 Feb 2026 12:56:16 +0000