From 5b50127d0bbfd78f98df59614d65267b60944ebe Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Thu, 28 Apr 2022 10:52:46 +0100 Subject: [PATCH] Replace deprecated hex modifier --- pttyhandler.cpp | 4 ++-- rigcommander.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pttyhandler.cpp b/pttyhandler.cpp index 1249537..0639bc0 100644 --- a/pttyhandler.cpp +++ b/pttyhandler.cpp @@ -214,12 +214,12 @@ void pttyHandler::receiveDataIn(int fd) { if (civId == 0 && inPortData.length() > lastFE + 2 && (quint8)inPortData[lastFE + 2] > (quint8)0xdf && (quint8)inPortData[lastFE + 2] < (quint8)0xef) { // This is (should be) the remotes CIV id. civId = (quint8)inPortData[lastFE + 2]; - qInfo(logSerial()) << "pty detected remote CI-V:" << hex << civId; + qInfo(logSerial()) << "pty detected remote CI-V:" << QString("0x%1").arg(civId,0,16); } else if (civId != 0 && inPortData.length() > lastFE + 2 && (quint8)inPortData[lastFE + 2] != civId) { civId = (quint8)inPortData[lastFE + 2]; - qInfo(logSerial()) << "pty remote CI-V changed:" << hex << (quint8)civId; + qInfo(logSerial()) << "pty remote CI-V changed:" << QString("0x%1").arg((quint8)civId,0,16); } // filter C-IV transceive command before forwarding on. if (inPortData.contains(rigCaps.transceiveCommand)) diff --git a/rigcommander.cpp b/rigcommander.cpp index 45cdb52..282ca82 100644 --- a/rigcommander.cpp +++ b/rigcommander.cpp @@ -50,7 +50,7 @@ void rigCommander::commSetup(unsigned char rigCivAddr, QString rigSerialPort, qu civAddr = rigCivAddr; // address of the radio. Decimal is 148. usingNativeLAN = false; - //qInfo(logRig()) << "Opening connection to Rig:" << hex << (unsigned char)rigCivAddr << "on serial port" << rigSerialPort << "at baud rate" << rigBaudRate; + //qInfo(logRig()) << "Opening connection to Rig:" << QString("0x%1").arg((unsigned char)rigCivAddr,0,16) << "on serial port" << rigSerialPort << "at baud rate" << rigBaudRate; // --- setup(); // --- @@ -3675,7 +3675,7 @@ void rigCommander::determineRigCaps() payloadPrefix.append(civAddr); payloadPrefix.append((char)compCivAddr); // if there is a compile-time error, remove the following line, the "hex" part is the issue: - qInfo(logRig()) << "Using incomingCIVAddr: (int): " << this->civAddr << " hex: " << hex << this->civAddr; + qInfo(logRig()) << "Using incomingCIVAddr: (int): " << this->civAddr << " hex: " << QString("0x%1").arg(this->civAddr,0,16); emit discoveredRigID(rigCaps); } else { if(!foundRig)