mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-14 00:28:42 +00:00
Use QSound instead of QSoundEffect on Qt5
As it was before 1807d0426e,
to avoid issues with QSoundEffect on Qt5
This commit is contained in:
@@ -40,7 +40,11 @@
|
||||
#include <QKeyEvent>
|
||||
#include <QMutexLocker>
|
||||
|
||||
#if QT_VERSION >= 0x060000
|
||||
#include <QSoundEffect>
|
||||
#else
|
||||
#include <QSound>
|
||||
#endif
|
||||
|
||||
// Three current realtime device types supported are:
|
||||
#include "RealtimeController.h"
|
||||
@@ -2078,9 +2082,13 @@ void TrainSidebar::guiUpdate() // refreshes the telemetry
|
||||
|
||||
if (fPlayAudio) {
|
||||
lapAudioThisLap = false;
|
||||
#if QT_VERSION >= 0x060000
|
||||
QSoundEffect effect;
|
||||
effect.setSource(QUrl::fromLocalFile(":audio/lap.wav"));
|
||||
effect.play();
|
||||
#else
|
||||
QSound::play(":audio/lap.wav");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user