QCanvasBrush: remove public as<T>() conversion API


QCanvasBrush::as<T>() was a public member template, but was never
documented, and only ever used internally by the rendering engine
and by tests. Move the per-type conversion logic to the private
class of each concrete brush type, as plain, non-templated static
functions (e.g. QCanvasBoxShadowPrivate::getFromCanvasBrush()). For
the gradient types, reuse the QCanvasGradientBrushPrivate::create<T>()
helper added by the gradient data structure refactor instead of adding
duplicate functions.

This required two further changes:

- Make the gradient headers independent of "engine/" -- move
  QCPaint into a new qcpaint_p.h and clean up transitive includes.

- Export the private constructors used by the getFromCanvasBrush()
  helpers.

Pick-to: 6.12
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Change-Id: I6654656fd1d95fa7dfda94e5684ee39579e97c63
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
commit85e93b2d961251072a1b61b8b3d70f06d070f94c
parent13540e05191ddce4ac8b53bcea55ace7d51cd38e
authorPaul Olav Tvete <paul.tvete@qt.io>
committerPaul Olav Tvete <paul.tvete@qt.io>
commit timeFri, 28 Aug 2026 12:55:13 +0000