diff --git a/utils/rbutilqt/changelog.txt b/utils/rbutilqt/changelog.txt index fef1e317c6..d656142e69 100644 --- a/utils/rbutilqt/changelog.txt +++ b/utils/rbutilqt/changelog.txt @@ -55,4 +55,5 @@ Version 1.5.2 * Generate additional talk clips for language name and 'invalid voice file' * When installing development builds, fall back to daily artefacts for non-firmware files * Where possible, extract voice corrections file from the actual device +* Port TTS preview to QT6 * Drop support for Qt5, now requires Qt6. diff --git a/utils/rbutilqt/configure.cpp b/utils/rbutilqt/configure.cpp index a8bc2e49aa..25cea94acf 100644 --- a/utils/rbutilqt/configure.cpp +++ b/utils/rbutilqt/configure.cpp @@ -20,8 +20,9 @@ #include #include #include -#if defined(QT_MULTIMEDIA_LIB) && (QT_VERSION < 0x060000) -#include + +#if defined(QT_MULTIMEDIA_LIB) +#include #endif #include "version.h" @@ -449,7 +450,7 @@ void Config::updateTtsState(int index) { ui.configTTSstatus->setText(tr("Configuration OK")); ui.configTTSstatusimg->setPixmap(QPixmap(QString::fromUtf8(":/icons/go-next.svg"))); -#if defined(QT_MULTIMEDIA_LIB) && (QT_VERSION < 0x060000) +#if defined(QT_MULTIMEDIA_LIB) ui.testTTS->setEnabled(true); #else ui.testTTS->setEnabled(false); @@ -908,7 +909,7 @@ void Config::configTts() void Config::testTts() { -#if defined(QT_MULTIMEDIA_LIB) && (QT_VERSION < 0x060000) +#if defined(QT_MULTIMEDIA_LIB) QString errstr; int index = ui.comboTts->currentIndex(); TTSBase* tts; @@ -955,7 +956,11 @@ void Config::testTts() } tts->stop(); if(!filename.isEmpty()) { - QSound::play(filename); + QSoundEffect effect; + effect.setSource(QUrl::fromLocalFile(filename)); + effect.setLoopCount(0); + effect.setVolume(1.0f); + effect.play(); } ui.testTTS->setEnabled(true); delete tts; /* Config objects are never deleted (in fact, they are