Browse Source

Fixed compile warnings, fixed a windows-specific compile error

QGC4.4
Lorenz Meier 14 years ago
parent
commit
74e4704f38
  1. 18
      src/GAudioOutput.cc
  2. 1
      src/comm/MAVLinkSimulationLink.h
  3. 5
      src/comm/SerialLink.cc
  4. 2
      src/ui/HSIDisplay.cc
  5. 2
      src/ui/MainWindow.cc

18
src/GAudioOutput.cc

@ -119,9 +119,9 @@ GAudioOutput::GAudioOutput(QObject* parent) : QObject(parent), @@ -119,9 +119,9 @@ GAudioOutput::GAudioOutput(QObject* parent) : QObject(parent),
}
#endif
// Initialize audio output
m_media = new Phonon::MediaObject(this);
Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this);
createPath(m_media, audioOutput);
//m_media = new Phonon::MediaObject(this);
//Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this);
//createPath(m_media, audioOutput);
// Prepare regular emergency signal, will be fired off on calling startEmergency()
emergencyTimer = new QTimer();
@ -228,8 +228,8 @@ void GAudioOutput::notifyPositive() @@ -228,8 +228,8 @@ void GAudioOutput::notifyPositive()
if (!muted) {
// Use QFile to transform path for all OS
QFile f(QCoreApplication::applicationDirPath()+QString("/audio/double_notify.wav"));
m_media->setCurrentSource(Phonon::MediaSource(f.fileName().toStdString().c_str()));
m_media->play();
//m_media->setCurrentSource(Phonon::MediaSource(f.fileName().toStdString().c_str()));
//m_media->play();
}
}
@ -238,8 +238,8 @@ void GAudioOutput::notifyNegative() @@ -238,8 +238,8 @@ void GAudioOutput::notifyNegative()
if (!muted) {
// Use QFile to transform path for all OS
QFile f(QCoreApplication::applicationDirPath()+QString("/audio/flat_notify.wav"));
m_media->setCurrentSource(Phonon::MediaSource(f.fileName().toStdString().c_str()));
m_media->play();
//m_media->setCurrentSource(Phonon::MediaSource(f.fileName().toStdString().c_str()));
//m_media->play();
}
}
@ -283,8 +283,8 @@ void GAudioOutput::beep() @@ -283,8 +283,8 @@ void GAudioOutput::beep()
// Use QFile to transform path for all OS
QFile f(QCoreApplication::applicationDirPath()+QString("/audio/alert.wav"));
qDebug() << "FILE:" << f.fileName();
m_media->setCurrentSource(Phonon::MediaSource(f.fileName().toStdString().c_str()));
m_media->play();
//m_media->setCurrentSource(Phonon::MediaSource(f.fileName().toStdString().c_str()));
//m_media->play();
}
}

1
src/comm/MAVLinkSimulationLink.h

@ -38,6 +38,7 @@ This file is part of the QGROUNDCONTROL project @@ -38,6 +38,7 @@ This file is part of the QGROUNDCONTROL project
#include <QQueue>
#include <QMutex>
#include <QMap>
#include <qmath.h>
#include <inttypes.h>
#include "QGCMAVLink.h"

5
src/comm/SerialLink.cc

@ -211,8 +211,9 @@ using namespace TNX; @@ -211,8 +211,9 @@ using namespace TNX;
SerialLink::SerialLink(QString portname, int baudRate, bool hardwareFlowControl, bool parity,
int dataBits, int stopBits) :
port(NULL), m_stopp(false),
ports(new QVector<QString>())
port(NULL),
ports(new QVector<QString>()),
m_stopp(false)
{
// Setup settings
this->porthandle = portname.trimmed();

2
src/ui/HSIDisplay.cc

@ -99,8 +99,8 @@ HSIDisplay::HSIDisplay(QWidget *parent) : @@ -99,8 +99,8 @@ HSIDisplay::HSIDisplay(QWidget *parent) :
laserFix(0),
mavInitialized(false),
bottomMargin(10.0f),
topMargin(12.0f),
dragStarted(false),
topMargin(12.0f),
leftDragStarted(false),
mouseHasMoved(false),
actionPending(false),

2
src/ui/MainWindow.cc

@ -92,8 +92,8 @@ MainWindow::MainWindow(QWidget *parent): @@ -92,8 +92,8 @@ MainWindow::MainWindow(QWidget *parent):
aboutToCloseFlag(false),
changingViewsFlag(false),
styleFileName(QCoreApplication::applicationDirPath() + "/style-indoor.css"),
autoReconnect(false),
centerStackActionGroup(this),
autoReconnect(false),
lowPowerMode(false)
{
hide();

Loading…
Cancel
Save