ohos: Implement voice() and setVoice()


voice() returned a default-constructed QVoice and setVoice() always
failed, so two tst_qtexttospeech cases failed on a device: voice(ohos)
requires a Ready engine to report a valid default voice, and
locale(ohos) requires that voice to be part of availableVoices().

Track the current voice instead of the current locale, and derive
locale() from it. availableVoices() keeps filtering by that locale, so a
voice reported by voice() is always one of them. setLocale() moves to
the first voice of the requested locale, and setVoice() accepts any
installed voice, adopting its locale.

Task-number: QTBUG-149561
Pick-to: 6.12
Change-Id: I75b7403b3f7c2240c2c54344fc30014be3ff6120
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
commit47e64fe4c06d0336e3a763dbe1f747e97f1615e6
parent81dd3bc5c76e0aa558eacf2b45acc7353ee332a4
authorArkadiusz Zarębski <arkadiusz.zarebski@qt.io>
committerArkadiusz Zarębski <arkadiusz.zarebski@qt.io>
commit timeThu, 17 Sep 2026 09:21:59 +0000