1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-23 01:55:48 -05:00

Fixed some signal/slot connects. Removed unnecessary m_channelMessageQueue in ChannelAPI. Fixes #1185

This commit is contained in:
f4exb 2022-03-23 22:32:23 +01:00
parent 96e990cf2b
commit 4111c967e9
127 changed files with 1240 additions and 469 deletions

View File

@ -56,12 +56,22 @@ BeamSteeringCWMod::BeamSteeringCWMod(DeviceAPI *deviceAPI) :
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&BeamSteeringCWMod::networkManagerFinished
);
}
BeamSteeringCWMod::~BeamSteeringCWMod()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&BeamSteeringCWMod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);

View File

@ -58,12 +58,22 @@ Interferometer::Interferometer(DeviceAPI *deviceAPI) :
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&Interferometer::networkManagerFinished
);
}
Interferometer::~Interferometer()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&Interferometer::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);

View File

@ -56,7 +56,12 @@ ChannelAnalyzer::ChannelAnalyzer(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&ChannelAnalyzer::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -68,7 +73,12 @@ ChannelAnalyzer::ChannelAnalyzer(DeviceAPI *deviceAPI) :
ChannelAnalyzer::~ChannelAnalyzer()
{
qDebug("ChannelAnalyzer::~ChannelAnalyzer");
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&ChannelAnalyzer::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);

View File

@ -76,7 +76,12 @@ ADSBDemod::ADSBDemod(DeviceAPI *devieAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&ADSBDemod::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -90,7 +95,12 @@ ADSBDemod::~ADSBDemod()
if (m_worker->isRunning()) {
stop();
}
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&ADSBDemod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);

View File

@ -2828,7 +2828,7 @@ void ADSBDemodGUI::updateDeviceSetList()
{
if (m_settings.m_deviceIndex < 0) {
ui->device->setCurrentIndex(0);
} else if (m_settings.m_deviceIndex >= deviceUISets.size()) {
} else if (m_settings.m_deviceIndex >= (int) deviceUISets.size()) {
ui->device->setCurrentIndex(deviceUISets.size() - 1);
} else {
ui->device->setCurrentIndex(m_settings.m_deviceIndex);
@ -3827,7 +3827,12 @@ ADSBDemodGUI::ADSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb
connect(&m_importTimer, &QTimer::timeout, this, &ADSBDemodGUI::import);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(handleImportReply(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&ADSBDemodGUI::handleImportReply
);
applyImportSettings();
connect(&m_redrawMapTimer, &QTimer::timeout, this, &ADSBDemodGUI::redrawMap);

View File

@ -63,8 +63,12 @@ AISDemod::AISDemod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
connect(&m_channelMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessages()));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AISDemod::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -76,7 +80,12 @@ AISDemod::AISDemod(DeviceAPI *deviceAPI) :
AISDemod::~AISDemod()
{
qDebug("AISDemod::~AISDemod");
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AISDemod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
@ -691,18 +700,6 @@ void AISDemod::networkManagerFinished(QNetworkReply *reply)
reply->deleteLater();
}
void AISDemod::handleChannelMessages()
{
Message* message;
while ((message = m_channelMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message)) {
delete message;
}
}
}
void AISDemod::handleIndexInDeviceSetChanged(int index)
{
if (index < 0) {

View File

@ -182,7 +182,6 @@ private:
private slots:
void networkManagerFinished(QNetworkReply *reply);
void handleChannelMessages();
void handleIndexInDeviceSetChanged(int index);
};

View File

@ -65,8 +65,12 @@ AMDemod::AMDemod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
connect(&m_channelMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessages()));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AMDemod::networkManagerFinished
);
// Experimental:
// QObject::connect(
// m_deviceAPI->getSampleSource()->getSampleFifo(),
@ -92,7 +96,12 @@ AMDemod::~AMDemod()
// this,
// &AMDemod::handleWrittenToFifo
// );
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AMDemod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
@ -656,18 +665,6 @@ void AMDemod::networkManagerFinished(QNetworkReply *reply)
reply->deleteLater();
}
void AMDemod::handleChannelMessages()
{
Message* message;
while ((message = m_channelMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message)) {
delete message;
}
}
}
void AMDemod::handleWrittenToFifo(int nsamples, qint64 timestamp)
{
QDateTime dt;

View File

@ -162,7 +162,6 @@ private:
private slots:
void networkManagerFinished(QNetworkReply *reply);
void handleChannelMessages();
void handleWrittenToFifo(int nsamples, qint64 timestamp);
void handleIndexInDeviceSetChanged(int index);
};

View File

@ -73,7 +73,12 @@ APTDemod::APTDemod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&APTDemod::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -87,7 +92,12 @@ APTDemod::APTDemod(DeviceAPI *deviceAPI) :
APTDemod::~APTDemod()
{
qDebug("APTDemod::~APTDemod");
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&APTDemod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);

View File

@ -66,7 +66,12 @@ BFMDemod::BFMDemod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&BFMDemod::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -77,7 +82,12 @@ BFMDemod::BFMDemod(DeviceAPI *deviceAPI) :
BFMDemod::~BFMDemod()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&BFMDemod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);

View File

