diff --git a/libs/opmapcontrol/src/internals/core.cpp b/libs/opmapcontrol/src/internals/core.cpp index 211603bc450e1e085c0d1b087afe51663be3c9ae..46e8f7ae834d29cdfe5ec2a3229c537174d62ae9 100644 --- a/libs/opmapcontrol/src/internals/core.cpp +++ b/libs/opmapcontrol/src/internals/core.cpp @@ -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 { } Core::~Core() { + if (projection) { + delete projection; + } ProcessLoadTaskCallback.waitForDone(); } diff --git a/libs/opmapcontrol/src/internals/core.h b/libs/opmapcontrol/src/internals/core.h index 73c652de57d9435975772eb59a018a1bbb7c4b85..c8c50bf0acc485f2304a412d2745e9d7a99638bf 100644 --- a/libs/opmapcontrol/src/internals/core.h +++ b/libs/opmapcontrol/src/internals/core.h @@ -135,6 +135,9 @@ namespace internals { } void SetProjection(PureProjection* value) { + if (projection) { + delete projection; + } projection=value; tileRect=Rectangle(core::Point(0,0),value->TileSize()); } diff --git a/libs/opmapcontrol/src/internals/pureprojection.h b/libs/opmapcontrol/src/internals/pureprojection.h index 77f795d3109c301f502d7810be7f1162b6033137..b75389c7a3903127ed78678988ff92955addcce1 100644 --- a/libs/opmapcontrol/src/internals/pureprojection.h +++ b/libs/opmapcontrol/src/internals/pureprojection.h @@ -42,8 +42,9 @@ namespace internals class PureProjection { - public: + virtual ~PureProjection() {} + virtual Size TileSize()const=0; virtual double Axis()const=0; diff --git a/src/GAudioOutput.cc b/src/GAudioOutput.cc index 2e405578c8a7a1f92ab7dfa8e856f3838d035230..5822f9dd9d982d1e61f5e2003964fceb955e130d 100644 --- a/src/GAudioOutput.cc +++ b/src/GAudioOutput.cc @@ -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 diff --git a/src/comm/MAVLinkProtocol.cc b/src/comm/MAVLinkProtocol.cc index 81186fd0b8298363b57092cb23e285a24126effe..332a210307bd93eaa55c18e42ee1bc116064218b 100644 --- a/src/comm/MAVLinkProtocol.cc +++ b/src/comm/MAVLinkProtocol.cc @@ -183,6 +183,7 @@ void MAVLinkProtocol::run() while(!_should_exit) { if (isFinished()) { + delete heartbeatTimer; qDebug() << "MAVLINK WORKER DONE!"; return; }