* FIX #4665: Address missing sound on Qt5 Builds * FIX #4665: Address missing sound on Qt5 Builds * Include both engines
This commit is contained in:
parent
4c290aec57
commit
f25e4785ae
3 changed files with 11 additions and 6 deletions
|
@ -320,6 +320,8 @@ if(WIN32)
|
|||
PATTERN "imageformats/qtiff.dll"
|
||||
PATTERN "imageformats/qwbmp.dll"
|
||||
PATTERN "imageformats/qwebp.dll"
|
||||
PATTERN "mediaservice/dsengine.dll"
|
||||
PATTERN "mediaservice/wmfengine.dll"
|
||||
PATTERN "platforms/qdirect2d.dll"
|
||||
PATTERN "platforms/qminimal.dll"
|
||||
PATTERN "platforms/qoffscreen.dll"
|
||||
|
|
|
@ -2,10 +2,13 @@
|
|||
|
||||
#include "settingscache.h"
|
||||
|
||||
#include <QAudioOutput>
|
||||
#include <QDir>
|
||||
#include <QMediaPlayer>
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
|
||||
#include <QAudioOutput>
|
||||
#endif
|
||||
|
||||
#define DEFAULT_THEME_NAME "Default"
|
||||
#define TEST_SOUND_FILENAME "player_join"
|
||||
|
||||
|
@ -23,7 +26,7 @@ SoundEngine::~SoundEngine()
|
|||
{
|
||||
if (player) {
|
||||
player->deleteLater();
|
||||
player = 0;
|
||||
player = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,7 +51,7 @@ void SoundEngine::soundEnabledChanged()
|
|||
}
|
||||
}
|
||||
|
||||
void SoundEngine::playSound(QString fileName)
|
||||
void SoundEngine::playSound(const QString &fileName)
|
||||
{
|
||||
if (!player) {
|
||||
return;
|
||||
|
|
|
@ -15,9 +15,9 @@ class SoundEngine : public QObject
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SoundEngine(QObject *parent = nullptr);
|
||||
~SoundEngine();
|
||||
void playSound(QString fileName);
|
||||
explicit SoundEngine(QObject *parent = nullptr);
|
||||
~SoundEngine() override;
|
||||
void playSound(const QString &fileName);
|
||||
QStringMap &getAvailableThemes();
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue