Avoid division through zero in DateTimeAxis


During the calculation of the axis anchor, a division through zero may
occur in case axis.min == axis.max. This patch avoids the divison
through zero by artifically setting the segment to 1 in case the segment
calculation resulted in 0.

Fixes: QTBUG-147262
Pick-to: 6.11 6.12
Change-Id: Ia3a494073f2f73df280f8e8244c97b8cbc9c9519
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
commitcb85f7ffaf47e50e52d04719360527eb830758d6
parent0469363b4049aaebdfdb1deeed87d06a4155e375
authorWladimir Leuschner <wladimir.leuschner@qt.io>
committerWladimir Leuschner <wladimir.leuschner@qt.io>
commit timeMon, 15 Jun 2026 11:27:28 +0000