diff --git a/src/VehicleSetup/Bootloader.cc b/src/VehicleSetup/Bootloader.cc index ec1600acc6c6149282101de2907ed9dda3a4a845..5043caab7662682d93271ffb6a13099d3e97e186 100644 --- a/src/VehicleSetup/Bootloader.cc +++ b/src/VehicleSetup/Bootloader.cc @@ -184,7 +184,7 @@ bool Bootloader::_binProgram(QSerialPort* port, const FirmwareImage* image) { QFile firmwareFile(image->binFilename()); if (!firmwareFile.open(QIODevice::ReadOnly)) { - _errorString = tr("Unable to open firmware file %1: %2").arg(image->binFilename()).arg(firmwareFile.errorString()); + _errorString = tr("Unable to open firmware file %1: %2").arg(image->binFilename(), firmwareFile.errorString()); return false; } uint32_t imageSize = (uint32_t)firmwareFile.size(); @@ -354,7 +354,7 @@ bool Bootloader::_binVerifyBytes(QSerialPort* port, const FirmwareImage* image) QFile firmwareFile(image->binFilename()); if (!firmwareFile.open(QIODevice::ReadOnly)) { - _errorString = tr("Unable to open firmware file %1: %2").arg(image->binFilename()).arg(firmwareFile.errorString()); + _errorString = tr("Unable to open firmware file %1: %2").arg(image->binFilename(), firmwareFile.errorString()); return false; } uint32_t imageSize = (uint32_t)firmwareFile.size(); @@ -545,7 +545,7 @@ bool Bootloader::open(QSerialPort* port, const QString portName) port->setFlowControl(QSerialPort::NoFlowControl); if (!port->open(QIODevice::ReadWrite)) { - _errorString = tr("Open failed on port %1: %2").arg(portName).arg(port->errorString()); + _errorString = tr("Open failed on port %1: %2").arg(portName, port->errorString()); return false; } diff --git a/src/VehicleSetup/FirmwareImage.cc b/src/VehicleSetup/FirmwareImage.cc index e0fd7b685be77cbed1cb794677fb6ac21aef7851..6306eceb2e14643ac5c5aa3fddc51a98423bb6bc 100644 --- a/src/VehicleSetup/FirmwareImage.cc +++ b/src/VehicleSetup/FirmwareImage.cc @@ -122,7 +122,7 @@ bool FirmwareImage::_ihxLoad(const QString& ihxFilename) QFile ihxFile(ihxFilename); if (!ihxFile.open(QIODevice::ReadOnly | QIODevice::Text)) { - emit statusMessage(QString("Unable to open firmware file %1, error: %2").arg(ihxFilename).arg(ihxFile.errorString())); + emit statusMessage(QString("Unable to open firmware file %1, error: %2").arg(ihxFilename, ihxFile.errorString())); return false; } @@ -223,7 +223,7 @@ bool FirmwareImage::_px4Load(const QString& imageFilename) QFile px4File(imageFilename); if (!px4File.open(QIODevice::ReadOnly | QIODevice::Text)) { - emit statusMessage(tr("Unable to open firmware file %1, error: %2").arg(imageFilename).arg(px4File.errorString())); + emit statusMessage(tr("Unable to open firmware file %1, error: %2").arg(imageFilename, px4File.errorString())); return false; } @@ -292,7 +292,7 @@ bool FirmwareImage::_px4Load(const QString& imageFilename) parameterFile.close(); } } else { - emit statusMessage(tr("Unable to open parameter meta data file %1 for writing, error: %2").arg(parameterFilename).arg(parameterFile.errorString())); + emit statusMessage(tr("Unable to open parameter meta data file %1 for writing, error: %2").arg(parameterFilename, parameterFile.errorString())); } // Cache this file with the system @@ -324,7 +324,7 @@ bool FirmwareImage::_px4Load(const QString& imageFilename) airframeFile.close(); } } else { - emit statusMessage(tr("Unable to open airframe meta data file %1 for writing, error: %2").arg(airframeFilename).arg(airframeFile.errorString())); + emit statusMessage(tr("Unable to open airframe meta data file %1 for writing, error: %2").arg(airframeFilename, airframeFile.errorString())); } } @@ -350,7 +350,7 @@ bool FirmwareImage::_px4Load(const QString& imageFilename) QFile decompressFile(decompressFilename); if (!decompressFile.open(QIODevice::WriteOnly | QIODevice::Truncate)) { - emit statusMessage(tr("Unable to open decompressed file %1 for writing, error: %2").arg(decompressFilename).arg(decompressFile.errorString())); + emit statusMessage(tr("Unable to open decompressed file %1 for writing, error: %2").arg(decompressFilename, decompressFile.errorString())); return false; } @@ -449,7 +449,7 @@ bool FirmwareImage::_binLoad(const QString& imageFilename) { QFile binFile(imageFilename); if (!binFile.open(QIODevice::ReadOnly)) { - emit statusMessage(tr("Unabled to open firmware file %1, %2").arg(imageFilename).arg(binFile.errorString())); + emit statusMessage(tr("Unabled to open firmware file %1, %2").arg(imageFilename, binFile.errorString())); return false; }