@ -74,8 +74,12 @@ DABDemod::DABDemod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
connect(&m_channelMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessages()));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&DABDemod::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -87,7 +91,12 @@ DABDemod::DABDemod(DeviceAPI *deviceAPI) :
DABDemod::~DABDemod()
{
qDebug("DABDemod::~DABDemod");
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&DABDemod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
@ -646,18 +655,6 @@ void DABDemod::networkManagerFinished(QNetworkReply *reply)
reply->deleteLater();
}
void DABDemod::handleChannelMessages()
{
Message* message;
while ((message = m_channelMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message)) {
delete message;
}
}
}
void DABDemod::handleIndexInDeviceSetChanged(int index)
{
if (index < 0) {

View File

@ -399,7 +399,6 @@ private:
private slots:
void networkManagerFinished(QNetworkReply *reply);
void handleChannelMessages();
void handleIndexInDeviceSetChanged(int index);
};

View File

@ -54,7 +54,12 @@ DATVDemod::DATVDemod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&DATVDemod::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -66,7 +71,12 @@ DATVDemod::DATVDemod(DeviceAPI *deviceAPI) :
DATVDemod::~DATVDemod()
{
qDebug("DATVDemod::~DATVDemod");
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&DATVDemod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);

View File

@ -69,8 +69,12 @@ DSDDemod::DSDDemod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
connect(&m_channelMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessages()));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&DSDDemod::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -81,7 +85,12 @@ DSDDemod::DSDDemod(DeviceAPI *deviceAPI) :
DSDDemod::~DSDDemod()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&DSDDemod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
@ -746,18 +755,6 @@ void DSDDemod::networkManagerFinished(QNetworkReply *reply)
reply->deleteLater();
}
void DSDDemod::handleChannelMessages()
{
Message* message;
while ((message = m_channelMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message)) {
delete message;
}
}
}
void DSDDemod::handleIndexInDeviceSetChanged(int index)
{
if (index < 0) {

View File

@ -159,7 +159,6 @@ private:
private slots:
void networkManagerFinished(QNetworkReply *reply);
void handleChannelMessages();
void handleIndexInDeviceSetChanged(int index);
};

View File

@ -60,7 +60,12 @@ FreeDVDemod::FreeDVDemod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&FreeDVDemod::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -71,7 +76,12 @@ FreeDVDemod::FreeDVDemod(DeviceAPI *deviceAPI) :
FreeDVDemod::~FreeDVDemod()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&FreeDVDemod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);

View File

