ohos: Implement error reporting in qt speech engine


errorReason() and errorString() were mocked and only logged a warning.
Implement them following the Android and Darwin engines: cache the
reason and the message in setError(), enter the Error state and emit
errorOccurred().

Map the Core Speech Kit error codes reported by the JS engine to
QTextToSpeech::ErrorReason. The error message is a translated string
from the QTextToSpeech context, as in the other engines; the raw code
and the message from the platform are kept in the warning log.

Task-number: QTBUG-149269
Pick-to: 6.12
Change-Id: Idf7f9fe0ade2d54ea20ae229f362360a7851e10b
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Dawid Śliwa <dawid.sliwa@qt.io>
commitccb7c564471ce1c543769cb43b30ed7f6f4318fb
parent9b4168dbbc66f515260a66647c1988c7e8e459fc
authorArkadiusz Zarębski <arkadiusz.zarebski@qt.io>
committerArkadiusz Zarębski <arkadiusz.zarebski@qt.io>
commit timeThu, 17 Sep 2026 07:54:12 +0000