diff --git a/devices/bladerf2/devicebladerf2.cpp b/devices/bladerf2/devicebladerf2.cpp index 8eb23cdb2..e8d88e514 100644 --- a/devices/bladerf2/devicebladerf2.cpp +++ b/devices/bladerf2/devicebladerf2.cpp @@ -80,7 +80,7 @@ void DeviceBladeRF2::enumOriginDevices(const QString& hardwareId, PluginInterfac unsigned int nbRxChannels = bladerf_get_channel_count(dev, BLADERF_RX); unsigned int nbTxChannels = bladerf_get_channel_count(dev, BLADERF_TX); // make the stream index a placeholder for future arg() hence the arg("%1") - QString displayableName(QString("BladeRF2[%1:%2] %3").arg(devinfo[i].instance).arg("%1").arg(devinfo[i].serial)); + QString displayableName(QString("BladeRF2[%1:$1] %2").arg(devinfo[i].instance).arg(devinfo[i].serial)); originDevices.append(PluginInterface::OriginDevice( displayableName, diff --git a/devices/limesdr/devicelimesdr.cpp b/devices/limesdr/devicelimesdr.cpp index 18189bcef..e21312241 100644 --- a/devices/limesdr/devicelimesdr.cpp +++ b/devices/limesdr/devicelimesdr.cpp @@ -54,7 +54,7 @@ void DeviceLimeSDR::enumOriginDevices(const QString& hardwareId, PluginInterface limeSDRParams.open(deviceList[i]); limeSDRParams.close(); - QString displayedName(QString("LimeSDR[%1:%2] %3").arg(i).arg("%1").arg(serial.c_str())); + QString displayedName(QString("LimeSDR[%1:$1] %2").arg(i).arg(serial.c_str())); originDevices.append(PluginInterface::OriginDevice( displayedName, diff --git a/devices/soapysdr/devicesoapysdr.cpp b/devices/soapysdr/devicesoapysdr.cpp index 13792262f..2a86bf5ef 100644 --- a/devices/soapysdr/devicesoapysdr.cpp +++ b/devices/soapysdr/devicesoapysdr.cpp @@ -102,7 +102,7 @@ void DeviceSoapySDR::enumOriginDevices(const QString& hardwareId, PluginInterfac for (int idev = 0; it != devicesEnumeration.end(); ++it, idev++) { - QString displayedName(QString("SoapySDR[%1:%2] %3").arg(idev).arg("%1").arg(it->m_label)); + QString displayedName(QString("SoapySDR[%1:$1] %2").arg(idev).arg(it->m_label)); QString serial(QString("%1-%2").arg(it->m_driverName).arg(it->m_sequence)); originDevices.append(PluginInterface::OriginDevice( diff --git a/devices/xtrx/devicextrx.cpp b/devices/xtrx/devicextrx.cpp index dd17f235b..9cac1d16b 100644 --- a/devices/xtrx/devicextrx.cpp +++ b/devices/xtrx/devicextrx.cpp @@ -86,7 +86,7 @@ void DeviceXTRX::enumOriginDevices(const QString& hardwareId, PluginInterface::O for (i = 0; i < res; i++) { DeviceXTRXParams XTRXParams; - QString displayableName(QString("XTRX[%1:%2] %3").arg(i).arg("%1").arg(devs[i].uniqname)); + QString displayableName(QString("XTRX[%1:$1] %2").arg(i).arg(devs[i].uniqname)); originDevices.append(PluginInterface::OriginDevice( displayableName, diff --git a/plugins/samplesink/bladerf2output/bladerf2outputplugin.cpp b/plugins/samplesink/bladerf2output/bladerf2outputplugin.cpp index cab5adecd..6fc88535f 100644 --- a/plugins/samplesink/bladerf2output/bladerf2outputplugin.cpp +++ b/plugins/samplesink/bladerf2output/bladerf2outputplugin.cpp @@ -76,7 +76,8 @@ PluginInterface::SamplingDevices BladeRF2OutputPlugin::enumSampleSinks(const Ori { for (int j = 0; j < it->nbTxStreams; j++) { - QString displayedName(it->displayableName.arg(j)); + QString displayedName = it->displayableName; + displayedName.replace(QString("$1]"), QString("%1]").arg(j)); result.append(SamplingDevice( displayedName, it->hardwareId, diff --git a/plugins/samplesink/limesdroutput/limesdroutputplugin.cpp b/plugins/samplesink/limesdroutput/limesdroutputplugin.cpp index c24714d1e..605bf15f7 100644 --- a/plugins/samplesink/limesdroutput/limesdroutputplugin.cpp +++ b/plugins/samplesink/limesdroutput/limesdroutputplugin.cpp @@ -80,7 +80,8 @@ PluginInterface::SamplingDevices LimeSDROutputPlugin::enumSampleSinks(const Orig for (unsigned int j = 0; j < it->nbTxStreams; j++) { qDebug("LimeSDROutputPlugin::enumSampleSinks: device #%d channel %u: %s", it->sequence, j, qPrintable(it->serial)); - QString displayedName(it->displayableName.arg(j)); + QString displayedName = it->displayableName; + displayedName.replace(QString("$1]"), QString("%1]").arg(j)); result.append(SamplingDevice( displayedName, it->hardwareId, diff --git a/plugins/samplesink/soapysdroutput/soapysdroutputplugin.cpp b/plugins/samplesink/soapysdroutput/soapysdroutputplugin.cpp index 632109607..856a8ef79 100644 --- a/plugins/samplesink/soapysdroutput/soapysdroutputplugin.cpp +++ b/plugins/samplesink/soapysdroutput/soapysdroutputplugin.cpp @@ -80,7 +80,8 @@ PluginInterface::SamplingDevices SoapySDROutputPlugin::enumSampleSinks(const Ori for (unsigned int ichan = 0; ichan < nbTxChannels; ichan++) { - QString displayedName(it->displayableName.arg(ichan)); + QString displayedName = it->displayableName; + displayedName.replace(QString("$1]"), QString("%1]").arg(ichan)); qDebug("SoapySDROutputPlugin::enumSampleSinks: device #%d serial %s channel %u", it->sequence, it->serial.toStdString().c_str(), ichan); result.append(SamplingDevice( diff --git a/plugins/samplesink/xtrxoutput/xtrxoutputplugin.cpp b/plugins/samplesink/xtrxoutput/xtrxoutputplugin.cpp index 52951b5ed..e10ac97ac 100644 --- a/plugins/samplesink/xtrxoutput/xtrxoutputplugin.cpp +++ b/plugins/samplesink/xtrxoutput/xtrxoutputplugin.cpp @@ -81,7 +81,8 @@ PluginInterface::SamplingDevices XTRXOutputPlugin::enumSampleSinks(const OriginD for (unsigned int j = 0; j < it->nbTxStreams; j++) { qDebug("XTRXInputPlugin::enumSampleSinks: device #%d channel %u: %s", it->sequence, j, qPrintable(it->serial)); - QString displayedName(it->displayableName.arg(j)); + QString displayedName = it->displayableName; + displayedName.replace(QString("$1]"), QString("%1]").arg(j)); result.append(SamplingDevice( displayedName, it->hardwareId, diff --git a/plugins/samplesource/bladerf2input/bladerf2inputplugin.cpp b/plugins/samplesource/bladerf2input/bladerf2inputplugin.cpp index bce8238bf..d6e1e882b 100644 --- a/plugins/samplesource/bladerf2input/bladerf2inputplugin.cpp +++ b/plugins/samplesource/bladerf2input/bladerf2inputplugin.cpp @@ -76,8 +76,10 @@ PluginInterface::SamplingDevices Blderf2InputPlugin::enumSampleSources(const Ori { for (int j=0; j < it->nbRxStreams; j++) { + QString displayedName = it->displayableName; + displayedName.replace(QString("$1]"), QString("%1]").arg(j)); result.append(SamplingDevice( - it->displayableName, + displayedName, m_hardwareID, m_deviceTypeID, it->serial, diff --git a/plugins/samplesource/limesdrinput/limesdrinputplugin.cpp b/plugins/samplesource/limesdrinput/limesdrinputplugin.cpp index cbc448586..aa094a3a6 100644 --- a/plugins/samplesource/limesdrinput/limesdrinputplugin.cpp +++ b/plugins/samplesource/limesdrinput/limesdrinputplugin.cpp @@ -80,7 +80,8 @@ PluginInterface::SamplingDevices LimeSDRInputPlugin::enumSampleSources(const Ori for (unsigned int j = 0; j < it->nbRxStreams; j++) { qDebug("LimeSDRInputPlugin::enumSampleSources: device #%d channel %u: %s", it->sequence, j, qPrintable(it->serial)); - QString displayedName(it->displayableName.arg(j)); + QString displayedName = it->displayableName; + displayedName.replace(QString("$1]"), QString("%1]").arg(j)); result.append(SamplingDevice( displayedName, it->hardwareId, diff --git a/plugins/samplesource/soapysdrinput/soapysdrinputplugin.cpp b/plugins/samplesource/soapysdrinput/soapysdrinputplugin.cpp index ebd16b331..7bc5e078e 100644 --- a/plugins/samplesource/soapysdrinput/soapysdrinputplugin.cpp +++ b/plugins/samplesource/soapysdrinput/soapysdrinputplugin.cpp @@ -79,7 +79,8 @@ PluginInterface::SamplingDevices SoapySDRInputPlugin::enumSampleSources(const Or for (unsigned int ichan = 0; ichan < nbRxChannels; ichan++) { - QString displayedName(it->displayableName.arg(ichan)); + QString displayedName = it->displayableName; + displayedName.replace(QString("$1]"), QString("%1]").arg(ichan)); qDebug("SoapySDRInputPlugin::enumSampleSources: device #%d serial %s channel %u", it->sequence, it->serial.toStdString().c_str(), ichan); result.append(SamplingDevice( diff --git a/plugins/samplesource/xtrxinput/xtrxinputplugin.cpp b/plugins/samplesource/xtrxinput/xtrxinputplugin.cpp index 60d1664c1..ba47649b9 100644 --- a/plugins/samplesource/xtrxinput/xtrxinputplugin.cpp +++ b/plugins/samplesource/xtrxinput/xtrxinputplugin.cpp @@ -83,7 +83,8 @@ PluginInterface::SamplingDevices XTRXInputPlugin::enumSampleSources(const Origin for (unsigned int j = 0; j < it->nbRxStreams; j++) { qDebug("XTRXInputPlugin::enumSampleSources: device #%d channel %u: %s", it->sequence, j, qPrintable(it->serial)); - QString displayedName(it->displayableName.arg(j)); + QString displayedName = it->displayableName; + displayedName.replace(QString("$1]"), QString("%1]").arg(j)); result.append(SamplingDevice( displayedName, it->hardwareId,