diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2024-03-05 16:51:37 +0100 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2024-03-05 16:59:26 +0100 |
commit | 037fcecfaa40645994038f28f5d8ca98b80d6afd (patch) | |
tree | 9cd90170c15af65d0623439f3d6847f715981e5c /tests/auto | |
parent | 6b3aea3898a8c4e066d3fe423a6308c14608d9f6 (diff) |
Enqueue new text if added while the engine is busy
Calling enqueue() should be equivalent to say() when the engine
is Ready, otherwise it should enqueue the text. The old
implementation only enqueued the text when the engine was
in Speaking state, overriding the current utterance when the
engine was already synthesizing, or paused.
Adjust test to enqueue the next text chunk as soon as the
engine transitions away from the Ready state.
Pick-to: 6.7 6.6
Fixes: QTBUG-122884
Change-Id: I19518a92d1ae73b01dc3de1d9ae6178f5f55b3ad
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qtexttospeech/tst_qtexttospeech.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/qtexttospeech/tst_qtexttospeech.cpp b/tests/auto/qtexttospeech/tst_qtexttospeech.cpp index b2b8fb8..ec31fef 100644 --- a/tests/auto/qtexttospeech/tst_qtexttospeech.cpp +++ b/tests/auto/qtexttospeech/tst_qtexttospeech.cpp @@ -696,8 +696,8 @@ void tst_QTextToSpeech::sayMultiple() for (qsizetype i = 0; i < textList.count(); ++i) { const QString &text = textList.at(i); tts.enqueue(text); - if (!i) // wait for the engine to start speaking - QTRY_COMPARE(tts.state(), QTextToSpeech::Speaking); + if (!i) // wait for the engine to start synthesizing + QTRY_COMPARE_NE(tts.state(), QTextToSpeech::Ready); } QTRY_VERIFY(doneSpeaking); |