From ef785bd060f67ee1f7fffa84ff6bdc8557912521 Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Mon, 14 Jul 2014 22:09:53 +0200 Subject: [PATCH] OP-1383 follow up cleanup - ConnectionManager should not readily expose internal QIODevice --- .../openpilotgcs/src/plugins/coreplugin/connectionmanager.h | 4 ---- ground/openpilotgcs/src/plugins/scope/scopegadgetwidget.cpp | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/coreplugin/connectionmanager.h b/ground/openpilotgcs/src/plugins/coreplugin/connectionmanager.h index 0d72cb71d..b19cc7c5d 100644 --- a/ground/openpilotgcs/src/plugins/coreplugin/connectionmanager.h +++ b/ground/openpilotgcs/src/plugins/coreplugin/connectionmanager.h @@ -83,10 +83,6 @@ public: void init(); - QIODevice *getCurrentConnection() - { - return m_ioDev; - } DevListItem getCurrentDevice() { return m_connectionDevice; diff --git a/ground/openpilotgcs/src/plugins/scope/scopegadgetwidget.cpp b/ground/openpilotgcs/src/plugins/scope/scopegadgetwidget.cpp index 2762727bd..394c09d27 100644 --- a/ground/openpilotgcs/src/plugins/scope/scopegadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/scope/scopegadgetwidget.cpp @@ -264,7 +264,7 @@ void ScopeGadgetWidget::preparePlot(PlotType plotType) // Only start the timer if we are already connected Core::ConnectionManager *cm = Core::ICore::instance()->connectionManager(); - if (cm->getCurrentConnection() && replotTimer) { + if (cm->isConnected() && replotTimer) { if (!replotTimer->isActive()) { replotTimer->start(m_refreshInterval); } else {