mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-21 23:55:13 -05:00
Make code compatible with Qt 5.12
This commit is contained in:
parent
327cc957d6
commit
bb25211b29
@ -355,7 +355,11 @@ void NoiseFigure::powerOn()
|
||||
|
||||
if (!command.isEmpty())
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QStringList allArgs = command.split(" ", Qt::SkipEmptyParts);
|
||||
#else
|
||||
QStringList allArgs = command.split(" ", QString::SkipEmptyParts);
|
||||
#endif
|
||||
QString program = allArgs[0];
|
||||
allArgs.pop_front();
|
||||
QProcess::execute(program, allArgs);
|
||||
@ -374,7 +378,11 @@ void NoiseFigure::powerOff()
|
||||
|
||||
if (!command.isEmpty())
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QStringList allArgs = command.split(" ", Qt::SkipEmptyParts);
|
||||
#else
|
||||
QStringList allArgs = command.split(" ", QString::SkipEmptyParts);
|
||||
#endif
|
||||
QString program = allArgs[0];
|
||||
allArgs.pop_front();
|
||||
QProcess::execute(program, allArgs);
|
||||
|
@ -303,7 +303,11 @@ void RadioAstronomy::startCal(bool hot)
|
||||
// Execute command to enable calibration
|
||||
if (!m_settings.m_startCalCommand.isEmpty())
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QStringList allArgs = m_settings.m_startCalCommand.split(" ", Qt::SkipEmptyParts);
|
||||
#else
|
||||
QStringList allArgs = m_settings.m_startCalCommand.split(" ", QString::SkipEmptyParts);
|
||||
#endif
|
||||
QString program = allArgs[0];
|
||||
allArgs.pop_front();
|
||||
QProcess::startDetached(program, allArgs);
|
||||
@ -340,7 +344,11 @@ void RadioAstronomy::calComplete(MsgCalComplete* report)
|
||||
// Execute command to disable calibration
|
||||
if (!m_settings.m_stopCalCommand.isEmpty())
|
||||
{
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QStringList allArgs = m_settings.m_stopCalCommand.split(" ", Qt::SkipEmptyParts);
|
||||
#else
|
||||
QStringList allArgs = m_settings.m_stopCalCommand.split(" ", QString::SkipEmptyParts);
|
||||
#endif
|
||||
QString program = allArgs[0];
|
||||
allArgs.pop_front();
|
||||
QProcess::startDetached(program, allArgs);
|
||||
|
@ -544,7 +544,11 @@ void SatelliteTrackerWorker::applyDeviceAOSSettings(const QString& name)
|
||||
if (!m_settings.m_aosCommand.isEmpty())
|
||||
{
|
||||
qDebug() << "SatelliteTrackerWorker::aos: executing command: " << m_settings.m_aosCommand;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QStringList allArgs = m_settings.m_aosCommand.split(" ", Qt::SkipEmptyParts);
|
||||
#else
|
||||
QStringList allArgs = m_settings.m_aosCommand.split(" ", QString::SkipEmptyParts);
|
||||
#endif
|
||||
QString program = allArgs[0];
|
||||
allArgs.pop_front();
|
||||
QProcess::startDetached(program, allArgs);
|
||||
@ -617,7 +621,11 @@ void SatelliteTrackerWorker::applyDeviceAOSSettings(const QString& name)
|
||||
if (!devSettings->m_aosCommand.isEmpty())
|
||||
{
|
||||
qDebug() << "SatelliteTrackerWorker::aos: executing command: " << devSettings->m_aosCommand;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QStringList allArgs = m_settings.m_aosCommand.split(" ", Qt::SkipEmptyParts);
|
||||
#else
|
||||
QStringList allArgs = m_settings.m_aosCommand.split(" ", QString::SkipEmptyParts);
|
||||
#endif
|
||||
QString program = allArgs[0];
|
||||
allArgs.pop_front();
|
||||
QProcess::startDetached(program, allArgs);
|
||||
@ -758,7 +766,11 @@ void SatelliteTrackerWorker::los(SatWorkerState *satWorkerState)
|
||||
if (!m_settings.m_losCommand.isEmpty())
|
||||
{
|
||||
qDebug() << "SatelliteTrackerWorker::los: executing command: " << m_settings.m_losCommand;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QStringList allArgs = m_settings.m_losCommand.split(" ", Qt::SkipEmptyParts);
|
||||
#else
|
||||
QStringList allArgs = m_settings.m_losCommand.split(" ", QString::SkipEmptyParts);
|
||||
#endif
|
||||
QString program = allArgs[0];
|
||||
allArgs.pop_front();
|
||||
QProcess::startDetached(program, allArgs);
|
||||
@ -801,7 +813,11 @@ void SatelliteTrackerWorker::los(SatWorkerState *satWorkerState)
|
||||
if (!devSettings->m_losCommand.isEmpty())
|
||||
{
|
||||
qDebug() << "SatelliteTrackerWorker::los: executing command: " << devSettings->m_losCommand;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QStringList allArgs = devSettings->m_losCommand.split(" ", Qt::SkipEmptyParts);
|
||||
#else
|
||||
QStringList allArgs = devSettings->m_losCommand.split(" ", QString::SkipEmptyParts);
|
||||
#endif
|
||||
QString program = allArgs[0];
|
||||
allArgs.pop_front();
|
||||
QProcess::startDetached(program, allArgs);
|
||||
|
@ -203,7 +203,11 @@ void Command::run(const QString& apiAddress, int apiPort, int deviceSetIndex)
|
||||
|
||||
m_currentProcess->setProcessChannelMode(QProcess::MergedChannels);
|
||||
m_currentProcessStartTimeStampms = TimeUtil::nowms();
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QStringList allArgs = args.split(" ", Qt::SkipEmptyParts);
|
||||
#else
|
||||
QStringList allArgs = args.split(" ", QString::SkipEmptyParts);
|
||||
#endif
|
||||
m_currentProcess->start(m_command, allArgs);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user