From e44bafaee536340dc502c351935cfb854face59e Mon Sep 17 00:00:00 2001 From: Stefan Karlsson Date: Sun, 12 Jul 2015 22:33:38 +0200 Subject: [PATCH] LP-10 Fix shadowing warning in OPMapGadgetConfiguration --- .../src/plugins/opmap/opmapgadget.cpp | 2 +- .../plugins/opmap/opmapgadgetconfiguration.cpp | 16 +++------------- .../src/plugins/opmap/opmapgadgetconfiguration.h | 2 +- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/opmap/opmapgadget.cpp b/ground/openpilotgcs/src/plugins/opmap/opmapgadget.cpp index 6facd9ef9..2c75814d3 100644 --- a/ground/openpilotgcs/src/plugins/opmap/opmapgadget.cpp +++ b/ground/openpilotgcs/src/plugins/opmap/opmapgadget.cpp @@ -45,7 +45,7 @@ void OPMapGadget::saveDefaultLocation(double lng, double lat, double zoom) m_config->setLatitude(lat); m_config->setLongitude(lng); m_config->setZoom(zoom); - m_config->saveConfig(); + m_config->save(); } } diff --git a/ground/openpilotgcs/src/plugins/opmap/opmapgadgetconfiguration.cpp b/ground/openpilotgcs/src/plugins/opmap/opmapgadgetconfiguration.cpp index 6f15903ed..9dba75bb8 100644 --- a/ground/openpilotgcs/src/plugins/opmap/opmapgadgetconfiguration.cpp +++ b/ground/openpilotgcs/src/plugins/opmap/opmapgadgetconfiguration.cpp @@ -105,23 +105,13 @@ IUAVGadgetConfiguration *OPMapGadgetConfiguration::clone() return m; } -void OPMapGadgetConfiguration::saveConfig() const +void OPMapGadgetConfiguration::save() const { if (!m_settings) { return; } - m_settings->setValue("mapProvider", m_mapProvider); - m_settings->setValue("defaultZoom", m_defaultZoom); - m_settings->setValue("defaultLatitude", m_defaultLatitude); - m_settings->setValue("defaultLongitude", m_defaultLongitude); - m_settings->setValue("useOpenGL", m_useOpenGL); - m_settings->setValue("showTileGridLines", m_showTileGridLines); - m_settings->setValue("accessMode", m_accessMode); - m_settings->setValue("useMemoryCache", m_useMemoryCache); - m_settings->setValue("uavSymbol", m_uavSymbol); - m_settings->setValue("cacheLocation", Utils::RemoveStoragePath(m_cacheLocation)); - m_settings->setValue("maxUpdateRate", m_maxUpdateRate); - m_settings->setValue("overlayOpacity", m_opacity); + + saveConfig(m_settings); } void OPMapGadgetConfiguration::saveConfig(QSettings *qSettings) const { diff --git a/ground/openpilotgcs/src/plugins/opmap/opmapgadgetconfiguration.h b/ground/openpilotgcs/src/plugins/opmap/opmapgadgetconfiguration.h index 19462b894..8d0e1bbbe 100644 --- a/ground/openpilotgcs/src/plugins/opmap/opmapgadgetconfiguration.h +++ b/ground/openpilotgcs/src/plugins/opmap/opmapgadgetconfiguration.h @@ -101,7 +101,7 @@ public: { return m_opacity; } - void saveConfig() const; + void save() const; public slots: void setMapProvider(QString provider) {