@ -73,8 +73,12 @@ NFMDemod::NFMDemod(DeviceAPI *devieAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
connect(&m_channelMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessages()));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&NFMDemod::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -85,7 +89,12 @@ NFMDemod::NFMDemod(DeviceAPI *devieAPI) :
NFMDemod::~NFMDemod()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&NFMDemod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
@ -688,18 +697,6 @@ void NFMDemod::networkManagerFinished(QNetworkReply *reply)
reply->deleteLater();
}
void NFMDemod::handleChannelMessages()
{
Message* message;
while ((message = m_channelMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message)) {
delete message;
}
}
}
void NFMDemod::handleIndexInDeviceSetChanged(int index)
{
if (index < 0) {

View File

@ -159,7 +159,6 @@ private:
private slots:
void networkManagerFinished(QNetworkReply *reply);
void handleChannelMessages();
void handleIndexInDeviceSetChanged(int index);
};

View File

@ -65,8 +65,12 @@ PacketDemod::PacketDemod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
connect(&m_channelMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessages()));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&PacketDemod::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -78,7 +82,12 @@ PacketDemod::PacketDemod(DeviceAPI *deviceAPI) :
PacketDemod::~PacketDemod()
{
qDebug("PacketDemod::~PacketDemod");
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&PacketDemod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
@ -676,18 +685,6 @@ void PacketDemod::networkManagerFinished(QNetworkReply *reply)
reply->deleteLater();
}
void PacketDemod::handleChannelMessages()
{
Message* message;
while ((message = m_channelMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message)) {
delete message;
}
}
}
void PacketDemod::handleIndexInDeviceSetChanged(int index)
{
if (index < 0) {

View File

@ -160,7 +160,6 @@ private:
private slots:
void networkManagerFinished(QNetworkReply *reply);
void handleChannelMessages();
void handleIndexInDeviceSetChanged(int index);
};

View File

@ -58,8 +58,12 @@ PagerDemod::PagerDemod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
connect(&m_channelMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessages()));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&PagerDemod::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -71,7 +75,12 @@ PagerDemod::PagerDemod(DeviceAPI *deviceAPI) :
PagerDemod::~PagerDemod()
{
qDebug("PagerDemod::~PagerDemod");
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&PagerDemod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
@ -690,18 +699,6 @@ void PagerDemod::networkManagerFinished(QNetworkReply *reply)
reply->deleteLater();
}
void PagerDemod::handleChannelMessages()
{
Message* message;
while ((message = m_channelMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message)) {
delete message;
}
}
}
void PagerDemod::handleIndexInDeviceSetChanged(int index)
{
if (index < 0) {

View File

@ -216,7 +216,6 @@ private:
private slots:
void networkManagerFinished(QNetworkReply *reply);
void handleChannelMessages();
void handleIndexInDeviceSetChanged(int index);
};

View File

@ -62,8 +62,12 @@ RadiosondeDemod::RadiosondeDemod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
connect(&m_channelMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessages()));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&RadiosondeDemod::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -75,7 +79,12 @@ RadiosondeDemod::RadiosondeDemod(DeviceAPI *deviceAPI) :
RadiosondeDemod::~RadiosondeDemod()
{
qDebug("RadiosondeDemod::~RadiosondeDemod");
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&RadiosondeDemod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
@ -708,18 +717,6 @@ void RadiosondeDemod::networkManagerFinished(QNetworkReply *reply)
reply->deleteLater();
}
void RadiosondeDemod::handleChannelMessages()
{
Message* message;
while ((message = m_channelMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message)) {
delete message;
}
}
}
void RadiosondeDemod::handleIndexInDeviceSetChanged(int index)
{
if (index < 0) {

View File

@ -189,7 +189,6 @@ private:
private slots:
void networkManagerFinished(QNetworkReply *reply);
void handleChannelMessages();
void handleIndexInDeviceSetChanged(int index);
};

View File

@ -67,8 +67,12 @@ SSBDemod::SSBDemod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
connect(&m_channelMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessages()));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&SSBDemod::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -79,7 +83,12 @@ SSBDemod::SSBDemod(DeviceAPI *deviceAPI) :
SSBDemod::~SSBDemod()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&SSBDemod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
@ -728,18 +737,6 @@ void SSBDemod::networkManagerFinished(QNetworkReply *reply)
reply->deleteLater();
}
void SSBDemod::handleChannelMessages()
{
Message* message;
while ((message = m_channelMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message)) {
delete message;
}
}
}
void SSBDemod::handleIndexInDeviceSetChanged(int index)
{
if (index < 0) {

View File

@ -163,7 +163,6 @@ private:
private slots:
void networkManagerFinished(QNetworkReply *reply);
void handleChannelMessages();
void handleIndexInDeviceSetChanged(int index);
};

View File

@ -62,7 +62,12 @@ VORDemod::VORDemod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&VORDemod::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -74,7 +79,12 @@ VORDemod::VORDemod(DeviceAPI *deviceAPI) :
VORDemod::~VORDemod()
{
qDebug("VORDemod::~VORDemod");
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&VORDemod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);

View File

@ -64,7 +64,12 @@ VORDemodSC::VORDemodSC(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&VORDemodSC::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -76,7 +81,12 @@ VORDemodSC::VORDemodSC(DeviceAPI *deviceAPI) :
VORDemodSC::~VORDemodSC()
{
qDebug("VORDemodSC::~VORDemodSC");
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&VORDemodSC::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);

View File

@ -69,8 +69,12 @@ WFMDemod::WFMDemod(DeviceAPI* deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
connect(&m_channelMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessages()));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&WFMDemod::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -81,7 +85,12 @@ WFMDemod::WFMDemod(DeviceAPI* deviceAPI) :
WFMDemod::~WFMDemod()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&WFMDemod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
@ -608,18 +617,6 @@ void WFMDemod::networkManagerFinished(QNetworkReply *reply)
reply->deleteLater();
}
void WFMDemod::handleChannelMessages()
{
Message* message;
while ((message = m_channelMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message)) {
delete message;
}
}
}
void WFMDemod::handleIndexInDeviceSetChanged(int index)
{
if (index < 0) {

View File

@ -155,7 +155,6 @@ private:
private slots:
void networkManagerFinished(QNetworkReply *reply);
void handleChannelMessages();
void handleIndexInDeviceSetChanged(int index);
};

View File

@ -68,7 +68,12 @@ FileSink::FileSink(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&FileSink::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -79,7 +84,12 @@ FileSink::FileSink(DeviceAPI *deviceAPI) :
FileSink::~FileSink()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&FileSink::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);

View File

@ -71,7 +71,12 @@ FreqTracker::FreqTracker(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&FreqTracker::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -82,7 +87,12 @@ FreqTracker::FreqTracker(DeviceAPI *deviceAPI) :
FreqTracker::~FreqTracker()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&FreqTracker::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);

View File

@ -65,7 +65,12 @@ LocalSink::LocalSink(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&LocalSink::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -76,7 +81,12 @@ LocalSink::LocalSink(DeviceAPI *deviceAPI) :
LocalSink::~LocalSink()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&LocalSink::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);

View File

@ -76,7 +76,12 @@ NoiseFigure::NoiseFigure(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&NoiseFigure::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -88,7 +93,12 @@ NoiseFigure::NoiseFigure(DeviceAPI *deviceAPI) :
NoiseFigure::~NoiseFigure()
{
qDebug("NoiseFigure::~NoiseFigure");
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&NoiseFigure::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);

View File

@ -89,8 +89,12 @@ RadioAstronomy::RadioAstronomy(DeviceAPI *deviceAPI) :
m_updatePipesTimer.start(1000);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
connect(&m_channelMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessages()));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&RadioAstronomy::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -104,7 +108,12 @@ RadioAstronomy::RadioAstronomy(DeviceAPI *deviceAPI) :
RadioAstronomy::~RadioAstronomy()
{
qDebug("RadioAstronomy::~RadioAstronomy");
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&RadioAstronomy::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);
@ -1179,18 +1188,6 @@ void RadioAstronomy::networkManagerFinished(QNetworkReply *reply)
reply->deleteLater();
}
void RadioAstronomy::handleChannelMessages()
{
Message* message;
while ((message = m_channelMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message)) {
delete message;
}
}
}
void RadioAstronomy::handleIndexInDeviceSetChanged(int index)
{
if (index < 0) {

View File

@ -425,7 +425,6 @@ private:
private slots:
void networkManagerFinished(QNetworkReply *reply);
void updatePipes();
void handleChannelMessages();
void startMeasurement();
void sweepStartMeasurement();
void sweep1();

View File

@ -2059,7 +2059,12 @@ RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUI
connect(&MainCore::instance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick())); // 50 ms
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&RadioAstronomyGUI::networkManagerFinished
);
connect(&m_dlm, &HttpDownloadManager::downloadComplete, this, &RadioAstronomyGUI::downloadFinished);
ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03)));

