forked from len0rd/rockbox
rbutil: Qt6: allow building without Multimedia module.
Qt6 beta doesn't include the Multimedia module. Allow building without, and disable on Qt6 for now. Change-Id: Ie2ad25c81d9c62c8c6e8efaf8309b3600afce1d0
This commit is contained in:
parent
7c9a7ed406
commit
d5820ff779
2 changed files with 12 additions and 1 deletions
|
|
@ -20,7 +20,9 @@
|
|||
#include <QProgressDialog>
|
||||
#include <QFileDialog>
|
||||
#include <QUrl>
|
||||
#ifdef QT_MULTIMEDIA_LIB
|
||||
#include <QSound>
|
||||
#endif
|
||||
|
||||
#include "version.h"
|
||||
#include "configure.h"
|
||||
|
|
@ -446,7 +448,11 @@ void Config::updateTtsState(int index)
|
|||
{
|
||||
ui.configTTSstatus->setText(tr("Configuration OK"));
|
||||
ui.configTTSstatusimg->setPixmap(QPixmap(QString::fromUtf8(":/icons/go-next.png")));
|
||||
#ifdef QT_MULTIMEDIA_LIB
|
||||
ui.testTTS->setEnabled(true);
|
||||
#else
|
||||
ui.testTTS->setEnabled(false);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -895,6 +901,7 @@ void Config::configTts()
|
|||
|
||||
void Config::testTts()
|
||||
{
|
||||
#ifdef QT_MULTIMEDIA_LIB
|
||||
QString errstr;
|
||||
int index = ui.comboTts->currentIndex();
|
||||
TTSBase* tts;
|
||||
|
|
@ -947,6 +954,7 @@ void Config::testTts()
|
|||
delete tts; /* Config objects are never deleted (in fact, they are
|
||||
leaked..), so we can't rely on QObject, since that would
|
||||
delete the TTSBase instance on application exit */
|
||||
#endif
|
||||
}
|
||||
|
||||
void Config::configEnc()
|
||||
|
|
|
|||
|
|
@ -157,7 +157,10 @@ TARGET = RockboxUtility
|
|||
QT += network
|
||||
|
||||
message("Qt$$QT_MAJOR_VERSION found")
|
||||
QT += widgets multimedia
|
||||
QT += widgets
|
||||
if (lessThan(QT_MAJOR_VERSION, 6)) {
|
||||
QT += multimedia
|
||||
}
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue