diff --git a/qgroundcontrol.pri b/qgroundcontrol.pri index d3e5ba9da7e21a4888c716cd963d05a8f6df4507..818da225bdb02b8b3e0b66a4ff495294734606f1 100644 --- a/qgroundcontrol.pri +++ b/qgroundcontrol.pri @@ -190,6 +190,8 @@ macx|macx-g++42|macx-g++: { # GNU/Linux linux-g++ { + CONFIG -= console + debug { #DESTDIR = $$TARGETDIR/debug #CONFIG += debug console @@ -274,6 +276,8 @@ message("Compiling for linux 32") linux-g++-64 { + CONFIG -= console + debug { #DESTDIR = $$TARGETDIR/debug #CONFIG += debug console diff --git a/src/ui/linechart/LinechartPlot.cc b/src/ui/linechart/LinechartPlot.cc index b886239dd158ccb3fe2386a9dae096574c9157c0..3ef111785b94fd00e576337997ed06f9332cd774 100644 --- a/src/ui/linechart/LinechartPlot.cc +++ b/src/ui/linechart/LinechartPlot.cc @@ -132,7 +132,29 @@ LinechartPlot::LinechartPlot(QWidget *parent, int plotid, quint64 interval): Qwt LinechartPlot::~LinechartPlot() { - removeAllData(); +// datalock.lock(); +// // Delete curves +// QMap::iterator i; +// for(i = curves.begin(); i != curves.end(); ++i) { +// // Remove from curve list +// QwtPlotCurve* curve = curves.take(i.key()); +// // Delete the object +// delete curve; +// // Set the pointer null +// curve = NULL; +// } + +// // Delete data +// QMap::iterator j; +// for(j = data.begin(); j != data.end(); ++j) { +// // Remove from data list +// TimeSeriesData* d = data.take(j.key()); +// // Delete the object +// delete d; +// // Set the pointer null +// d = NULL; +// } +// datalock.unlock(); } void LinechartPlot::showEvent(QShowEvent* event) diff --git a/src/ui/linechart/LinechartWidget.cc b/src/ui/linechart/LinechartWidget.cc index 88b3fd6c88605c0a97f2647eaa6fde9d3207a493..d580cb33e2bbf9052885f8a1866c7b6075680a71 100644 --- a/src/ui/linechart/LinechartWidget.cc +++ b/src/ui/linechart/LinechartWidget.cc @@ -153,6 +153,8 @@ LinechartWidget::~LinechartWidget() { writeSettings(); stopLogging(); + if (activePlot) delete activePlot; + activePlot = NULL; delete listedCurves; listedCurves = NULL; }