From 0e67aae10b8effcad6200724ae56a79c1de5b20e Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Tue, 9 Dec 2014 18:53:23 +0100 Subject: [PATCH] Move audio file to resource --- src/audio/QGCAudioWorker.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/audio/QGCAudioWorker.cpp b/src/audio/QGCAudioWorker.cpp index 7ec5e63af..9815dee52 100644 --- a/src/audio/QGCAudioWorker.cpp +++ b/src/audio/QGCAudioWorker.cpp @@ -77,6 +77,7 @@ void QGCAudioWorker::init() // Prepare regular emergency signal, will be fired off on calling startEmergency() emergencyTimer = new QTimer(); connect(emergencyTimer, SIGNAL(timeout()), this, SLOT(beep())); + } QGCAudioWorker::~QGCAudioWorker() @@ -149,9 +150,7 @@ void QGCAudioWorker::beep() if (!muted) { - // Use QFile to transform path for all OS - QFile f(QCoreApplication::applicationDirPath() + QString("/files/audio/alert.wav")); - sound->play(f.fileName()); + sound->play(":/files/audio/alert.wav"); } } -- 2.22.0