diff --git a/qgroundcontrol.pri b/qgroundcontrol.pri index a2b8db18be596f24e68393046e5aa7b1b230c605..e725637aa878b7c405d36884db3e18949663fa9b 100644 --- a/qgroundcontrol.pri +++ b/qgroundcontrol.pri @@ -131,6 +131,8 @@ macx|macx-g++42|macx-g++: { # GNU/Linux linux-g++ { + CONFIG -= console + debug { #DESTDIR = $$TARGETDIR/debug #CONFIG += debug console @@ -215,6 +217,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 c8c6aee69b2d56761cd64c0c29bba6a4a2243c52..337d4657f3e0922414f9cd05d2bddafb8456701d 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; }