diff options
author | Ahmad Samir <a.samirh78@gmail.com> | 2023-08-22 18:55:08 +0300 |
---|---|---|
committer | Ahmad Samir <a.samirh78@gmail.com> | 2023-08-23 19:52:28 +0300 |
commit | f406c29b7a02c3836066b7e1e04f2b125d743151 (patch) | |
tree | 8a72b2a269c18ee165702a162610ab365315ba57 /tests | |
parent | 334f29f37398ffed3619dabd535bdf87248db609 (diff) |
Mark the whole repo with QT_NO_CONTEXTLESS_CONNECT
By adding it to the default build flags via .cmake.conf.
This amends commit c641e462e2bd33972646bd20bc76f8dff4e6d01d.
Task-number: QTBUG-116296
Change-Id: Ie1e5567ef88843d2a85ec6be03cd4d72183ba269
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qtexttospeech/tst_qtexttospeech.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/auto/qtexttospeech/tst_qtexttospeech.cpp b/tests/auto/qtexttospeech/tst_qtexttospeech.cpp index d2d1830..3e63d59 100644 --- a/tests/auto/qtexttospeech/tst_qtexttospeech.cpp +++ b/tests/auto/qtexttospeech/tst_qtexttospeech.cpp @@ -726,7 +726,7 @@ void tst_QTextToSpeech::pauseAtUtterance() int atIndex = -1; bool paused = false; - connect(&tts, &QTextToSpeech::aboutToSynthesize, [&]{ + connect(&tts, &QTextToSpeech::aboutToSynthesize, this, [&]{ ++atIndex; if (atIndex == 1 && !paused) { tts.pause(QTextToSpeech::BoundaryHint::Utterance); @@ -735,7 +735,7 @@ void tst_QTextToSpeech::pauseAtUtterance() } }); QStringList wordsSpoken; - connect(&tts, &QTextToSpeech::sayingWord, + connect(&tts, &QTextToSpeech::sayingWord, this, [&](const QString &word, qsizetype id, qsizetype at, qsizetype length){ const QString text = textList.at(atIndex).mid(at, length); QCOMPARE(id, atIndex); @@ -793,7 +793,7 @@ void tst_QTextToSpeech::sayingWord() QElapsedTimer timer; QStringList words; QList<qint64> times; - connect(&tts, &QTextToSpeech::sayingWord, + connect(&tts, &QTextToSpeech::sayingWord, this, [&words, ×, &timer, text](const QString &word, qsizetype id, qsizetype start, qsizetype length) { const QString &slice = text.sliced(start, length); QCOMPARE(word, slice); @@ -856,7 +856,7 @@ void tst_QTextToSpeech::sayingWordWithPause() selectWorkingVoice(&tts); QStringList spokenWords; - connect(&tts, &QTextToSpeech::sayingWord, + connect(&tts, &QTextToSpeech::sayingWord, this, [&](const QString &word, qsizetype id, qsizetype start, qsizetype length) { QCOMPARE(word, text.sliced(start, length)); QCOMPARE(id, 0); @@ -921,7 +921,8 @@ void tst_QTextToSpeech::synthesize() bool running = false; bool finished = false; qint64 speechTime = 0; - connect(&tts, &QTextToSpeech::stateChanged, [&running, &finished, &speechTimer, &speechTime](QTextToSpeech::State state) { + connect(&tts, &QTextToSpeech::stateChanged, this, + [&running, &finished, &speechTimer, &speechTime](QTextToSpeech::State state) { if (state == QTextToSpeech::Synthesizing || state == QTextToSpeech::Speaking) { speechTimer.start(); running = true; |