mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 01:18:38 -05:00
Fixed QProcess::execute and QProcess::startDetached warnings
This commit is contained in:
parent
63bea7734b
commit
33ce771e24
@ -352,8 +352,13 @@ void NoiseFigure::nextState()
|
||||
void NoiseFigure::powerOn()
|
||||
{
|
||||
QString command = m_settings.m_powerOnCommand.trimmed();
|
||||
if (!command.isEmpty()) {
|
||||
QProcess::execute(command);
|
||||
|
||||
if (!command.isEmpty())
|
||||
{
|
||||
QStringList allArgs = command.split(" ", Qt::SkipEmptyParts);
|
||||
QString program = allArgs[0];
|
||||
allArgs.pop_front();
|
||||
QProcess::execute(program, allArgs);
|
||||
}
|
||||
|
||||
QStringList commands = m_settings.m_powerOnSCPI.split("\n");
|
||||
@ -366,8 +371,13 @@ void NoiseFigure::powerOff()
|
||||
processVISA(commands);
|
||||
|
||||
QString command = m_settings.m_powerOffCommand.trimmed();
|
||||
if (!command.isEmpty()) {
|
||||
QProcess::execute(command);
|
||||
|
||||
if (!command.isEmpty())
|
||||
{
|
||||
QStringList allArgs = command.split(" ", Qt::SkipEmptyParts);
|
||||
QString program = allArgs[0];
|
||||
allArgs.pop_front();
|
||||
QProcess::execute(program, allArgs);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -301,8 +301,12 @@ void RadioAstronomy::startCal(bool hot)
|
||||
}
|
||||
|
||||
// Execute command to enable calibration
|
||||
if (!m_settings.m_startCalCommand.isEmpty()) {
|
||||
QProcess::startDetached(m_settings.m_startCalCommand);
|
||||
if (!m_settings.m_startCalCommand.isEmpty())
|
||||
{
|
||||
QStringList allArgs = m_settings.m_startCalCommand.split(" ", Qt::SkipEmptyParts);
|
||||
QString program = allArgs[0];
|
||||
allArgs.pop_front();
|
||||
QProcess::startDetached(program, allArgs);
|
||||
}
|
||||
|
||||
// Start calibration after requested delay
|
||||
@ -334,8 +338,12 @@ void RadioAstronomy::calComplete(MsgCalComplete* report)
|
||||
}
|
||||
|
||||
// Execute command to disable calibration
|
||||
if (!m_settings.m_stopCalCommand.isEmpty()) {
|
||||
QProcess::startDetached(m_settings.m_stopCalCommand);
|
||||
if (!m_settings.m_stopCalCommand.isEmpty())
|
||||
{
|
||||
QStringList allArgs = m_settings.m_stopCalCommand.split(" ", Qt::SkipEmptyParts);
|
||||
QString program = allArgs[0];
|
||||
allArgs.pop_front();
|
||||
QProcess::startDetached(program, allArgs);
|
||||
}
|
||||
|
||||
// Send calibration result to GUI
|
||||
|
@ -544,7 +544,10 @@ void SatelliteTrackerWorker::applyDeviceAOSSettings(const QString& name)
|
||||
if (!m_settings.m_aosCommand.isEmpty())
|
||||
{
|
||||
qDebug() << "SatelliteTrackerWorker::aos: executing command: " << m_settings.m_aosCommand;
|
||||
QProcess::startDetached(m_settings.m_aosCommand);
|
||||
QStringList allArgs = m_settings.m_aosCommand.split(" ", Qt::SkipEmptyParts);
|
||||
QString program = allArgs[0];
|
||||
allArgs.pop_front();
|
||||
QProcess::startDetached(program, allArgs);
|
||||
}
|
||||
|
||||
// Update device set
|
||||
@ -614,7 +617,10 @@ void SatelliteTrackerWorker::applyDeviceAOSSettings(const QString& name)
|
||||
if (!devSettings->m_aosCommand.isEmpty())
|
||||
{
|
||||
qDebug() << "SatelliteTrackerWorker::aos: executing command: " << devSettings->m_aosCommand;
|
||||
QProcess::startDetached(devSettings->m_aosCommand);
|
||||
QStringList allArgs = m_settings.m_aosCommand.split(" ", Qt::SkipEmptyParts);
|
||||
QString program = allArgs[0];
|
||||
allArgs.pop_front();
|
||||
QProcess::startDetached(program, allArgs);
|
||||
}
|
||||
|
||||
}
|
||||
@ -752,7 +758,10 @@ void SatelliteTrackerWorker::los(SatWorkerState *satWorkerState)
|
||||
if (!m_settings.m_losCommand.isEmpty())
|
||||
{
|
||||
qDebug() << "SatelliteTrackerWorker::los: executing command: " << m_settings.m_losCommand;
|
||||
QProcess::startDetached(m_settings.m_losCommand);
|
||||
QStringList allArgs = m_settings.m_losCommand.split(" ", Qt::SkipEmptyParts);
|
||||
QString program = allArgs[0];
|
||||
allArgs.pop_front();
|
||||
QProcess::startDetached(program, allArgs);
|
||||
}
|
||||
|
||||
if (m_settings.m_deviceSettings.contains(satWorkerState->m_name))
|
||||
@ -792,7 +801,10 @@ void SatelliteTrackerWorker::los(SatWorkerState *satWorkerState)
|
||||
if (!devSettings->m_losCommand.isEmpty())
|
||||
{
|
||||
qDebug() << "SatelliteTrackerWorker::los: executing command: " << devSettings->m_losCommand;
|
||||
QProcess::startDetached(devSettings->m_losCommand);
|
||||
QStringList allArgs = devSettings->m_losCommand.split(" ", Qt::SkipEmptyParts);
|
||||
QString program = allArgs[0];
|
||||
allArgs.pop_front();
|
||||
QProcess::startDetached(program, allArgs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user