Browse Source

Merge pull request #785 from Susurrus/valgrind_fixes

Valgrind fixes
QGC4.4
Lorenz Meier 11 years ago
parent
commit
c78ad877cc
  1. 5
      libs/opmapcontrol/src/internals/core.cpp
  2. 3
      libs/opmapcontrol/src/internals/core.h
  3. 3
      libs/opmapcontrol/src/internals/pureprojection.h
  4. 14
      src/GAudioOutput.cc
  5. 1
      src/comm/MAVLinkProtocol.cc

5
libs/opmapcontrol/src/internals/core.cpp

@ -42,8 +42,10 @@ namespace internals { @@ -42,8 +42,10 @@ namespace internals {
minOfTiles(0,0),
maxOfTiles(0,0),
zoom(0),
projection(NULL),
isDragging(false),
TooltipTextPadding(10,10),
mapType(MapType::GoogleMap),
loaderLimit(5),
maxzoom(21),
runningThreads(0),
@ -61,6 +63,9 @@ namespace internals { @@ -61,6 +63,9 @@ namespace internals {
}
Core::~Core()
{
if (projection) {
delete projection;
}
ProcessLoadTaskCallback.waitForDone();
}

3
libs/opmapcontrol/src/internals/core.h

@ -135,6 +135,9 @@ namespace internals { @@ -135,6 +135,9 @@ namespace internals {
}
void SetProjection(PureProjection* value)
{
if (projection) {
delete projection;
}
projection=value;
tileRect=Rectangle(core::Point(0,0),value->TileSize());
}

3
libs/opmapcontrol/src/internals/pureprojection.h

@ -42,8 +42,9 @@ namespace internals @@ -42,8 +42,9 @@ namespace internals
class PureProjection
{
public:
virtual ~PureProjection() {}
virtual Size TileSize()const=0;
virtual double Axis()const=0;

14
src/GAudioOutput.cc

@ -94,13 +94,13 @@ GAudioOutput::GAudioOutput(QObject *parent) : QObject(parent), @@ -94,13 +94,13 @@ GAudioOutput::GAudioOutput(QObject *parent) : QObject(parent),
#if defined Q_OS_LINUX && defined QGC_SPEECH_ENABLED
espeak_Initialize(AUDIO_OUTPUT_PLAYBACK, 500, NULL, 0); // initialize for playback with 500ms buffer and no options (see speak_lib.h)
espeak_VOICE espeak_voice;
espeak_voice.languages = "en-uk"; // Default to British English
espeak_voice.identifier = NULL; // no specific voice file specified
espeak_voice.name = "klatt"; // espeak voice name
espeak_voice.gender = 2; // Female
espeak_voice.age = 0; // age not specified
espeak_SetVoiceByProperties(&espeak_voice);
espeak_VOICE *espeak_voice = espeak_GetCurrentVoice();
espeak_voice->languages = "en-uk"; // Default to British English
espeak_voice->identifier = NULL; // no specific voice file specified
espeak_voice->name = "klatt"; // espeak voice name
espeak_voice->gender = 2; // Female
espeak_voice->age = 0; // age not specified
espeak_SetVoiceByProperties(espeak_voice);
#endif
#if defined _MSC_VER && defined QGC_SPEECH_ENABLED

1
src/comm/MAVLinkProtocol.cc

@ -183,6 +183,7 @@ void MAVLinkProtocol::run() @@ -183,6 +183,7 @@ void MAVLinkProtocol::run()
while(!_should_exit) {
if (isFinished()) {
delete heartbeatTimer;
qDebug() << "MAVLINK WORKER DONE!";
return;
}

Loading…
Cancel
Save