View File

@ -65,7 +65,12 @@ RadioClock::RadioClock(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&RadioClock::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -77,7 +82,12 @@ RadioClock::RadioClock(DeviceAPI *deviceAPI) :
RadioClock::~RadioClock()
{
qDebug("RadioClock::~RadioClock");
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&RadioClock::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);

View File

@ -66,7 +66,12 @@ RemoteSink::RemoteSink(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&RemoteSink::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -77,7 +82,12 @@ RemoteSink::RemoteSink(DeviceAPI *deviceAPI) :
RemoteSink::~RemoteSink()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&RemoteSink::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);

View File

@ -68,7 +68,12 @@ SigMFFileSink::SigMFFileSink(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&SigMFFileSink::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -79,7 +84,12 @@ SigMFFileSink::SigMFFileSink(DeviceAPI *deviceAPI) :
SigMFFileSink::~SigMFFileSink()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&SigMFFileSink::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);

View File

@ -63,7 +63,12 @@ UDPSink::UDPSink(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSinkAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&UDPSink::networkManagerFinished
);
QObject::connect(
this,
&ChannelAPI::indexInDeviceSetChanged,
@ -74,7 +79,12 @@ UDPSink::UDPSink(DeviceAPI *deviceAPI) :
UDPSink::~UDPSink()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&UDPSink::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSinkAPI(this);
m_deviceAPI->removeChannelSink(this);

View File

@ -70,12 +70,22 @@ FileSource::FileSource(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSourceAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&FileSource::networkManagerFinished
);
}
FileSource::~FileSource()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&FileSource::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSourceAPI(this);
m_deviceAPI->removeChannelSource(this);

View File

@ -62,12 +62,22 @@ LocalSource::LocalSource(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSourceAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&LocalSource::networkManagerFinished
);
}
LocalSource::~LocalSource()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&LocalSource::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSourceAPI(this);
m_deviceAPI->removeChannelSource(this);

View File

@ -73,13 +73,23 @@ IEEE_802_15_4_Mod::IEEE_802_15_4_Mod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSourceAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&IEEE_802_15_4_Mod::networkManagerFinished
);
}
IEEE_802_15_4_Mod::~IEEE_802_15_4_Mod()
{
// closeUDP();
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&IEEE_802_15_4_Mod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSourceAPI(this);
m_deviceAPI->removeChannelSource(this);

View File

@ -75,14 +75,23 @@ AISMod::AISMod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSourceAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
connect(&m_channelMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessages()));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AISMod::networkManagerFinished
);
}
AISMod::~AISMod()
{
closeUDP();
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AISMod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSourceAPI(this);
m_deviceAPI->removeChannelSource(this);
@ -1063,15 +1072,3 @@ void AISMod::udpRx()
m_basebandSource->getInputMessageQueue()->push(msg);
}
}
void AISMod::handleChannelMessages()
{
Message* message;
while ((message = m_channelMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message)) {
delete message;
}
}
}

View File

@ -253,7 +253,6 @@ private:
private slots:
void networkManagerFinished(QNetworkReply *reply);
void udpRx();
void handleChannelMessages();
};

View File

@ -74,13 +74,22 @@ AMMod::AMMod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSourceAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
connect(&m_channelMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessages()));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AMMod::networkManagerFinished
);
}
AMMod::~AMMod()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AMMod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSourceAPI(this);
m_deviceAPI->removeChannelSource(this);
@ -786,15 +795,3 @@ int AMMod::getFeedbackAudioSampleRate() const
{
return m_basebandSource->getFeedbackAudioSampleRate();
}
void AMMod::handleChannelMessages()
{
Message* message;
while ((message = m_channelMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message)) {
delete message;
}
}
}

View File

@ -278,7 +278,6 @@ private:
private slots:
void networkManagerFinished(QNetworkReply *reply);
void handleChannelMessages();
};

View File

@ -71,12 +71,22 @@ ATVMod::ATVMod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSourceAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&ATVMod::networkManagerFinished
);
}
ATVMod::~ATVMod()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&ATVMod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSourceAPI(this);
m_deviceAPI->removeChannelSource(this);

View File

@ -70,12 +70,22 @@ ChirpChatMod::ChirpChatMod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSourceAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&ChirpChatMod::networkManagerFinished
);
}
ChirpChatMod::~ChirpChatMod()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&ChirpChatMod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSourceAPI(this);
m_deviceAPI->removeChannelSource(this);

View File

@ -74,12 +74,22 @@ DATVMod::DATVMod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSourceAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&DATVMod::networkManagerFinished
);
}
DATVMod::~DATVMod()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&DATVMod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSourceAPI(this);
m_deviceAPI->removeChannelSource(this);

View File

@ -74,12 +74,22 @@ FreeDVMod::FreeDVMod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSourceAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&FreeDVMod::networkManagerFinished
);
}
FreeDVMod::~FreeDVMod()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&FreeDVMod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSourceAPI(this);
m_deviceAPI->removeChannelSource(this);

