Since the dashing is computed even outside the clipping and device
area, painting very long dashed lines could consume unexpected amounts
of time and resources. Fix by placing a limit on the dashing, and fall
back to solid line drawing if hit.
Fixes: QTBUG-95594
Pick-to: 6.2 6.1 5.15
Change-Id: Ida05ecd8fe6df402c9e669206fd5cec4a9f5386a
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>