Fix artifacts when rendering complex selection outlines
It happens because of a bug in opengl-based stroking algorithm in Qt.
And it happens only when one tries to draw a path with multiple
subpaths. The easiest workaround for this bug without patching Qt is
to manually split a multi-subpath path into QPainterPath objects with
only one subpath in each.
It might happen that the resulting subpath generated by the QDashStroker
will have no lines at all. It happens when further LineToElement items
compare as equal to the starting MoveToElement when compared in 'float'
space. In such case QTriangulatingStroker::process() skips LineTo elements
and the vertexBuffer ends up with unconnected vertices, which generate
unwanted triangles.
BUG:419240,413220