View File

@ -75,13 +75,22 @@ NFMMod::NFMMod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSourceAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
connect(&m_channelMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessages()));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&NFMMod::networkManagerFinished
);
}
NFMMod::~NFMMod()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&NFMMod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSourceAPI(this);
m_deviceAPI->removeChannelSource(this);
@ -877,15 +886,3 @@ int NFMMod::getFeedbackAudioSampleRate() const
{
return m_basebandSource->getFeedbackAudioSampleRate();
}
void NFMMod::handleChannelMessages()
{
Message* message;
while ((message = m_channelMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message)) {
delete message;
}
}
}

View File

@ -278,7 +278,6 @@ private:
private slots:
void networkManagerFinished(QNetworkReply *reply);
void handleChannelMessages();
};

View File

@ -79,14 +79,23 @@ PacketMod::PacketMod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSourceAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
connect(&m_channelMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessages()));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&PacketMod::networkManagerFinished
);
}
PacketMod::~PacketMod()
{
closeUDP();
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&PacketMod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSourceAPI(this);
m_deviceAPI->removeChannelSource(this);
@ -1143,15 +1152,3 @@ void PacketMod::udpRx()
m_basebandSource->getInputMessageQueue()->push(msg);
}
}
void PacketMod::handleChannelMessages()
{
Message* message;
while ((message = m_channelMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message)) {
delete message;
}
}
}

View File

@ -248,7 +248,6 @@ private:
private slots:
void networkManagerFinished(QNetworkReply *reply);
void udpRx();
void handleChannelMessages();
};

View File

@ -76,13 +76,22 @@ SSBMod::SSBMod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSourceAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
connect(&m_channelMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessages()));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&SSBMod::networkManagerFinished
);
}
SSBMod::~SSBMod()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&SSBMod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSourceAPI(this);
m_deviceAPI->removeChannelSource(this);
@ -895,15 +904,3 @@ uint32_t SSBMod::getNumberOfDeviceStreams() const
{
return m_deviceAPI->getNbSinkStreams();
}
void SSBMod::handleChannelMessages()
{
Message* message;
while ((message = m_channelMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message)) {
delete message;
}
}
}

View File

@ -282,7 +282,6 @@ private:
private slots:
void networkManagerFinished(QNetworkReply *reply);
void handleChannelMessages();
};

View File

@ -73,13 +73,22 @@ WFMMod::WFMMod(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSourceAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
connect(&m_channelMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleChannelMessages()));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&WFMMod::networkManagerFinished
);
}
WFMMod::~WFMMod()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&WFMMod::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSourceAPI(this);
m_deviceAPI->removeChannelSource(this);
@ -781,15 +790,3 @@ int WFMMod::getFeedbackAudioSampleRate() const
{
return m_basebandSource->getFeedbackAudioSampleRate();
}
void WFMMod::handleChannelMessages()
{
Message* message;
while ((message = m_channelMessageQueue.pop()) != nullptr)
{
if (handleMessage(*message)) {
delete message;
}
}
}

View File

@ -290,7 +290,6 @@ private:
private slots:
void networkManagerFinished(QNetworkReply *reply);
void handleChannelMessages();
};

View File

@ -66,12 +66,22 @@ RemoteSource::RemoteSource(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSourceAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&RemoteSource::networkManagerFinished
);
}
RemoteSource::~RemoteSource()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&RemoteSource::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSourceAPI(this);
m_deviceAPI->removeChannelSource(this);

View File

@ -59,12 +59,22 @@ UDPSource::UDPSource(DeviceAPI *deviceAPI) :
m_deviceAPI->addChannelSourceAPI(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&UDPSource::networkManagerFinished
);
}
UDPSource::~UDPSource()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&UDPSource::networkManagerFinished
);
delete m_networkManager;
m_deviceAPI->removeChannelSourceAPI(this);
m_deviceAPI->removeChannelSource(this);

View File

@ -59,12 +59,22 @@ AFC::AFC(WebAPIAdapterInterface *webAPIAdapterInterface) :
m_state = StIdle;
m_errorMessage = "AFC error";
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AFC::networkManagerFinished
);
}
AFC::~AFC()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AFC::networkManagerFinished
);
delete m_networkManager;
if (m_worker->isRunning()) {
stop();

View File

@ -51,12 +51,22 @@ AIS::AIS(WebAPIAdapterInterface *webAPIAdapterInterface) :
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*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AIS::networkManagerFinished
);
}
AIS::~AIS()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AIS::networkManagerFinished
);
delete m_networkManager;
}

View File

@ -46,12 +46,22 @@ AntennaTools::AntennaTools(WebAPIAdapterInterface *webAPIAdapterInterface) :
m_state = StIdle;
m_errorMessage = "AntennaTools error";
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AntennaTools::networkManagerFinished
);
}
AntennaTools::~AntennaTools()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AntennaTools::networkManagerFinished
);
delete m_networkManager;
}

View File

