ohos: Use common registerOnOff... JS helper


Replace the locally defined registerOnOffMethodsBasedEventHandler()
with the common registerQOhosOnOffMethodsBasedEventHandler() from
qtbase's private qohosjstools_p.h header. The local helper predated
the common variant and is now redundant.

Unlike the local helper, the common function does not wrap its result
in makeProxyWithJsThreadDeleter(), so each call site now applies that
wrapper explicitly to keep the off() call running on the JS thread
when the registration handle is destroyed.

Remove qohosjsutils.{h,cpp} and their CMakeLists.txt entries.

Pick-to: 6.12
Task-number: QTBUG-148366
Change-Id: I848feed2e1e38b5f2289d6ee4a5b0d373b68f4c7
Reviewed-by: Aleksander Wawrzyniak <aleksander.wawrzyniak@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Adam Krzykala <adam.krzykala@qt.io>
commitdda5324bd128fe2128c415044ae0ba0637758613
parentfec573d121a9eb469b802833cda0a878c515354b
authorZbigniew Chyla <zbigniew.chyla@qt.io>
committerZbigniew Chyla <zbigniew.chyla@qt.io>
commit timeFri, 21 Aug 2026 10:56:00 +0000