Canvas2D: Remove command chaining support


Don't return Context2D object from methods and that way allow chaining
them. Reasons for this change:
- HTML canvas 2d context doesn't support this. There these methods
  also don't return anything.
- This doesn't seem to be documented in Quick Canvas (other than API
  docs return parameters) and not used in examples, so Quick Canvas
  users probably don't use it.
- This behavior makes path2d differ from canvas2d as with path2d all
  these methods are just "Q_INVOKABLE void".
- There is some performance overhead in returning the object while it
  isn't actually ever used.

Also unify the scoping of QCanvasJSContext2D.

Pick-to: 6.12
Task-number: QTBUG-147387
Change-Id: I71c82764623758c3dd04b15efe63aae053886b22
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
commit0ac155fee4c1f0f9409a149cfaafb96b49024b10
parent128ec21a214df9cb781edfb3fc96b0913b5b731e
authorKaj Grönholm <kaj.gronholm@qt.io>
committerKaj Grönholm <kaj.gronholm@qt.io>
commit timeFri, 12 Jun 2026 14:17:27 +0000