@ -53,12 +53,22 @@ APRS::APRS(WebAPIAdapterInterface *webAPIAdapterInterface) :
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*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&APRS::networkManagerFinished
);
}
APRS::~APRS()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&APRS::networkManagerFinished
);
delete m_networkManager;
if (m_worker->isRunning()) {
stop();

View File

@ -60,12 +60,22 @@ DemodAnalyzer::DemodAnalyzer(WebAPIAdapterInterface *webAPIAdapterInterface) :
m_state = StIdle;
m_errorMessage = "DemodAnalyzer error";
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&DemodAnalyzer::networkManagerFinished
);
}
DemodAnalyzer::~DemodAnalyzer()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&DemodAnalyzer::networkManagerFinished
);
delete m_networkManager;
if (m_worker->isRunning()) {
stop();

View File

@ -60,12 +60,22 @@ GS232Controller::GS232Controller(WebAPIAdapterInterface *webAPIAdapterInterface)
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*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&GS232Controller::networkManagerFinished
);
}
GS232Controller::~GS232Controller()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&GS232Controller::networkManagerFinished
);
delete m_networkManager;
if (m_worker->isRunning()) {
stop();

View File

@ -62,13 +62,23 @@ JogdialController::JogdialController(WebAPIAdapterInterface *webAPIAdapterInterf
m_state = StIdle;
m_errorMessage = "JogdialController error";
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&JogdialController::networkManagerFinished
);
connect(&m_repeatTimer, SIGNAL(timeout()), this, SLOT(handleRepeat()));
}
JogdialController::~JogdialController()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&JogdialController::networkManagerFinished
);
delete m_networkManager;
}

View File

@ -54,12 +54,22 @@ Map::Map(WebAPIAdapterInterface *webAPIAdapterInterface) :
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*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&Map::networkManagerFinished
);
}
Map::~Map()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&Map::networkManagerFinished
);
delete m_networkManager;
}

View File

@ -57,12 +57,22 @@ PERTester::PERTester(WebAPIAdapterInterface *webAPIAdapterInterface) :
m_state = StIdle;
m_errorMessage = "PERTester error";
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&PERTester::networkManagerFinished
);
}
PERTester::~PERTester()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&PERTester::networkManagerFinished
);
delete m_networkManager;
if (m_worker->isRunning()) {
stop();

View File

@ -51,12 +51,22 @@ Radiosonde::Radiosonde(WebAPIAdapterInterface *webAPIAdapterInterface) :
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*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&Radiosonde::networkManagerFinished
);
}
Radiosonde::~Radiosonde()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&Radiosonde::networkManagerFinished
);
delete m_networkManager;
}
@ -194,7 +204,7 @@ int Radiosonde::webapiSettingsPutPatch(
}
webapiFormatFeatureSettings(response, settings);
return 200;
}

View File

@ -48,12 +48,22 @@ RigCtlServer::RigCtlServer(WebAPIAdapterInterface *webAPIAdapterInterface) :
m_state = StIdle;
m_errorMessage = "RigCtlServer error";
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&RigCtlServer::networkManagerFinished
);
}
RigCtlServer::~RigCtlServer()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&RigCtlServer::networkManagerFinished
);
delete m_networkManager;
if (m_worker->isRunning()) {
stop();

View File

@ -37,7 +37,12 @@ SatelliteSelectionDialog::SatelliteSelectionDialog(SatelliteTrackerSettings *set
{
ui->setupUi(this);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&SatelliteSelectionDialog::networkManagerFinished
);
QHashIterator<QString, SatNogsSatellite *> itr(satellites);
while (itr.hasNext())

View File

@ -59,7 +59,12 @@ SatelliteTracker::SatelliteTracker(WebAPIAdapterInterface *webAPIAdapterInterfac
m_state = StIdle;
m_errorMessage = "SatelliteTracker error";
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&SatelliteTracker::networkManagerFinished
);
connect(&m_dlm, &HttpDownloadManager::downloadComplete, this, &SatelliteTracker::downloadFinished);
if (!readSatData())

View File

@ -49,12 +49,22 @@ SimplePTT::SimplePTT(WebAPIAdapterInterface *webAPIAdapterInterface) :
m_state = StIdle;
m_errorMessage = "SimplePTT error";
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&SimplePTT::networkManagerFinished
);
}
SimplePTT::~SimplePTT()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&SimplePTT::networkManagerFinished
);
delete m_networkManager;
if (m_worker->isRunning()) {
stop();

View File

@ -56,7 +56,12 @@ StarTracker::StarTracker(WebAPIAdapterInterface *webAPIAdapterInterface) :
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*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&StarTracker::networkManagerFinished
);
m_weather = nullptr;
m_solarFlux = 0.0f;
// Unfortunately, can't seem to access resources in static global constructor
@ -68,7 +73,12 @@ StarTracker::StarTracker(WebAPIAdapterInterface *webAPIAdapterInterface) :
StarTracker::~StarTracker()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&StarTracker::networkManagerFinished
);
delete m_networkManager;
if (m_worker->isRunning()) {
stop();

View File

@ -355,7 +355,12 @@ StarTrackerGUI::StarTrackerGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet,
*/
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&StarTrackerGUI::networkManagerFinished
);
readSolarFlux();
connect(&m_solarFluxTimer, SIGNAL(timeout()), this, SLOT(autoUpdateSolarFlux()));
@ -368,7 +373,12 @@ StarTrackerGUI::StarTrackerGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet,
StarTrackerGUI::~StarTrackerGUI()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&StarTrackerGUI::networkManagerFinished
);
delete m_networkManager;
delete ui;
}

View File

