diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-04-22 10:13:06 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2020-04-22 10:13:06 +0200 |
commit | d9dbe04ce445b93c36ccfab4b5145d41cd4a58ff (patch) | |
tree | 66404d1c4f7e6830da141f8ca86f54afccd12308 | |
parent | 8bd7d4df87bfcd12d35b84f175660acaadced491 (diff) | |
parent | 387f4b6b379ac82ff4625ced5a2f1af7c4ee865e (diff) |
Merge remote-tracking branch 'origin/5.15' into 5.15.0v5.15.0-rc2v5.15.0-rc1v5.15.0
Change-Id: I37cf64f8eb7653e45e8177eb157b83f2a03b759e
-rw-r--r-- | dist/changes-5.14.2 | 20 | ||||
-rw-r--r-- | tests/auto/texttospeech/tst_qtexttospeech.cpp | 27 |
2 files changed, 38 insertions, 9 deletions
diff --git a/dist/changes-5.14.2 b/dist/changes-5.14.2 new file mode 100644 index 0000000..68a0051 --- /dev/null +++ b/dist/changes-5.14.2 @@ -0,0 +1,20 @@ +Qt 5.14.2 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.14.0 through 5.14.1. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.14 series is binary compatible with the 5.13.x series. +Applications compiled for 5.13 will continue to run with 5.14. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + + - This release contains only minor code improvements. diff --git a/tests/auto/texttospeech/tst_qtexttospeech.cpp b/tests/auto/texttospeech/tst_qtexttospeech.cpp index 9996659..dce6d81 100644 --- a/tests/auto/texttospeech/tst_qtexttospeech.cpp +++ b/tests/auto/texttospeech/tst_qtexttospeech.cpp @@ -47,11 +47,14 @@ #endif #endif +enum : int { SpeechDuration = 20000 }; + class tst_QTextToSpeech : public QObject { Q_OBJECT private slots: + void initTestCase(); void say_hello(); void speech_rate(); void pitch(); @@ -59,6 +62,12 @@ private slots: void volume(); }; +void tst_QTextToSpeech::initTestCase() +{ +#if QT_CONFIG(speechd) && defined(LIBSPEECHD_MAJOR_VERSION) && defined(LIBSPEECHD_MINOR_VERSION) + qInfo("Using libspeechd v%d.%d", LIBSPEECHD_MAJOR_VERSION, LIBSPEECHD_MINOR_VERSION); +#endif +} void tst_QTextToSpeech::say_hello() { @@ -70,9 +79,9 @@ void tst_QTextToSpeech::say_hello() timer.start(); tts.say(text); QTRY_COMPARE(tts.state(), QTextToSpeech::Speaking); - QSignalSpy spy(&tts, SIGNAL(stateChanged(QTextToSpeech::State))); - spy.wait(10000); - QCOMPARE(tts.state(), QTextToSpeech::Ready); + QSignalSpy spy(&tts, &QTextToSpeech::stateChanged); + QVERIFY(spy.wait(SpeechDuration)); + QCOMPARE(int(tts.state()), int(QTextToSpeech::Ready)); QVERIFY(timer.elapsed() > 100); } @@ -94,9 +103,9 @@ void tst_QTextToSpeech::speech_rate() timer.start(); tts.say(text); QTRY_COMPARE(tts.state(), QTextToSpeech::Speaking); - QSignalSpy spy(&tts, SIGNAL(stateChanged(QTextToSpeech::State))); - spy.wait(10000); - QCOMPARE(tts.state(), QTextToSpeech::Ready); + QSignalSpy spy(&tts, &QTextToSpeech::stateChanged); + QVERIFY(spy.wait(SpeechDuration)); + QCOMPARE(int(tts.state()), int(QTextToSpeech::Ready)); qint64 time = timer.elapsed(); QVERIFY(time > lastTime); lastTime = time; @@ -134,9 +143,9 @@ void tst_QTextToSpeech::set_voice() timer.start(); tts.say(text); QTRY_COMPARE(tts.state(), QTextToSpeech::Speaking); - QSignalSpy spy(&tts, SIGNAL(stateChanged(QTextToSpeech::State))); - spy.wait(10000); - QCOMPARE(tts.state(), QTextToSpeech::Ready); + QSignalSpy spy(&tts, &QTextToSpeech::stateChanged); + QVERIFY(spy.wait(SpeechDuration)); + QCOMPARE(int(tts.state()), int(QTextToSpeech::Ready)); QVERIFY(timer.elapsed() > 100); } |