ohos: add the shared bluetooth backend foundation


Introduce the pieces the OHOS bluetooth backend needs before any of its
Qt classes can be implemented: the JS business error reader that maps
the documented HarmonyOS error codes onto an enum, the ACCESS_BLUETOOTH
permission check every entry point performs, and the generated header
for the HarmonyOS enum names.

Every Qt class this series implements consumes the error reader and the
permission check, so introducing them on their own keeps each of those
commits to the class it implements. Declare the module's
ACCESS_BLUETOOTH permission here too, because the check that reads it
lives here. Generate the enum header with the adapter state alone, the
only name needed this early, and let each later commit generate the
name it starts to use, so no commit carries a mapping nothing in it
reads.

Read a business error whose 'code' is a string too, even though
@ohos.base.d.ts declares that field as a number. HarmonyOS was observed
on device sending a string code, and insisting on a number turns a
recoverable platform error into a fatal type mismatch.

Rename the QT_OHOS_BLUETOOTH build define to QT_HARMONY_BLUETOOTH so
the module matches the platform name the rest of Qt uses, and build it
with exceptions and the Node addon API, which the JS interop needs.

Task-number: QTBUG-147192
Pick-to: 6.12
Change-Id: I721b78324b56b00fb9a9c3183ccb22ff27eb853d
Reviewed-by: Zbigniew Chyla <zbigniew.chyla@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
commit9abaebd8ff9095f753a0eea41f5d241f3de5d466
parent0d961038d42e54dc473260d14fac46537c9e75ed
authorAdam Krzykala <adam.krzykala@qt.io>
committerDawid Śliwa <dawid.sliwa@qt.io>
commit timeMon, 14 Sep 2026 12:02:11 +0000