From 7f6eee6a10fcfde481d336aad97cb609238ad141 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 15 Jan 2021 10:31:39 +0000 Subject: [PATCH 1/3] Fix markup in readme files --- plugins/feature/map/readme.md | 2 +- plugins/feature/startracker/readme.md | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/feature/map/readme.md b/plugins/feature/map/readme.md index d9254cb54..c34497525 100644 --- a/plugins/feature/map/readme.md +++ b/plugins/feature/map/readme.md @@ -20,7 +20,7 @@ To centre the map on an object or location, enter: * Latitude and longitude. This can be in decimal degrees (E.g: -23.666413, -46.573550) or degrees, minutes and seconds (E.g: 50°40'46.461"N 95°48'26.533"W or 33d51m54.5148sS 151d12m35.6400sE). * A Maidenhead locator (E.g: IO86av). -

3: Display Names

+

3: Display Names

When checked, names of objects are displayed in a bubble next to each object. diff --git a/plugins/feature/startracker/readme.md b/plugins/feature/startracker/readme.md index 6d2a3c332..1866aca76 100644 --- a/plugins/feature/startracker/readme.md +++ b/plugins/feature/startracker/readme.md @@ -19,7 +19,7 @@ This button starts or stops the plugin. The plugin will only calculate azimuth a Pressing this button centres the Map Feature (if open) on the current target. -

3: Set latitude and longitude from My Position/h3> +

3: Set latitude and longitude from My Position

When clicked, it sets the latitude, longitude and height fields to the values from SDRangel's My Position preferences. @@ -43,7 +43,7 @@ Pressing this button displays a settings dialog, that allows you to set: * Whether to draw the Moon on the map. * Whether to draw the target star (or galaxy) on the map. -

5: Latitude/h3> +

5: Latitude

Specifies the latitude in decimal degrees of the observation point (antenna location). @@ -96,7 +96,7 @@ Displays the calculated azimuth (angle in degrees, clockwise from North) to the Displays the calculated elevation (angle in degrees - 0 to horizon and 90 to zenith) to the object. -

13: Elevation vs Time Plot

+

13: Elevation vs Time Plot

In order to assit in determining whether and when observations of the target object may be possible, an elevation vs time plot is drawn for the 24 hours encompassing the selected date and time. Some objects may not be visible from a particular latitude for the specified time, in which case, the grahp title will indicate the object is not visible on that particular date. @@ -105,6 +105,8 @@ Some objects may not be visible from a particular latitude for the specified tim The Star Tracker feature can send the overhead position of the Sun, Moon and target Star to the Map. These can be enabled individually in the settings dialog. The Moon should be displayed with an approximate phase. Stars (or galaxies) are displayed as an image of a pulsar. +![StarTracker map](../../../doc/img/StarTracker_map.png) + When using the Find feature in the Map GUI, you can search for "Sun", "Moon" or "Star".

Stellarium Interface

@@ -135,8 +137,6 @@ To see the rough field of view of your antenna, open the Ocular configuration wi Set aFOV to the half-power beam width of your antenna, focal length to 100 and field stop to 0. Then select the SDRangel telescope reticle and press Ocular view. -![StarTracker map](../../../doc/img/StarTracker_map.png) -

Attribution

Icons are by Adnen Kadri and Erik Madsen, from the Noun Project Noun Project: https://thenounproject.com/ From 2c32224977a4d4d53917ad602590e32ef27581e1 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 15 Jan 2021 11:00:03 +0000 Subject: [PATCH 2/3] Fix cut and paste errors from PTT feature --- plugins/feature/afc/afcworker.h | 2 +- plugins/feature/aprs/aprswebapiadapter.cpp | 4 ++-- .../gs232controller/gs232controllerwebapiadapter.cpp | 4 ++-- plugins/feature/map/mapwebapiadapter.cpp | 4 ++-- plugins/feature/rigctlserver/rigctlserver.cpp | 4 +--- plugins/feature/rigctlserver/rigctlserver.h | 1 - plugins/feature/rigctlserver/rigctlserverwebapiadapter.cpp | 4 ++-- plugins/feature/startracker/startracker.cpp | 4 +--- plugins/feature/startracker/startracker.h | 1 - plugins/feature/startracker/startrackerwebapiadapter.cpp | 4 ++-- plugins/feature/startracker/startrackerworker.h | 2 -- plugins/feature/vorlocalizer/vorlocalizer.cpp | 5 ++--- plugins/feature/vorlocalizer/vorlocalizerplugin.cpp | 1 - plugins/feature/vorlocalizer/vorlocalizerplugin.h | 6 +++--- 14 files changed, 18 insertions(+), 28 deletions(-) diff --git a/plugins/feature/afc/afcworker.h b/plugins/feature/afc/afcworker.h index f977e01c3..25eb0200e 100644 --- a/plugins/feature/afc/afcworker.h +++ b/plugins/feature/afc/afcworker.h @@ -174,4 +174,4 @@ private slots: void handleInputMessages(); }; -#endif // INCLUDE_FEATURE_SIMPLEPTTWORKER_H_ +#endif // INCLUDE_FEATURE_AFCWORKER_H_ diff --git a/plugins/feature/aprs/aprswebapiadapter.cpp b/plugins/feature/aprs/aprswebapiadapter.cpp index 9bb122fb0..ec8cff2aa 100644 --- a/plugins/feature/aprs/aprswebapiadapter.cpp +++ b/plugins/feature/aprs/aprswebapiadapter.cpp @@ -31,8 +31,8 @@ int APRSWebAPIAdapter::webapiSettingsGet( QString& errorMessage) { (void) errorMessage; - response.setSimplePttSettings(new SWGSDRangel::SWGSimplePTTSettings()); - response.getSimplePttSettings()->init(); + response.setAprsSettings(new SWGSDRangel::SWGAPRSSettings()); + response.getAprsSettings()->init(); APRS::webapiFormatFeatureSettings(response, m_settings); return 200; diff --git a/plugins/feature/gs232controller/gs232controllerwebapiadapter.cpp b/plugins/feature/gs232controller/gs232controllerwebapiadapter.cpp index b638a0060..e2c072cad 100644 --- a/plugins/feature/gs232controller/gs232controllerwebapiadapter.cpp +++ b/plugins/feature/gs232controller/gs232controllerwebapiadapter.cpp @@ -31,8 +31,8 @@ int GS232ControllerWebAPIAdapter::webapiSettingsGet( QString& errorMessage) { (void) errorMessage; - response.setSimplePttSettings(new SWGSDRangel::SWGSimplePTTSettings()); - response.getSimplePttSettings()->init(); + response.setGs232ControllerSettings(new SWGSDRangel::SWGGS232ControllerSettings()); + response.getGs232ControllerSettings()->init(); GS232Controller::webapiFormatFeatureSettings(response, m_settings); return 200; diff --git a/plugins/feature/map/mapwebapiadapter.cpp b/plugins/feature/map/mapwebapiadapter.cpp index 0ef0500b2..6ba453a47 100644 --- a/plugins/feature/map/mapwebapiadapter.cpp +++ b/plugins/feature/map/mapwebapiadapter.cpp @@ -31,8 +31,8 @@ int MapWebAPIAdapter::webapiSettingsGet( QString& errorMessage) { (void) errorMessage; - response.setSimplePttSettings(new SWGSDRangel::SWGSimplePTTSettings()); - response.getSimplePttSettings()->init(); + response.setMapSettings(new SWGSDRangel::SWGMapSettings()); + response.getMapSettings()->init(); Map::webapiFormatFeatureSettings(response, m_settings); return 200; diff --git a/plugins/feature/rigctlserver/rigctlserver.cpp b/plugins/feature/rigctlserver/rigctlserver.cpp index ef67c003f..b9cae35e5 100644 --- a/plugins/feature/rigctlserver/rigctlserver.cpp +++ b/plugins/feature/rigctlserver/rigctlserver.cpp @@ -24,7 +24,6 @@ #include "SWGFeatureSettings.h" #include "SWGFeatureReport.h" #include "SWGFeatureActions.h" -#include "SWGSimplePTTReport.h" #include "SWGDeviceState.h" #include "dsp/dspengine.h" @@ -39,8 +38,7 @@ const char* const RigCtlServer::m_featureIdURI = "sdrangel.feature.rigctlserver" const char* const RigCtlServer::m_featureId = "RigCtlServer"; RigCtlServer::RigCtlServer(WebAPIAdapterInterface *webAPIAdapterInterface) : - Feature(m_featureIdURI, webAPIAdapterInterface), - m_ptt(false) + Feature(m_featureIdURI, webAPIAdapterInterface) { qDebug("RigCtlServer::RigCtlServer: webAPIAdapterInterface: %p", webAPIAdapterInterface); setObjectName(m_featureId); diff --git a/plugins/feature/rigctlserver/rigctlserver.h b/plugins/feature/rigctlserver/rigctlserver.h index 40c39d10e..335846d3f 100644 --- a/plugins/feature/rigctlserver/rigctlserver.h +++ b/plugins/feature/rigctlserver/rigctlserver.h @@ -122,7 +122,6 @@ private: QThread m_thread; RigCtlServerWorker *m_worker; RigCtlServerSettings m_settings; - bool m_ptt; QNetworkAccessManager *m_networkManager; QNetworkRequest m_networkRequest; diff --git a/plugins/feature/rigctlserver/rigctlserverwebapiadapter.cpp b/plugins/feature/rigctlserver/rigctlserverwebapiadapter.cpp index 30cb59dee..65672cdae 100644 --- a/plugins/feature/rigctlserver/rigctlserverwebapiadapter.cpp +++ b/plugins/feature/rigctlserver/rigctlserverwebapiadapter.cpp @@ -31,8 +31,8 @@ int RigCtlServerWebAPIAdapter::webapiSettingsGet( QString& errorMessage) { (void) errorMessage; - response.setSimplePttSettings(new SWGSDRangel::SWGSimplePTTSettings()); - response.getSimplePttSettings()->init(); + response.setRigCtlServerSettings(new SWGSDRangel::SWGRigCtlServerSettings()); + response.getRigCtlServerSettings()->init(); RigCtlServer::webapiFormatFeatureSettings(response, m_settings); return 200; diff --git a/plugins/feature/startracker/startracker.cpp b/plugins/feature/startracker/startracker.cpp index c817c99ae..816b81a30 100644 --- a/plugins/feature/startracker/startracker.cpp +++ b/plugins/feature/startracker/startracker.cpp @@ -24,7 +24,6 @@ #include "SWGFeatureSettings.h" #include "SWGFeatureReport.h" #include "SWGFeatureActions.h" -#include "SWGSimplePTTReport.h" #include "SWGDeviceState.h" #include "dsp/dspengine.h" @@ -39,8 +38,7 @@ const char* const StarTracker::m_featureIdURI = "sdrangel.feature.startracker"; const char* const StarTracker::m_featureId = "StarTracker"; StarTracker::StarTracker(WebAPIAdapterInterface *webAPIAdapterInterface) : - Feature(m_featureIdURI, webAPIAdapterInterface), - m_ptt(false) + Feature(m_featureIdURI, webAPIAdapterInterface) { qDebug("StarTracker::StarTracker: webAPIAdapterInterface: %p", webAPIAdapterInterface); setObjectName(m_featureId); diff --git a/plugins/feature/startracker/startracker.h b/plugins/feature/startracker/startracker.h index 4ad767403..38873e734 100644 --- a/plugins/feature/startracker/startracker.h +++ b/plugins/feature/startracker/startracker.h @@ -122,7 +122,6 @@ private: QThread m_thread; StarTrackerWorker *m_worker; StarTrackerSettings m_settings; - bool m_ptt; QNetworkAccessManager *m_networkManager; QNetworkRequest m_networkRequest; diff --git a/plugins/feature/startracker/startrackerwebapiadapter.cpp b/plugins/feature/startracker/startrackerwebapiadapter.cpp index 002c8c775..e5432afb0 100644 --- a/plugins/feature/startracker/startrackerwebapiadapter.cpp +++ b/plugins/feature/startracker/startrackerwebapiadapter.cpp @@ -31,8 +31,8 @@ int StarTrackerWebAPIAdapter::webapiSettingsGet( QString& errorMessage) { (void) errorMessage; - response.setSimplePttSettings(new SWGSDRangel::SWGSimplePTTSettings()); - response.getSimplePttSettings()->init(); + response.setStarTrackerSettings(new SWGSDRangel::SWGStarTrackerSettings()); + response.getStarTrackerSettings()->init(); StarTracker::webapiFormatFeatureSettings(response, m_settings); return 200; diff --git a/plugins/feature/startracker/startrackerworker.h b/plugins/feature/startracker/startrackerworker.h index 591b0cbd9..04e171809 100644 --- a/plugins/feature/startracker/startrackerworker.h +++ b/plugins/feature/startracker/startrackerworker.h @@ -90,8 +90,6 @@ private: void applySettings(const StarTrackerSettings& settings, bool force = false); void restartServer(bool enabled, uint32_t port); MessageQueue *getMessageQueueToGUI() { return m_msgQueueToGUI; } - void setAzimuth(int azimuth); - void setAzimuthElevation(int azimuth, int elevation); void updateRaDec(RADec rd, QDateTime dt); void writeStellariumTarget(double ra, double dec); void removeFromMap(QString id); diff --git a/plugins/feature/vorlocalizer/vorlocalizer.cpp b/plugins/feature/vorlocalizer/vorlocalizer.cpp index a01a0cc82..23ddf6c7f 100644 --- a/plugins/feature/vorlocalizer/vorlocalizer.cpp +++ b/plugins/feature/vorlocalizer/vorlocalizer.cpp @@ -23,7 +23,6 @@ #include "SWGFeatureSettings.h" #include "SWGFeatureReport.h" #include "SWGFeatureActions.h" -#include "SWGSimplePTTReport.h" #include "SWGDeviceState.h" #include "SWGChannelReport.h" @@ -415,8 +414,8 @@ int VORLocalizer::webapiSettingsGet( QString& errorMessage) { (void) errorMessage; - response.setSimplePttSettings(new SWGSDRangel::SWGSimplePTTSettings()); - response.getSimplePttSettings()->init(); + response.setVorLocalizerSettings(new SWGSDRangel::SWGVORLocalizerSettings()); + response.getVorLocalizerSettings()->init(); webapiFormatFeatureSettings(response, m_settings); return 200; } diff --git a/plugins/feature/vorlocalizer/vorlocalizerplugin.cpp b/plugins/feature/vorlocalizer/vorlocalizerplugin.cpp index e283389cd..18b36b3f6 100644 --- a/plugins/feature/vorlocalizer/vorlocalizerplugin.cpp +++ b/plugins/feature/vorlocalizer/vorlocalizerplugin.cpp @@ -51,7 +51,6 @@ void VORLocalizerPlugin::initPlugin(PluginAPI* pluginAPI) { m_pluginAPI = pluginAPI; - // register Simple PTT feature m_pluginAPI->registerFeature(VORLocalizer::m_featureIdURI, VORLocalizer::m_featureId, this); } diff --git a/plugins/feature/vorlocalizer/vorlocalizerplugin.h b/plugins/feature/vorlocalizer/vorlocalizerplugin.h index 0d551d896..663de6bb0 100644 --- a/plugins/feature/vorlocalizer/vorlocalizerplugin.h +++ b/plugins/feature/vorlocalizer/vorlocalizerplugin.h @@ -15,8 +15,8 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#ifndef INCLUDE_FEATURE_SIMPLEPTTPLUGIN_H -#define INCLUDE_FEATURE_SIMPLEPTTPLUGIN_H +#ifndef INCLUDE_FEATURE_VORLOCALIZERPLUGIN_H +#define INCLUDE_FEATURE_VORLOCALIZERPLUGIN_H #include #include "plugin/plugininterface.h" @@ -45,4 +45,4 @@ private: PluginAPI* m_pluginAPI; }; -#endif // INCLUDE_FEATURE_SIMPLEPTTPLUGIN_H +#endif // INCLUDE_FEATURE_VORLOCALIZERPLUGIN_H From d507f496267b335c06b9f39af3ed00be788cb73e Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Fri, 15 Jan 2021 11:24:21 +0000 Subject: [PATCH 3/3] Instantiate QNetworkAccessManager to avoid crash on reverse API usage --- plugins/feature/afc/afc.cpp | 4 ++++ plugins/feature/aprs/aprs.cpp | 4 ++++ plugins/feature/demodanalyzer/demodanalyzer.cpp | 4 ++++ plugins/feature/gs232controller/gs232controller.cpp | 4 ++++ plugins/feature/map/map.cpp | 4 ++++ plugins/feature/rigctlserver/rigctlserver.cpp | 4 ++++ plugins/feature/simpleptt/simpleptt.cpp | 4 ++++ plugins/feature/startracker/startracker.cpp | 4 ++++ plugins/feature/vorlocalizer/vorlocalizer.cpp | 4 ++++ 9 files changed, 36 insertions(+) diff --git a/plugins/feature/afc/afc.cpp b/plugins/feature/afc/afc.cpp index 1e0c1732a..b2893d2b3 100644 --- a/plugins/feature/afc/afc.cpp +++ b/plugins/feature/afc/afc.cpp @@ -54,10 +54,14 @@ AFC::AFC(WebAPIAdapterInterface *webAPIAdapterInterface) : m_worker = new AFCWorker(webAPIAdapterInterface); m_state = StIdle; m_errorMessage = "AFC error"; + m_networkManager = new QNetworkAccessManager(); + connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); } AFC::~AFC() { + disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); + delete m_networkManager; if (m_worker->isRunning()) { stop(); } diff --git a/plugins/feature/aprs/aprs.cpp b/plugins/feature/aprs/aprs.cpp index 51e072f93..a03a32b83 100644 --- a/plugins/feature/aprs/aprs.cpp +++ b/plugins/feature/aprs/aprs.cpp @@ -50,10 +50,14 @@ APRS::APRS(WebAPIAdapterInterface *webAPIAdapterInterface) : m_errorMessage = "APRS error"; connect(&m_updatePipesTimer, SIGNAL(timeout()), this, SLOT(updatePipes())); m_updatePipesTimer.start(1000); + m_networkManager = new QNetworkAccessManager(); + connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); } APRS::~APRS() { + disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); + delete m_networkManager; if (m_worker->isRunning()) { stop(); } diff --git a/plugins/feature/demodanalyzer/demodanalyzer.cpp b/plugins/feature/demodanalyzer/demodanalyzer.cpp index 4ece5f8d5..35d45d47b 100644 --- a/plugins/feature/demodanalyzer/demodanalyzer.cpp +++ b/plugins/feature/demodanalyzer/demodanalyzer.cpp @@ -56,10 +56,14 @@ DemodAnalyzer::DemodAnalyzer(WebAPIAdapterInterface *webAPIAdapterInterface) : m_worker = new DemodAnalyzerWorker(); m_state = StIdle; m_errorMessage = "DemodAnalyzer error"; + m_networkManager = new QNetworkAccessManager(); + connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); } DemodAnalyzer::~DemodAnalyzer() { + disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); + delete m_networkManager; if (m_worker->isRunning()) { stop(); } diff --git a/plugins/feature/gs232controller/gs232controller.cpp b/plugins/feature/gs232controller/gs232controller.cpp index 57e182e81..0ea28d684 100644 --- a/plugins/feature/gs232controller/gs232controller.cpp +++ b/plugins/feature/gs232controller/gs232controller.cpp @@ -56,10 +56,14 @@ GS232Controller::GS232Controller(WebAPIAdapterInterface *webAPIAdapterInterface) m_selectedPipe = nullptr; connect(&m_updatePipesTimer, SIGNAL(timeout()), this, SLOT(updatePipes())); m_updatePipesTimer.start(1000); + m_networkManager = new QNetworkAccessManager(); + connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); } GS232Controller::~GS232Controller() { + disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); + delete m_networkManager; if (m_worker->isRunning()) { stop(); } diff --git a/plugins/feature/map/map.cpp b/plugins/feature/map/map.cpp index 91558ccad..0562e00d4 100644 --- a/plugins/feature/map/map.cpp +++ b/plugins/feature/map/map.cpp @@ -49,10 +49,14 @@ Map::Map(WebAPIAdapterInterface *webAPIAdapterInterface) : m_errorMessage = "Map error"; connect(&m_updatePipesTimer, SIGNAL(timeout()), this, SLOT(updatePipes())); m_updatePipesTimer.start(1000); + m_networkManager = new QNetworkAccessManager(); + connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); } Map::~Map() { + disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); + delete m_networkManager; } bool Map::handleMessage(const Message& cmd) diff --git a/plugins/feature/rigctlserver/rigctlserver.cpp b/plugins/feature/rigctlserver/rigctlserver.cpp index b9cae35e5..7e7a51744 100644 --- a/plugins/feature/rigctlserver/rigctlserver.cpp +++ b/plugins/feature/rigctlserver/rigctlserver.cpp @@ -45,10 +45,14 @@ RigCtlServer::RigCtlServer(WebAPIAdapterInterface *webAPIAdapterInterface) : m_worker = new RigCtlServerWorker(webAPIAdapterInterface); m_state = StIdle; m_errorMessage = "RigCtlServer error"; + m_networkManager = new QNetworkAccessManager(); + connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); } RigCtlServer::~RigCtlServer() { + disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); + delete m_networkManager; if (m_worker->isRunning()) { stop(); } diff --git a/plugins/feature/simpleptt/simpleptt.cpp b/plugins/feature/simpleptt/simpleptt.cpp index 31a9ea0d7..d7db24a2e 100644 --- a/plugins/feature/simpleptt/simpleptt.cpp +++ b/plugins/feature/simpleptt/simpleptt.cpp @@ -46,10 +46,14 @@ SimplePTT::SimplePTT(WebAPIAdapterInterface *webAPIAdapterInterface) : m_worker = new SimplePTTWorker(webAPIAdapterInterface); m_state = StIdle; m_errorMessage = "SimplePTT error"; + m_networkManager = new QNetworkAccessManager(); + connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); } SimplePTT::~SimplePTT() { + disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); + delete m_networkManager; if (m_worker->isRunning()) { stop(); } diff --git a/plugins/feature/startracker/startracker.cpp b/plugins/feature/startracker/startracker.cpp index 816b81a30..7714f74ec 100644 --- a/plugins/feature/startracker/startracker.cpp +++ b/plugins/feature/startracker/startracker.cpp @@ -45,10 +45,14 @@ StarTracker::StarTracker(WebAPIAdapterInterface *webAPIAdapterInterface) : m_worker = new StarTrackerWorker(this, webAPIAdapterInterface); m_state = StIdle; m_errorMessage = "StarTracker error"; + m_networkManager = new QNetworkAccessManager(); + connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); } StarTracker::~StarTracker() { + disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); + delete m_networkManager; if (m_worker->isRunning()) { stop(); } diff --git a/plugins/feature/vorlocalizer/vorlocalizer.cpp b/plugins/feature/vorlocalizer/vorlocalizer.cpp index 23ddf6c7f..6aec80ae6 100644 --- a/plugins/feature/vorlocalizer/vorlocalizer.cpp +++ b/plugins/feature/vorlocalizer/vorlocalizer.cpp @@ -53,10 +53,14 @@ VORLocalizer::VORLocalizer(WebAPIAdapterInterface *webAPIAdapterInterface) : m_worker = new VorLocalizerWorker(webAPIAdapterInterface); m_state = StIdle; m_errorMessage = "VORLocalizer error"; + m_networkManager = new QNetworkAccessManager(); + connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); } VORLocalizer::~VORLocalizer() { + disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); + delete m_networkManager; if (m_worker->isRunning()) { stop(); }