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>