diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-07-27 21:15:37 +0200 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-08-16 12:14:30 +0200 |
commit | d5820ff779397c9de50286d401c5d6422fb84fcb (patch) | |
tree | a3b2df4cabd3f05dfab7dd720f4631a1a9a3fa85 /rbutil/rbutilqt | |
parent | 7c9a7ed406e1e7e079759b0048280a05e453eb10 (diff) |
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
Diffstat (limited to 'rbutil/rbutilqt')
-rw-r--r-- | rbutil/rbutilqt/configure.cpp | 8 | ||||
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.pro | 5 |
2 files changed, 12 insertions, 1 deletions
diff --git a/rbutil/rbutilqt/configure.cpp b/rbutil/rbutilqt/configure.cpp index ab0281774d..80b54c163b 100644 --- a/rbutil/rbutilqt/configure.cpp +++ b/rbutil/rbutilqt/configure.cpp @@ -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() diff --git a/rbutil/rbutilqt/rbutilqt.pro b/rbutil/rbutilqt/rbutilqt.pro index 521728a83f..fb20143397 100644 --- a/rbutil/rbutilqt/rbutilqt.pro +++ b/rbutil/rbutilqt/rbutilqt.pro @@ -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 |