@ -57,14 +57,24 @@ VORLocalizer::VORLocalizer(WebAPIAdapterInterface *webAPIAdapterInterface) :
m_state = StIdle;
m_errorMessage = "VORLocalizer error";
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&VORLocalizer::networkManagerFinished
);
connect(MainCore::instance(), SIGNAL(channelAdded(int, ChannelAPI*)), this, SLOT(handleChannelAdded(int, ChannelAPI*)));
}
VORLocalizer::~VORLocalizer()
{
disconnect(MainCore::instance(), SIGNAL(channelAdded(int, ChannelAPI*)), this, SLOT(handleChannelAdded(int, ChannelAPI*)));
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&VORLocalizer::networkManagerFinished
);
delete m_networkManager;
if (m_worker->isRunning()) {
stop();

View File

@ -75,12 +75,22 @@ BladeRF2MIMO::BladeRF2MIMO(DeviceAPI *deviceAPI) :
m_deviceAPI->setNbSourceStreams(2);
m_deviceAPI->setNbSinkStreams(2);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&BladeRF2MIMO::networkManagerFinished
);
}
BladeRF2MIMO::~BladeRF2MIMO()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&BladeRF2MIMO::networkManagerFinished
);
delete m_networkManager;
closeDevice();
}

View File

@ -74,12 +74,22 @@ LimeSDRMIMO::LimeSDRMIMO(DeviceAPI *deviceAPI) :
m_deviceAPI->setNbSourceStreams(m_deviceParams->m_nbRxChannels);
m_deviceAPI->setNbSinkStreams(m_deviceParams->m_nbTxChannels);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&LimeSDRMIMO::networkManagerFinished
);
}
LimeSDRMIMO::~LimeSDRMIMO()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&LimeSDRMIMO::networkManagerFinished
);
delete m_networkManager;
closeDevice();
}

View File

@ -59,12 +59,22 @@ MetisMISO::MetisMISO(DeviceAPI *deviceAPI) :
const DeviceMetisScan::DeviceScan *deviceScan = DeviceMetis::instance().getDeviceScanAt(deviceSequence);
m_udpHandler.setMetisAddress(deviceScan->m_address, deviceScan->m_port);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&MetisMISO::networkManagerFinished
);
}
MetisMISO::~MetisMISO()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&MetisMISO::networkManagerFinished
);
delete m_networkManager;
if (m_running) {

View File

@ -58,7 +58,12 @@ PlutoSDRMIMO::PlutoSDRMIMO(DeviceAPI *deviceAPI) :
m_sampleMIFifo.init(2, 16 * PlutoSDRMIMOSettings::m_plutoSDRBlockSizeSamples);
m_sampleMOFifo.init(2, 16 * PlutoSDRMIMOSettings::m_plutoSDRBlockSizeSamples);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&PlutoSDRMIMO::networkManagerFinished
);
m_open = openDevice();
@ -74,7 +79,12 @@ PlutoSDRMIMO::PlutoSDRMIMO(DeviceAPI *deviceAPI) :
PlutoSDRMIMO::~PlutoSDRMIMO()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&PlutoSDRMIMO::networkManagerFinished
);
delete m_networkManager;
closeDevice();
}

View File

@ -51,12 +51,22 @@ TestMI::TestMI(DeviceAPI *deviceAPI) :
m_sampleMIFifo.init(2, 96000 * 4);
m_deviceAPI->setNbSourceStreams(2);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&TestMI::networkManagerFinished
);
}
TestMI::~TestMI()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&TestMI::networkManagerFinished
);
delete m_networkManager;
if (m_running) {

View File

@ -65,12 +65,22 @@ XTRXMIMO::XTRXMIMO(DeviceAPI *deviceAPI) :
m_deviceAPI->setNbSourceStreams(2);
m_deviceAPI->setNbSinkStreams(2);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&XTRXMIMO::networkManagerFinished
);
}
XTRXMIMO::~XTRXMIMO()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&XTRXMIMO::networkManagerFinished
);
delete m_networkManager;
closeDevice();
}

View File

@ -51,12 +51,22 @@ Bladerf1Output::Bladerf1Output(DeviceAPI *deviceAPI) :
m_deviceAPI->setNbSinkStreams(1);
m_deviceAPI->setBuddySharedPtr(&m_sharedParams);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&Bladerf1Output::networkManagerFinished
);
}
Bladerf1Output::~Bladerf1Output()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&Bladerf1Output::networkManagerFinished
);
delete m_networkManager;
if (m_running) {
@ -344,7 +354,7 @@ bool Bladerf1Output::applySettings(const BladeRF1OutputSettings& settings, bool
#if defined(_MSC_VER)
unsigned int fifoRate = (unsigned int) settings.m_devSampleRate / (1<<settings.m_log2Interp);
fifoRate = fifoRate < 48000U ? 48000U : fifoRate;
#else
#else
unsigned int fifoRate = std::max(
(unsigned int) settings.m_devSampleRate / (1<<settings.m_log2Interp),
DeviceBladeRF1Shared::m_sampleFifoMinRate);

View File

@ -53,12 +53,22 @@ BladeRF2Output::BladeRF2Output(DeviceAPI *deviceAPI) :
openDevice();
m_deviceAPI->setNbSinkStreams(1);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&BladeRF2Output::networkManagerFinished
);
}
BladeRF2Output::~BladeRF2Output()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&BladeRF2Output::networkManagerFinished
);
delete m_networkManager;
if (m_running) {

View File

@ -49,12 +49,22 @@ HackRFOutput::HackRFOutput(DeviceAPI *deviceAPI) :
m_deviceAPI->setNbSinkStreams(1);
m_deviceAPI->setBuddySharedPtr(&m_sharedParams);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&HackRFOutput::networkManagerFinished
);
}
HackRFOutput::~HackRFOutput()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&HackRFOutput::networkManagerFinished
);
delete m_networkManager;
if (m_running) {

View File

@ -63,12 +63,22 @@ LimeSDROutput::LimeSDROutput(DeviceAPI *deviceAPI) :
resumeTxBuddies();
resumeRxBuddies();
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&LimeSDROutput::networkManagerFinished
);
}
LimeSDROutput::~LimeSDROutput()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&LimeSDROutput::networkManagerFinished
);
delete m_networkManager;
if (m_running) {

View File

@ -48,12 +48,22 @@ LocalOutput::LocalOutput(DeviceAPI *deviceAPI) :
m_sampleSourceFifo.resize(SampleSourceFifo::getSizePolicy(m_sampleRate));
m_deviceAPI->setNbSinkStreams(1);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&LocalOutput::networkManagerFinished
);
}
LocalOutput::~LocalOutput()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&LocalOutput::networkManagerFinished
);
delete m_networkManager;
stop();
}

