winrt: add error handling and remove unused variable


Compiling with clang-cl raised some warnings. Especially the missing
error handling in QTextToSpeechEngineWinRT::locale is something that we
want to address.

Pick-to: 6.8 6.10 6.11
Change-Id: I755f12d7809e9a991467ef6242ae13407ffcf806
Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
commit4b2c957231862281ae9f30fc22b2717d55277ab0
parente2631758f85ecdadb32bb7bd6579d201941933bb
authorTim Blechmann <tim@klingt.org>
committerTim Blechmann <tim@klingt.org>
commit timeFri, 2 Jan 2026 20:18:55 +0800