View File

@ -77,17 +77,12 @@ LocalOutputGui::LocalOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection);
m_sampleSink->setMessageQueueToGUI(&m_inputMessageQueue);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
m_forceSettings = true;
sendSettings();
}
LocalOutputGui::~LocalOutputGui()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
delete m_networkManager;
delete ui;
}

View File

@ -20,7 +20,6 @@
#include <QTimer>
#include <QWidget>
#include <QNetworkRequest>
#include "device/devicegui.h"
#include "util/messagequeue.h"
@ -28,7 +27,6 @@
#include "localoutput.h"
class DeviceUISet;
class QNetworkAccessManager;
class QNetworkReply;
class QJsonObject;
@ -72,9 +70,6 @@ private:
QPalette m_paletteGreenText;
QPalette m_paletteWhiteText;
QNetworkAccessManager *m_networkManager;
QNetworkRequest m_networkRequest;
void blockApplySettings(bool block);
void displaySettings();
void sendSettings();

View File

@ -64,12 +64,22 @@ PlutoSDROutput::PlutoSDROutput(DeviceAPI *deviceAPI) :
resumeBuddies();
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&PlutoSDROutput::networkManagerFinished
);
}
PlutoSDROutput::~PlutoSDROutput()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&PlutoSDROutput::networkManagerFinished
);
delete m_networkManager;
suspendBuddies();

View File

@ -65,7 +65,12 @@ RemoteOutput::RemoteOutput(DeviceAPI *deviceAPI) :
{
m_deviceAPI->setNbSinkStreams(1);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&RemoteOutput::networkManagerFinished
);
connect(&m_masterTimer, SIGNAL(timeout()), this, SLOT(tick()));
applyCenterFrequency();
applySampleRate();
@ -73,7 +78,12 @@ RemoteOutput::RemoteOutput(DeviceAPI *deviceAPI) :
RemoteOutput::~RemoteOutput()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&RemoteOutput::networkManagerFinished
);
stop();
delete m_networkManager;
}

View File

@ -52,12 +52,22 @@ SoapySDROutput::SoapySDROutput(DeviceAPI *deviceAPI) :
initDeviceArgSettings(m_settings);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&SoapySDROutput::networkManagerFinished
);
}
SoapySDROutput::~SoapySDROutput()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&SoapySDROutput::networkManagerFinished
);
delete m_networkManager;
if (m_running) {

View File

@ -65,12 +65,22 @@ USRPOutput::USRPOutput(DeviceAPI *deviceAPI) :
resumeTxBuddies();
resumeRxBuddies();
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&USRPOutput::networkManagerFinished
);
}
USRPOutput::~USRPOutput()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&USRPOutput::networkManagerFinished
);
delete m_networkManager;
if (m_running) {

View File

@ -55,12 +55,22 @@ XTRXOutput::XTRXOutput(DeviceAPI *deviceAPI) :
openDevice();
m_deviceAPI->setNbSinkStreams(1);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&XTRXOutput::networkManagerFinished
);
}
XTRXOutput::~XTRXOutput()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&XTRXOutput::networkManagerFinished
);
delete m_networkManager;
if (m_running) {

View File

@ -56,12 +56,22 @@ AirspyInput::AirspyInput(DeviceAPI *deviceAPI) :
m_deviceAPI->setNbSourceStreams(1);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AirspyInput::networkManagerFinished
);
}
AirspyInput::~AirspyInput()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AirspyInput::networkManagerFinished
);
delete m_networkManager;
if (m_running) {

View File

@ -57,12 +57,22 @@ AirspyHFInput::AirspyHFInput(DeviceAPI *deviceAPI) :
openDevice();
m_deviceAPI->setNbSourceStreams(1);
m_networkManager = new QNetworkAccessManager();
connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::connect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AirspyHFInput::networkManagerFinished
);
}
AirspyHFInput::~AirspyHFInput()
{
disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*)));
QObject::disconnect(
m_networkManager,
&QNetworkAccessManager::finished,
this,
&AirspyHFInput::networkManagerFinished
);
delete m_networkManager;
if (m_running) {

Some files were not shown because too many files have changed in this diff Show More