summaryrefslogtreecommitdiffstats
path: root/src/progs
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-19 11:40:25 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-19 11:40:25 -0600
commit4374b9aebc67cce74e5c1099d5f4ad1749b05fc6 (patch)
tree8f99491ad0bd6e9632a912f07acdccebd2af9127 /src/progs
parent9d9fe02a944fe0719c2475739411727a729251ad (diff)
downloadpiklab-4374b9aebc67cce74e5c1099d5f4ad1749b05fc6.tar.gz
piklab-4374b9aebc67cce74e5c1099d5f4ad1749b05fc6.zip
Remove additional unneeded tq method conversions
Diffstat (limited to 'src/progs')
-rw-r--r--src/progs/base/generic_debug.cpp2
-rw-r--r--src/progs/base/generic_prog.cpp24
-rw-r--r--src/progs/direct/base/direct.cpp6
-rw-r--r--src/progs/direct/base/direct_16.cpp4
-rw-r--r--src/progs/direct/base/direct_18F.cpp8
-rw-r--r--src/progs/direct/base/direct_mem24.cpp12
-rw-r--r--src/progs/direct/base/direct_pic.cpp2
-rw-r--r--src/progs/gpsim/base/gpsim.cpp4
-rw-r--r--src/progs/gpsim/base/gpsim_debug.cpp20
-rw-r--r--src/progs/gpsim/gui/gpsim_group_ui.cpp2
-rw-r--r--src/progs/gui/hardware_config_widget.cpp8
-rw-r--r--src/progs/gui/port_selector.cpp2
-rw-r--r--src/progs/icd1/base/icd1.cpp10
-rw-r--r--src/progs/icd1/base/icd1_serial.cpp2
-rw-r--r--src/progs/icd2/base/icd.cpp4
-rw-r--r--src/progs/icd2/base/icd2.cpp16
-rw-r--r--src/progs/icd2/base/icd2_debug.cpp26
-rw-r--r--src/progs/icd2/base/icd2_debug_specific.cpp10
-rw-r--r--src/progs/icd2/base/icd2_prog.cpp12
-rw-r--r--src/progs/icd2/base/icd2_serial.cpp2
-rw-r--r--src/progs/icd2/base/icd2_usb.cpp6
-rw-r--r--src/progs/icd2/base/icd_prog.cpp2
-rw-r--r--src/progs/icd2/xml/xml_icd2_parser.cpp2
-rw-r--r--src/progs/manager/debug_manager.cpp6
-rw-r--r--src/progs/manager/prog_manager.cpp4
-rw-r--r--src/progs/picdem_bootloader/base/picdem_bootloader.cpp14
-rw-r--r--src/progs/pickit1/base/pickit1.cpp2
-rw-r--r--src/progs/pickit2/base/pickit.cpp6
-rw-r--r--src/progs/pickit2/base/pickit2.cpp12
-rw-r--r--src/progs/pickit2/base/pickit2_prog.cpp2
-rw-r--r--src/progs/pickit2/base/pickit_prog.cpp8
-rw-r--r--src/progs/pickit2_bootloader/base/pickit2_bootloader.cpp4
-rw-r--r--src/progs/pickit2v2/base/pickit2v2.cpp16
-rw-r--r--src/progs/pickit2v2/base/pickit2v2_prog.cpp12
-rw-r--r--src/progs/psp/base/psp.cpp4
-rw-r--r--src/progs/psp/base/psp_serial.cpp6
-rw-r--r--src/progs/sdcdb/base/sdcdb_debug.cpp18
-rw-r--r--src/progs/tbl_bootloader/base/tbl_bootloader.cpp14
38 files changed, 157 insertions, 157 deletions
diff --git a/src/progs/base/generic_debug.cpp b/src/progs/base/generic_debug.cpp
index ed86c35..f96ca2f 100644
--- a/src/progs/base/generic_debug.cpp
+++ b/src/progs/base/generic_debug.cpp
@@ -76,7 +76,7 @@ bool Debugger::Base::halt()
if ( !softHalt(success) ) return false;
if ( !success ) return hardHalt();
if ( !update() ) return false;
- log(Log::LineType::Information, TQString("Halted at %1").tqarg(toHexLabel(pc(), _programmer.device()->nbCharsAddress())));
+ log(Log::LineType::Information, TQString("Halted at %1").arg(toHexLabel(pc(), _programmer.device()->nbCharsAddress())));
_programmer.setState(::Programmer::Halted);
return true;
}
diff --git a/src/progs/base/generic_prog.cpp b/src/progs/base/generic_prog.cpp
index e7e6e2e..a3e3770 100644
--- a/src/progs/base/generic_prog.cpp
+++ b/src/progs/base/generic_prog.cpp
@@ -72,13 +72,13 @@ bool Programmer::Base::simpleConnectHardware()
if (_device) {
TQString label = _group.label();
if ( group().isSoftware() )
- log(Log::LineType::Information, i18n("Connecting %1 with device %2...").tqarg(label).tqarg(_device->name()));
+ log(Log::LineType::Information, i18n("Connecting %1 with device %2...").arg(label).arg(_device->name()));
else {
if ( !_hardware->name().isEmpty() ) label += "[" + _hardware->name() + "]";
Port::Description pd = _hardware->portDescription();
TQString s = pd.type.label();
if (pd.type.data().withDevice) s += " (" + pd.device + ")";
- log(Log::LineType::Information, i18n("Connecting %1 on %2 with device %3...").tqarg(label).tqarg(s).tqarg(_device->name()));
+ log(Log::LineType::Information, i18n("Connecting %1 on %2 with device %3...").arg(label).arg(s).arg(_device->name()));
}
}
return _hardware->connectHardware();
@@ -98,7 +98,7 @@ bool Programmer::Base::connectHardware()
if ( !checkFirmwareVersion() ) return false;
if ( !setTargetPowerOn(false) ) return false;
if ( !setTarget() ) return false;
- log(Log::LineType::Information, i18n(" Set target self powered: %1").tqarg(_targetSelfPowered ? "true" : "false"));
+ log(Log::LineType::Information, i18n(" Set target self powered: %1").arg(_targetSelfPowered ? "true" : "false"));
if ( !setTargetPowerOn(!_targetSelfPowered) ) return false;
if ( !internalSetupHardware() ) return false;
if ( !readVoltages() ) return false;
@@ -133,30 +133,30 @@ bool Programmer::Base::checkFirmwareVersion()
{
if ( _mode==BootloadMode ) log(Log::LineType::Information, i18n("Programmer is in bootload mode."));
if ( !_firmwareVersion.isValid() ) return true;
- log(Log::LineType::Information, i18n("Firmware version is %1").tqarg(_firmwareVersion.pretty()));
+ log(Log::LineType::Information, i18n("Firmware version is %1").arg(_firmwareVersion.pretty()));
VersionData vd = _firmwareVersion.toWithoutDot();
VersionData tmp = firmwareVersion(FirmwareVersionType::Max);
if ( tmp.isValid() && tmp.toWithoutDot()<vd ) {
VersionData mplab = mplabVersion(FirmwareVersionType::Max);
- TQString s = (mplab.isValid() ? " " + i18n("MPLAB %1").tqarg(mplab.prettyWithoutDot()) : TQString());
+ TQString s = (mplab.isValid() ? " " + i18n("MPLAB %1").arg(mplab.prettyWithoutDot()) : TQString());
log(Log::LineType::Warning, i18n("The firmware version (%1) is higher than the version tested with piklab (%2%3).\n"
- "You may experience problems.").tqarg(_firmwareVersion.pretty()).tqarg(tmp.pretty()).tqarg(s));
+ "You may experience problems.").arg(_firmwareVersion.pretty()).arg(tmp.pretty()).arg(s));
return true;
}
tmp = firmwareVersion(FirmwareVersionType::Min);
if ( tmp.isValid() && vd<tmp.toWithoutDot() ) {
VersionData mplab = mplabVersion(FirmwareVersionType::Min);
- TQString s = (mplab.isValid() ? " " + i18n("MPLAB %1").tqarg(mplab.prettyWithoutDot()) : TQString());
+ TQString s = (mplab.isValid() ? " " + i18n("MPLAB %1").arg(mplab.prettyWithoutDot()) : TQString());
log(Log::LineType::Warning, i18n("The firmware version (%1) is lower than the version tested with piklab (%2%3).\n"
- "You may experience problems.").tqarg(_firmwareVersion.pretty()).tqarg(tmp.pretty()).tqarg(s));
+ "You may experience problems.").arg(_firmwareVersion.pretty()).arg(tmp.pretty()).arg(s));
return true;
}
tmp = firmwareVersion(FirmwareVersionType::Recommended);
if ( tmp.isValid() && vd<tmp.toWithoutDot() ) {
VersionData mplab = mplabVersion(FirmwareVersionType::Recommended);
- TQString s = (mplab.isValid() ? " " + i18n("MPLAB %1").tqarg(mplab.prettyWithoutDot()) : TQString());
+ TQString s = (mplab.isValid() ? " " + i18n("MPLAB %1").arg(mplab.prettyWithoutDot()) : TQString());
log(Log::LineType::Warning, i18n("The firmware version (%1) is lower than the recommended version (%2%3).\n"
- "It is recommended to upgrade the firmware.").tqarg(_firmwareVersion.pretty()).tqarg(tmp.pretty()).tqarg(s));
+ "It is recommended to upgrade the firmware.").arg(_firmwareVersion.pretty()).arg(tmp.pretty()).arg(s));
return true;
}
return true;
@@ -243,11 +243,11 @@ void Programmer::Base::endProgramming()
bool Programmer::Base::uploadFirmware(const PURL::Url &url)
{
_progressMonitor.clear();
- log(Log::DebugLevel::Normal, TQString(" Firmware file: %1").tqarg(url.pretty()));
+ log(Log::DebugLevel::Normal, TQString(" Firmware file: %1").arg(url.pretty()));
Log::StringView sview;
PURL::File file(url, sview);
if ( !file.openForRead() ) {
- log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").tqarg(url.pretty()));
+ log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").arg(url.pretty()));
return false;
}
bool ok = doUploadFirmware(file);
diff --git a/src/progs/direct/base/direct.cpp b/src/progs/direct/base/direct.cpp
index 7603ca3..91d9a65 100644
--- a/src/progs/direct/base/direct.cpp
+++ b/src/progs/direct/base/direct.cpp
@@ -83,7 +83,7 @@ void Direct::Hardware::setPin(PinType type, bool on)
int pin = _data.pins[type];
if ( isGroundPin(pin) ) return;
uint p = (pin<0 ? -pin : pin)-1;
- //log(Log::DebugLevel::Extra, TQString("Hardware::setPin %1 %2: %3 %4").tqarg(PIN_DATA[type].label).tqarg(pin).tqarg(on).tqarg(_data.clockDelay));
+ //log(Log::DebugLevel::Extra, TQString("Hardware::setPin %1 %2: %3 %4").arg(PIN_DATA[type].label).arg(pin).arg(on).arg(_data.clockDelay));
_port->setPinOn(p, on, (pin<0 ? Port::NegativeLogic : Port::PositiveLogic));
if ( type==Clock ) Port::usleep(_data.clockDelay);
}
@@ -95,7 +95,7 @@ bool Direct::Hardware::readBit()
uint p = (pin<0 ? -pin : pin)-1;
bool on;
_port->readPin(p, (pin<0 ? Port::NegativeLogic : Port::PositiveLogic), on);
- //log(Log::DebugLevel::Extra, TQString("Hardware::read DataIn %2: %3").tqarg(pin).tqarg(on));
+ //log(Log::DebugLevel::Extra, TQString("Hardware::read DataIn %2: %3").arg(pin).arg(on));
return on;
}
@@ -107,7 +107,7 @@ uint Direct::Hardware::nbPins(Port::IODir dir) const
TQString Direct::Hardware::pinLabelForIndex(Port::IODir dir, uint i) const
{
Port::PinData pd = _port->pinData(dir)[i];
- return TQString("%1 (%2)").tqarg(pd.pin+1).tqarg(pd.label);
+ return TQString("%1 (%2)").arg(pd.pin+1).arg(pd.label);
}
Port::IODir Direct::Hardware::ioTypeForPin(int pin) const
diff --git a/src/progs/direct/base/direct_16.cpp b/src/progs/direct/base/direct_16.cpp
index ef17479..0c930c9 100644
--- a/src/progs/direct/base/direct_16.cpp
+++ b/src/progs/direct/base/direct_16.cpp
@@ -105,7 +105,7 @@ bool Direct::pic16::doWrite(Pic::MemoryRangeType type, const Device::Array &data
gotoMemory(type);
for (uint i = 0; i<data.count(); ) {
if ( !writeWords(type, data, i, force) ) {
- log(Log::LineType::Error, i18n("Error programming %1 at %2.").tqarg(type.label()).tqarg(toHexLabel(i, 8)));
+ log(Log::LineType::Error, i18n("Error programming %1 at %2.").arg(type.label()).arg(toHexLabel(i, 8)));
return false;
}
}
@@ -134,7 +134,7 @@ bool Direct::pic16::writeWords(Pic::MemoryRangeType type, const Device::Array &d
}
}
startProg(type);
- TQString cmd = TQString("w%1").tqarg(waitProgTime(type));
+ TQString cmd = TQString("w%1").arg(waitProgTime(type));
pulseEngine(cmd.latin1());
endProg(type);
return true;
diff --git a/src/progs/direct/base/direct_18F.cpp b/src/progs/direct/base/direct_18F.cpp
index 0ad5533..8c2c371 100644
--- a/src/progs/direct/base/direct_18F.cpp
+++ b/src/progs/direct/base/direct_18F.cpp
@@ -27,11 +27,11 @@ void Direct::P18F::program(Type type)
TQString cmd;
switch (type) {
case Code:
- cmd = TQString("d,C,c,C,c,C,c,Cw%1cw%2X0000,").tqarg(programHighTime(Code)).tqarg(programLowTime());
+ cmd = TQString("d,C,c,C,c,C,c,Cw%1cw%2X0000,").arg(programHighTime(Code)).arg(programLowTime());
break;
case Erase:
pulseEngine("k0,X0000,"); // NOP
- cmd = TQString("k0;w%1;w%2;X0000").tqarg(programHighTime(type)).tqarg(programLowTime());
+ cmd = TQString("k0;w%1;w%2;X0000").arg(programHighTime(type)).arg(programLowTime());
break;
case Eeprom:
for (;;) {
@@ -41,7 +41,7 @@ void Direct::P18F::program(Type type)
BitValue b = get_byte();
if ( !b.bit(1) ) break; // WR bit clear
}
- cmd = TQString("w%1").tqarg(programLowTime());
+ cmd = TQString("w%1").arg(programLowTime());
break;
}
pulseEngine(cmd);
@@ -234,7 +234,7 @@ void Direct::P18F1220::program(Type type)
{
if ( type==Eeprom ) {
pulseEngine("k0,X0000,"); // NOP
- TQString cmd = TQString("k0;w%1;w%2;X0000").tqarg(programHighTime(type)).tqarg(programLowTime());
+ TQString cmd = TQString("k0;w%1;w%2;X0000").arg(programHighTime(type)).arg(programLowTime());
pulseEngine(cmd);
} else P18F::program(type);
}
diff --git a/src/progs/direct/base/direct_mem24.cpp b/src/progs/direct/base/direct_mem24.cpp
index 98b5f9a..f2a00ff 100644
--- a/src/progs/direct/base/direct_mem24.cpp
+++ b/src/progs/direct/base/direct_mem24.cpp
@@ -68,18 +68,18 @@ uint Direct::Mem24DeviceSpecific::controlByte(uint address, Operation operation)
bool Direct::Mem24DeviceSpecific::setAddress(uint address)
{
- log(Log::DebugLevel::Extra, TQString("set address %1").tqarg(toHexLabel(address, nbChars(NumberBase::Hex, address))));
+ log(Log::DebugLevel::Extra, TQString("set address %1").arg(toHexLabel(address, nbChars(NumberBase::Hex, address))));
if ( !start() ) return false;
uint bsize = device().nbBytes() / device().nbBlocks();
uint block = address / bsize;
- log(Log::DebugLevel::Extra, TQString(" in block #%1/%2").tqarg(block).tqarg(device().nbBlocks()));
+ log(Log::DebugLevel::Extra, TQString(" in block #%1/%2").arg(block).arg(device().nbBlocks()));
uint cbyte = controlByte(address, Write);
- log(Log::DebugLevel::Max, TQString(" control byte is %1").tqarg(toHexLabel(cbyte, 2)));
+ log(Log::DebugLevel::Max, TQString(" control byte is %1").arg(toHexLabel(cbyte, 2)));
if ( !writeByteAck(cbyte) ) return false;
uint nb = nbBytes(bsize-1);
for (int i=nb-1; i>=0; i--) {
uint add = (address >> 8*i) & 0xFF;
- log(Log::DebugLevel::Max, TQString(" byte #%1: %2").tqarg(i).tqarg(toHexLabel(add, 2)));
+ log(Log::DebugLevel::Max, TQString(" byte #%1: %2").arg(i).arg(toHexLabel(add, 2)));
if ( !writeByteAck(add) ) return false;
}
return true;
@@ -107,7 +107,7 @@ bool Direct::Mem24DeviceSpecific::doWrite(const Device::Array &data)
// page by page (page_size==1: byte by byte)
uint nbPages = device().nbBytes() / device().nbBytesPage();
for (uint i=0; i<nbPages; i++) {
- log(Log::DebugLevel::Extra, TQString("write page #%1/%2").tqarg(i).tqarg(nbPages));
+ log(Log::DebugLevel::Extra, TQString("write page #%1/%2").arg(i).arg(nbPages));
uint address = i * device().nbBytesPage();
// write bytes
if ( !setAddress(address) ) return false;
@@ -122,7 +122,7 @@ bool Direct::Mem24DeviceSpecific::doWrite(const Device::Array &data)
if ( !writeByte(controlByte(address, Write), acked) ) return false;
if (acked) break;
if ( time.elapsed()>200 ) { // 200 ms timeout
- log(Log::LineType::Error, i18n("Timeout writing at address %1").tqarg(toHexLabel(address, nbChars(device().nbBytes()))));
+ log(Log::LineType::Error, i18n("Timeout writing at address %1").arg(toHexLabel(address, nbChars(device().nbBytes()))));
return false;
}
}
diff --git a/src/progs/direct/base/direct_pic.cpp b/src/progs/direct/base/direct_pic.cpp
index c6316e9..19c74b5 100644
--- a/src/progs/direct/base/direct_pic.cpp
+++ b/src/progs/direct/base/direct_pic.cpp
@@ -19,7 +19,7 @@ Direct::PulseEngine::PulseEngine(::Programmer::Base &base)
BitValue Direct::PulseEngine::pulseEngine(const TQString &cmd, BitValue value)
{
- _pbase.log(Log::DebugLevel::Extra, TQString("pulse engine: %1").tqarg(cmd));
+ _pbase.log(Log::DebugLevel::Extra, TQString("pulse engine: %1").arg(cmd));
TQByteArray a = toAscii(cmd);
BitValue res = 0;
for (const char *ptr=a.data(); (ptr-a.data())<int(a.count()); ++ptr)
diff --git a/src/progs/gpsim/base/gpsim.cpp b/src/progs/gpsim/base/gpsim.cpp
index 4352162..6803686 100644
--- a/src/progs/gpsim/base/gpsim.cpp
+++ b/src/progs/gpsim/base/gpsim.cpp
@@ -138,7 +138,7 @@ void GPSim::Hardware::internalDisconnectHardware()
bool GPSim::Hardware::execute(const TQString &command, bool synchronous, TQStringList *output)
{
- log(Log::DebugLevel::Normal, TQString("command: %1").tqarg(command));
+ log(Log::DebugLevel::Normal, TQString("command: %1").arg(command));
if (output) output->clear();
if ( !_manager->sendCommand(command, synchronous) ) return false;
if (output) *output = _manager->process().sout();
@@ -147,7 +147,7 @@ bool GPSim::Hardware::execute(const TQString &command, bool synchronous, TQStrin
bool GPSim::Hardware::signal(uint n, bool synchronous, TQStringList *output)
{
- log(Log::DebugLevel::Normal, TQString("signal: %1").tqarg(n));
+ log(Log::DebugLevel::Normal, TQString("signal: %1").arg(n));
if (output) output->clear();
if ( !_manager->sendSignal(n, synchronous) ) return false;
if (output) *output = _manager->process().sout();
diff --git a/src/progs/gpsim/base/gpsim_debug.cpp b/src/progs/gpsim/base/gpsim_debug.cpp
index c446bad..f6c2541 100644
--- a/src/progs/gpsim/base/gpsim_debug.cpp
+++ b/src/progs/gpsim/base/gpsim_debug.cpp
@@ -104,7 +104,7 @@ bool GPSim::Debugger::readWreg(BitValue &value)
TQString w = (_coff->symbol("_WREG") ? "_WREG" : "W");
TQString s;
if ( !findRegExp(lines, "^\\s*[0-9A-Fa-f]+\\s+(\\w+)\\s*=\\s*([0-9A-Fa-f]+)", w, s) ) {
- log(Log::LineType::Error, i18n("Error reading register \"%1\"").tqarg(w));
+ log(Log::LineType::Error, i18n("Error reading register \"%1\"").arg(w));
return false;
}
value = fromHex(s, 0);
@@ -126,7 +126,7 @@ bool GPSim::Debugger::getRegister(const TQString &name, BitValue &value)
for (; i<uint(lines.count()); i++)
if ( r.exactMatch(lines[i]) ) break;
if ( i==uint(lines.count()) ) {
- log(Log::LineType::Error, i18n("Error reading register \"%1\"").tqarg(name));
+ log(Log::LineType::Error, i18n("Error reading register \"%1\"").arg(name));
return false;
}
value = fromHex(r.cap(1), 0);
@@ -138,7 +138,7 @@ bool GPSim::Debugger::getRegister(Address address, BitValue &value)
const Pic::RegistersData &rdata = device()->registersData();
TQString name = toHex(address, rdata.nbCharsAddress());
if ( hardware()->version()<VersionData(0, 22, 0) ) return getRegister("0x" + name, value);
- return getRegister(TQString("ramData[$%1]").tqarg(name), value);
+ return getRegister(TQString("ramData[$%1]").arg(name), value);
}
bool GPSim::Debugger::readRegister(const Register::TypeData &data, BitValue &value)
@@ -162,14 +162,14 @@ bool GPSim::Debugger::setRegister(const TQString &name, BitValue value)
return true;
}
const Pic::RegistersData &rdata = device()->registersData();
- TQString s = TQString("%1 = %2").tqarg(name).tqarg(toHexLabel(value, rdata.nbChars()));
+ TQString s = TQString("%1 = %2").arg(name).arg(toHexLabel(value, rdata.nbChars()));
return hardware()->execute(s, true);
}
bool GPSim::Debugger::setRegister(Address address, BitValue value)
{
const Pic::RegistersData &rdata = device()->registersData();
- TQString s = TQString("ramData[$%1]").tqarg(toHex(address, rdata.nbCharsAddress()));
+ TQString s = TQString("ramData[$%1]").arg(toHex(address, rdata.nbCharsAddress()));
return setRegister(s, value);
}
@@ -204,7 +204,7 @@ bool GPSim::Debugger::updatePortStatus(uint index, TQMap<uint, Device::PortBitDa
if ( !hardware()->execute("symbol " + name, true, &lines) ) return false;
TQString pattern = "^(\\w+)=([^\\s])+\\s*", value;
if ( !findRegExp(lines, pattern, "bitState", value) || value.length()!=1 ) {
- log(Log::LineType::Error, i18n("Error reading state of IO bit: %1").tqarg(name));
+ log(Log::LineType::Error, i18n("Error reading state of IO bit: %1").arg(name));
return false;
}
switch (value[0].latin1()) {
@@ -218,24 +218,24 @@ bool GPSim::Debugger::updatePortStatus(uint index, TQMap<uint, Device::PortBitDa
case 'X': bits[i].state = Device::Unknown; break;
default:
bits[i].state = Device::Unknown;
- log(Log::LineType::Warning, i18n("Unknown state for IO bit: %1 (%2)").tqarg(name).tqarg(value));
+ log(Log::LineType::Warning, i18n("Unknown state for IO bit: %1 (%2)").arg(name).arg(value));
break;
}
if ( !findRegExp(lines, pattern, "Driving", value) || value.length()!=1 ) {
- log(Log::LineType::Error, i18n("Error reading driving state of IO bit: %1").tqarg(name));
+ log(Log::LineType::Error, i18n("Error reading driving state of IO bit: %1").arg(name));
return false;
}
bits[i].driving = ( value[0]=='1' );
if (bits[i].driving) {
if ( !findRegExp(lines, pattern, "drivingState", value) || value.length()!=1 ) {
- log(Log::LineType::Error, i18n("Error reading driving state of IO bit: %1").tqarg(name));
+ log(Log::LineType::Error, i18n("Error reading driving state of IO bit: %1").arg(name));
return false;
}
bits[i].drivingState = (value[0]=='0' ? Device::IoLow : Device::IoHigh);
bits[i].drivenState = Device::IoUnknown;
} else {
if ( !findRegExp(lines, pattern, "drivenState", value) || value.length()!=1 ) {
- log(Log::LineType::Error, i18n("Error reading driven state of IO bit: %1").tqarg(name));
+ log(Log::LineType::Error, i18n("Error reading driven state of IO bit: %1").arg(name));
return false;
}
bits[i].drivenState = (value[0]=='0' ? Device::IoLow : Device::IoHigh);
diff --git a/src/progs/gpsim/gui/gpsim_group_ui.cpp b/src/progs/gpsim/gui/gpsim_group_ui.cpp
index 02d7559..aa404c3 100644
--- a/src/progs/gpsim/gui/gpsim_group_ui.cpp
+++ b/src/progs/gpsim/gui/gpsim_group_ui.cpp
@@ -32,7 +32,7 @@ void GPSim::ConfigWidget::updateStatus()
ProcessManager manager(0);
if ( !manager.start() ) _status->setText(i18n("Could not start \"gpsim\""));
else if ( !manager.getVersion(version) || !version.isValid() ) _status->setText(i18n("Could not detect \"gpsim\" version"));
- else _status->setText(i18n("Found version \"%1\"").tqarg(version.pretty()));
+ else _status->setText(i18n("Found version \"%1\"").arg(version.pretty()));
}
//----------------------------------------------------------------------------
diff --git a/src/progs/gui/hardware_config_widget.cpp b/src/progs/gui/hardware_config_widget.cpp
index 193fdfb..82b0bab 100644
--- a/src/progs/gui/hardware_config_widget.cpp
+++ b/src/progs/gui/hardware_config_widget.cpp
@@ -47,7 +47,7 @@ Hardware::EditDialog::EditDialog(ConfigWidget *cwidget, const TQString &name, co
_name = new TQLineEdit(name, plainPage());
grid->addWidget(_name, 0, 1);
- label = new TQLabel(i18n("%1 at %2:").tqarg(pd.type.label()).tqarg(pd.device), plainPage());
+ label = new TQLabel(i18n("%1 at %2:").arg(pd.type.label()).arg(pd.device), plainPage());
grid->addWidget(label, 1, 0);
label = new TQLabel(plainPage());
grid->addWidget(label, 1, 1);
@@ -73,7 +73,7 @@ void Hardware::EditDialog::slotOk()
}
TQStringList names = _cwidget->_config->hardwareNames(PortType::Nb_Types); // all hardwares
if ( names.contains(_name->text()) ) {
- if ( !MessageBox::askContinue(i18n("Do you want to overwrite this custom hardware \"%1\"?").tqarg(_name->text()),
+ if ( !MessageBox::askContinue(i18n("Do you want to overwrite this custom hardware \"%1\"?").arg(_name->text()),
KStdGuiItem::save()) ) return;
}
delete _oldData;
@@ -174,7 +174,7 @@ void Hardware::ConfigWidget::updateList(PortType type)
_names = _config->hardwareNames(type);
for (uint i=0; i<_names.count(); i++) {
bool standard = _config->isStandardHardware(_names[i]);
- TQString s = (standard ? _config->label(_names[i]) : i18n("%1 <custom>").tqarg(_names[i]));
+ TQString s = (standard ? _config->label(_names[i]) : i18n("%1 <custom>").arg(_names[i]));
_configCombo->insertItem(s);
}
}
@@ -196,7 +196,7 @@ void Hardware::ConfigWidget::editClicked()
void Hardware::ConfigWidget::deleteClicked()
{
TQString name = _names[_configCombo->currentItem()];
- if ( !MessageBox::askContinue(i18n("Do you want to delete custom hardware \"%1\"?").tqarg(name),
+ if ( !MessageBox::askContinue(i18n("Do you want to delete custom hardware \"%1\"?").arg(name),
KStdGuiItem::del()) ) return;
_config->deleteCustomHardware(name);
updateList(_hc->portDescription().type);
diff --git a/src/progs/gui/port_selector.cpp b/src/progs/gui/port_selector.cpp
index 32b1887..27ecb12 100644
--- a/src/progs/gui/port_selector.cpp
+++ b/src/progs/gui/port_selector.cpp
@@ -85,7 +85,7 @@ void PortSelector::addPortType(const Port::Description &pd)
KTextBrowser *comment = new KTextBrowser(_main);
TQString text = (notAvailable ? notAvailableMessage : noDeviceMessage);
text += "<p>";
- text += i18n("<a href=\"%1\">See Piklab homepage for help</a>.").tqarg(Piklab::URLS[Piklab::Support]);
+ text += i18n("<a href=\"%1\">See Piklab homepage for help</a>.").arg(Piklab::URLS[Piklab::Support]);
comment->setText(text);
_grid->addMultiCellWidget(comment, 3*(_bgroup->count()-1)+1,3*(_bgroup->count()-1)+1, 0,3);
}
diff --git a/src/progs/icd1/base/icd1.cpp b/src/progs/icd1/base/icd1.cpp
index 2ce3c80..3cba20c 100644
--- a/src/progs/icd1/base/icd1.cpp
+++ b/src/progs/icd1/base/icd1.cpp
@@ -31,7 +31,7 @@ bool Icd1::Hardware::internalConnect(const TQString &mode)
Port::msleep(1);
port()->setPinOn(Port::Serial::RTS, true, Port::PositiveLogic);
if ( s.upper()!=mode ) {
- log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").tqarg(mode));
+ log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").arg(mode));
return false;
}
return true;
@@ -79,12 +79,12 @@ bool Icd1::Hardware::readVoltages(VoltagesData &voltages)
if ( !sendCommand(0x701C, &res) ) return false;
voltages[Pic::TargetVdd].value = (2.050 / 256) * res.toUInt(); // voltage at AN0 pin
voltages[Pic::TargetVdd].value /= (4.7 / 14.7); // voltage at Vcc
- log(Log::DebugLevel::Max, TQString("Vdd: %1 %2").tqarg(toHexLabel(res, 4)).tqarg(voltages[Pic::TargetVdd].value));
+ log(Log::DebugLevel::Max, TQString("Vdd: %1 %2").arg(toHexLabel(res, 4)).arg(voltages[Pic::TargetVdd].value));
voltages[Pic::TargetVdd].error = false;
if ( !sendCommand(0x701D, &res) ) return false;
voltages[Pic::TargetVpp].value = (2.050 / 256) * res.byte(0); // voltage at AN1 pin
voltages[Pic::TargetVpp].value /= (10.0 / 110.0); // voltage at Vpp
- log(Log::DebugLevel::Max, TQString("Vpp: %1 %2").tqarg(toHexLabel(res, 4)).tqarg(voltages[Pic::TargetVpp].value));
+ log(Log::DebugLevel::Max, TQString("Vpp: %1 %2").arg(toHexLabel(res, 4)).arg(voltages[Pic::TargetVpp].value));
voltages[Pic::TargetVpp].error = false;
return sendCommand(0x7001);
}
@@ -106,7 +106,7 @@ bool Icd1::Hardware::selfTest()
BitValue res;
if ( !sendCommand(0x700B, &res, 5000) ) return false;
if ( res!=0 ) {
- log(Log::LineType::Warning, i18n("Self-test failed (returned value is %1)").tqarg(toLabel(res)));
+ log(Log::LineType::Warning, i18n("Self-test failed (returned value is %1)").arg(toLabel(res)));
return false;
}
return true;
@@ -152,7 +152,7 @@ bool Icd1::Hardware::eraseAll()
if ( !sendCommand(0x7007, &res) ) return false;
if ( !sendCommand(0x7001) ) return false; // disable Vpp
if ( res!=0x3FFF ) {
- log(Log::LineType::Error, i18n("Erase failed (returned value is %1)").tqarg(toHexLabel(res, 4)));
+ log(Log::LineType::Error, i18n("Erase failed (returned value is %1)").arg(toHexLabel(res, 4)));
return false;
}
return true;
diff --git a/src/progs/icd1/base/icd1_serial.cpp b/src/progs/icd1/base/icd1_serial.cpp
index 8d40697..164502f 100644
--- a/src/progs/icd1/base/icd1_serial.cpp
+++ b/src/progs/icd1/base/icd1_serial.cpp
@@ -61,7 +61,7 @@ bool Icd1::SerialPort::sendCommand(uint cmd)
synchronize();
char c[7] = "$XXXX\r";
TQString cs = toHex(cmd, 4);
- log(Log::DebugLevel::Extra, TQString("Send command: %1").tqarg(toPrintable(cs, PrintAlphaNum)));
+ log(Log::DebugLevel::Extra, TQString("Send command: %1").arg(toPrintable(cs, PrintAlphaNum)));
c[1] = cs[0].latin1();
c[2] = cs[1].latin1();
c[3] = cs[2].latin1();
diff --git a/src/progs/icd2/base/icd.cpp b/src/progs/icd2/base/icd.cpp
index 18e9574..c926ca4 100644
--- a/src/progs/icd2/base/icd.cpp
+++ b/src/progs/icd2/base/icd.cpp
@@ -38,8 +38,8 @@ Device::Array Icd::DeviceSpecific::prepareRange(Pic::MemoryRangeType type, const
uint end = (force ? data.count() : findNonMaskEnd(type, data));
nbWords = end - wordOffset + 1;
log(Log::DebugLevel::Normal, TQString(" start=%1 nbWords=%2 total=%3 force=%4")
- .tqarg(toHexLabel(wordOffset, device().nbCharsAddress())).tqarg(toHexLabel(nbWords, device().nbCharsAddress()))
- .tqarg(toHexLabel(data.count(), device().nbCharsAddress())).tqarg(force ? "true" : "false"));
+ .arg(toHexLabel(wordOffset, device().nbCharsAddress())).arg(toHexLabel(nbWords, device().nbCharsAddress()))
+ .arg(toHexLabel(data.count(), device().nbCharsAddress())).arg(force ? "true" : "false"));
}
_base.progressMonitor().addTaskProgress(data.count()-nbWords);
return data.mid(wordOffset, nbWords);
diff --git a/src/progs/icd2/base/icd2.cpp b/src/progs/icd2/base/icd2.cpp
index 6765340..073dd26 100644
--- a/src/progs/icd2/base/icd2.cpp
+++ b/src/progs/icd2/base/icd2.cpp
@@ -170,14 +170,14 @@ bool Icd2::Hardware::setup()
TQString s;
if ( !_port->receive(2, s) ) return false;
if ( s!="02" ) {
- log(Log::LineType::Error, i18n("Unexpected answer ($7F00) from ICD2 (%1).").tqarg(s));
+ log(Log::LineType::Error, i18n("Unexpected answer ($7F00) from ICD2 (%1).").arg(s));
return false;
}
// ??
if ( !command("08", 2) ) return false;
if ( _rx.mid(5, 2)!="00" ) {
- log(Log::LineType::Error, i18n("Unexpected answer (08) from ICD2 (%1).").tqarg(_rx));
+ log(Log::LineType::Error, i18n("Unexpected answer (08) from ICD2 (%1).").arg(_rx));
return false;
}
@@ -195,7 +195,7 @@ bool Icd2::Hardware::sendCommand(const TQString &s)
for (uint i=0; i<uint(s.length()); i++) chk += cs[i].latin1();
tx += toHex(chk, 2);
tx += '>';
- log(Log::DebugLevel::Extra, TQString("send command: '%1'").tqarg(tx));
+ log(Log::DebugLevel::Extra, TQString("send command: '%1'").arg(tx));
TQByteArray a = toAscii(tx);
return _port->send(a.data(), a.count());
}
@@ -207,7 +207,7 @@ bool Icd2::Hardware::receiveResponse(const TQString &command, uint responseSize,
if ( poll && _port->type()==PortType::USB ) {
if ( !static_cast<USBPort *>(_port)->poll(size, _rx) ) return false;
} else if ( !_port->receive(size, _rx, 180000) ) return false; // is 3 minutes enough ?? (we should really have an abort button here...)
- log(Log::DebugLevel::Extra, TQString("received answer: '%1'").tqarg(_rx));
+ log(Log::DebugLevel::Extra, TQString("received answer: '%1'").arg(_rx));
if ( size!=fromHex(_rx.mid(1, 2), 0) ) {
log(Log::LineType::Error, i18n("Received length too short."));
return false;
@@ -217,12 +217,12 @@ bool Icd2::Hardware::receiveResponse(const TQString &command, uint responseSize,
return false;
}
if ( _rx[0]!='[' || _rx[size-1]!=']' ) {
- log(Log::LineType::Error, i18n("Malformed string received \"%1\"").tqarg(_rx));
+ log(Log::LineType::Error, i18n("Malformed string received \"%1\"").arg(_rx));
return false;
}
if ( command.mid(0, 2)!=_rx.mid(3, 2) ) {
log(Log::LineType::Error, i18n("Wrong return value (\"%1\"; was expecting \"%2\")")
- .tqarg(_rx.mid(3, 2)).tqarg(command.mid(0, 2)));
+ .arg(_rx.mid(3, 2)).arg(command.mid(0, 2)));
return false;
}
// verify the checksum
@@ -348,7 +348,7 @@ bool Icd2::Hardware::readBlock(uint nbBytesWord, uint nbWords, Device::Array &da
TQString cs = s.mid(s.length()-3, 2);
if ( chk!=fromHex(cs, 0) ) {
- log(Log::LineType::Error, i18n("Bad checksum for read block: %1 (%2 expected).").tqarg(cs).tqarg(toHex(chk, 2)));
+ log(Log::LineType::Error, i18n("Bad checksum for read block: %1 (%2 expected).").arg(cs).arg(toHex(chk, 2)));
return false;
}
return true;
@@ -392,7 +392,7 @@ bool Icd2::Hardware::readMemory(Pic::MemoryRangeType type, uint wordOffset,
bool Icd2::Hardware::writeBlock(uint nbBytesWord, const Device::Array &data, uint wordIndex, uint nbWords)
{
- log(Log::DebugLevel::Extra, TQString("writeBlock offset:%1 nbWords:%2 (size: %3)").tqarg(toHex(wordIndex, 8)).tqarg(toHex(nbWords, 8)).tqarg(toHex(data.size(), 8)));
+ log(Log::DebugLevel::Extra, TQString("writeBlock offset:%1 nbWords:%2 (size: %3)").arg(toHex(wordIndex, 8)).arg(toHex(nbWords, 8)).arg(toHex(data.size(), 8)));
Q_ASSERT( wordIndex+nbWords<=data.size() );
// prepare data
TQString s = "{";
diff --git a/src/progs/icd2/base/icd2_debug.cpp b/src/progs/icd2/base/icd2_debug.cpp
index 5d4a35f..6beb0e9 100644
--- a/src/progs/icd2/base/icd2_debug.cpp
+++ b/src/progs/icd2/base/icd2_debug.cpp
@@ -27,7 +27,7 @@ bool Icd2::Debugger::waitForTargetMode(Pic::TargetMode mode)
Port::msleep(200);
}
log(Log::LineType::Error, TQString("Timeout waiting for mode: %1 (target is in mode: %2).")
- .tqarg(i18n(Pic::TARGET_MODE_LABELS[mode])).tqarg(i18n(Pic::TARGET_MODE_LABELS[rmode])));
+ .arg(i18n(Pic::TARGET_MODE_LABELS[mode])).arg(i18n(Pic::TARGET_MODE_LABELS[rmode])));
return false;
}
@@ -59,7 +59,7 @@ bool Icd2::Debugger::setBreakpoints(const TQValueList<Address> &addresses)
{
if ( addresses.count()==0 ) return specific()->setBreakpoint(Address());
for (uint i=0; i<uint(addresses.count()); i++) {
- log(Log::DebugLevel::Normal, TQString("Set breakpoint at %1").tqarg(toHexLabel(addresses[i], device()->nbCharsAddress())));
+ log(Log::DebugLevel::Normal, TQString("Set breakpoint at %1").arg(toHexLabel(addresses[i], device()->nbCharsAddress())));
if ( !specific()->setBreakpoint(addresses[i]) ) return false;
}
return true;
@@ -147,25 +147,25 @@ bool Icd2::DebugProgrammer::internalSetupHardware()
if ( device()->is18Family() ) {
Debugger *debug = static_cast<Debugger *>(debugger());
reservedBank = static_cast<const P18FDebuggerSpecific *>(debug->specific())->reservedBank();
- filename = TQString("de18F_BANK%1.hex").tqarg(TQString(toString(NumberBase::Dec, reservedBank, 2)));
- } else filename = TQString("de%1.hex").tqarg(fdata.debugExec);
+ filename = TQString("de18F_BANK%1.hex").arg(TQString(toString(NumberBase::Dec, reservedBank, 2)));
+ } else filename = TQString("de%1.hex").arg(fdata.debugExec);
PURL::Url url = dir.findMatchingFilename(filename);
- log(Log::DebugLevel::Normal, TQString(" Debug executive file: %1").tqarg(url.pretty()));
+ log(Log::DebugLevel::Normal, TQString(" Debug executive file: %1").arg(url.pretty()));
if ( !url.exists() ) {
- log(Log::LineType::Error, i18n("Could not find debug executive file \"%1\".").tqarg(url.pretty()));
+ log(Log::LineType::Error, i18n("Could not find debug executive file \"%1\".").arg(url.pretty()));
return false;
}
// upload hex file
Log::StringView sview;
PURL::File file(url, sview);
if ( !file.openForRead() ) {
- log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").tqarg(url.pretty()));
+ log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").arg(url.pretty()));
return false;
}
TQStringList errors;
HexBuffer hbuffer;
if ( !hbuffer.load(file.stream(), errors) ) {
- log(Log::LineType::Error, i18n("Could not read debug executive file \"%1\": %2.").tqarg(url.pretty()).tqarg(errors[0]));
+ log(Log::LineType::Error, i18n("Could not read debug executive file \"%1\": %2.").arg(url.pretty()).arg(errors[0]));
return false;
}
uint nbWords = device()->nbWords(Pic::MemoryRangeType::Code);
@@ -199,7 +199,7 @@ bool Icd2::DebugProgrammer::internalSetupHardware()
_deStart = specific()->findNonMaskStart(Pic::MemoryRangeType::Code, _deArray);
_deEnd = specific()->findNonMaskEnd(Pic::MemoryRangeType::Code, _deArray);
}
- log(Log::DebugLevel::Extra, TQString("debug executive: \"%1\" %2:%3").tqarg(url.pretty()).tqarg(toHexLabel(_deStart, 4)).tqarg(toHexLabel(_deEnd, 4)));
+ log(Log::DebugLevel::Extra, TQString("debug executive: \"%1\" %2:%3").arg(url.pretty()).arg(toHexLabel(_deStart, 4)).arg(toHexLabel(_deEnd, 4)));
return Icd2::ProgrammerBase::internalSetupHardware();
}
@@ -251,9 +251,9 @@ bool Icd2::DebugProgrammer::writeDebugExecutive()
uint inc = device()->addressIncrement(Pic::MemoryRangeType::Code);
Address address = device()->range(Pic::MemoryRangeType::Code).start + inc * (_deStart + i);
log(Log::LineType::Error, i18n("Device memory doesn't match debug executive (at address %1: reading %2 and expecting %3).")
- .tqarg(toHexLabel(address, device()->nbCharsAddress()))
- .tqarg(toHexLabel(data[i], device()->nbCharsWord(Pic::MemoryRangeType::Code)))
- .tqarg(toHexLabel(_deArray[_deStart+i], device()->nbCharsWord(Pic::MemoryRangeType::Code))));
+ .arg(toHexLabel(address, device()->nbCharsAddress()))
+ .arg(toHexLabel(data[i], device()->nbCharsWord(Pic::MemoryRangeType::Code)))
+ .arg(toHexLabel(_deArray[_deStart+i], device()->nbCharsWord(Pic::MemoryRangeType::Code))));
return false;
}
return true;
@@ -311,7 +311,7 @@ bool Icd2::DebugProgrammer::internalRead(Device::Memory *mem, const Device::Memo
bool Icd2::DebugProgrammer::readDebugExecutiveVersion()
{
if ( !hardware()->getDebugExecVersion(_debugExecutiveVersion) ) return false;
- log(Log::LineType::Information, i18n(" Debug executive version: %1").tqarg(_debugExecutiveVersion.pretty()));
+ log(Log::LineType::Information, i18n(" Debug executive version: %1").arg(_debugExecutiveVersion.pretty()));
return true;
}
diff --git a/src/progs/icd2/base/icd2_debug_specific.cpp b/src/progs/icd2/base/icd2_debug_specific.cpp
index cd05d06..f856a61 100644
--- a/src/progs/icd2/base/icd2_debug_specific.cpp
+++ b/src/progs/icd2/base/icd2_debug_specific.cpp
@@ -50,7 +50,7 @@ bool Icd2::P16FDebuggerSpecific::beginInit(Device::Array *saved)
if ( !hardware()->setTargetReset(Pic::ResetHeld) ) return false;
double vdd;
if ( !hardware()->readVoltage(Pic::TargetVdd, vdd) ) return false;
- log(Log::DebugLevel::Normal, TQString(" Target Vdd: %1 V").tqarg(vdd));
+ log(Log::DebugLevel::Normal, TQString(" Target Vdd: %1 V").arg(vdd));
if (saved) {
saved->resize(1);
@@ -73,14 +73,14 @@ bool Icd2::P16FDebuggerSpecific::endInit(BitValue expectedPC)
//log(Log::LineType::Information, i18n("Detected custom ICD2"));
}
if ( value!=expectedPC ) {
- log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(value, 4)));
+ log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(value, 4)));
return false;
}
if ( !setBreakpoint(0x0000) ) return false;
if ( !base().update() ) return false;
if ( base().pc()!=expectedPC ) {
- log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(base().pc(), 4)));
+ log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(base().pc(), 4)));
return false;
}
return true;
@@ -163,7 +163,7 @@ bool Icd2::P16F7X7DebuggerSpecific::init(bool last)
log(Log::DebugLevel::Normal, "Probably detected custom ICD2");
}
if ( value!=expectedPC )
- log(Log::DebugLevel::Normal, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(value, 4)));
+ log(Log::DebugLevel::Normal, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(value, 4)));
if ( !setBreakpoint(0x0000) ) return false;
if ( !base().update() ) return false;
@@ -241,7 +241,7 @@ bool Icd2::P18FDebuggerSpecific::reset()
log(Log::LineType::Information, i18n("Detected custom ICD2"));
}
if ( base().pc()!=expectedPC ) {
- log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(toHexLabel(base().pc(), 4)));
+ log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(base().pc(), 4)));
return false;
}
return true;
diff --git a/src/progs/icd2/base/icd2_prog.cpp b/src/progs/icd2/base/icd2_prog.cpp
index dbea1d3..71300e1 100644
--- a/src/progs/icd2/base/icd2_prog.cpp
+++ b/src/progs/icd2/base/icd2_prog.cpp
@@ -52,8 +52,8 @@ bool Icd2::ProgrammerBase::selfTest(bool ask)
if ( i!=0 ) s += "; ";
s += _testData.pretty(TestData::VoltageType(i));
}
- log(Log::LineType::Warning, i18n("Self-test failed: %1").tqarg(s));
- if ( ask && !askContinue(i18n("Self-test failed (%1). Do you want to continue anyway?").tqarg(s)) ) {
+ log(Log::LineType::Warning, i18n("Self-test failed: %1").arg(s));
+ if ( ask && !askContinue(i18n("Self-test failed (%1). Do you want to continue anyway?").arg(s)) ) {
logUserAbort();
return false;
}
@@ -77,7 +77,7 @@ VersionData Icd2::ProgrammerBase::mplabVersion(::Programmer::FirmwareVersionType
bool Icd2::ProgrammerBase::setupFirmware()
{
const FamilyData &fdata = FAMILY_DATA[family(device()->name())];
- log(Log::DebugLevel::Normal, TQString(" Firmware id is %1 and we want %2").tqarg(_firmwareId).tqarg(fdata.efid));
+ log(Log::DebugLevel::Normal, TQString(" Firmware id is %1 and we want %2").arg(_firmwareId).arg(fdata.efid));
if ( fdata.efid==_firmwareId ) return true;
log(Log::LineType::Information, i18n(" Incorrect firmware loaded."));
@@ -87,17 +87,17 @@ bool Icd2::ProgrammerBase::setupFirmware()
TQString nameFilter = "ICD" + TQString::number(fdata.efid).rightJustify(2, '0') + "??????.hex";
TQStringList files = dir.files(nameFilter);
if ( files.isEmpty() ) {
- log(Log::LineType::Error, i18n("Could not find firmware file \"%1\" in directory \"%2\".").tqarg(nameFilter).tqarg(dir.path()));
+ log(Log::LineType::Error, i18n("Could not find firmware file \"%1\" in directory \"%2\".").arg(nameFilter).arg(dir.path()));
return false;
}
// upload hex file
PURL::Url url(dir, files[files.count()-1]);
- log(Log::DebugLevel::Normal, TQString(" Firmware file: %1").tqarg(url.pretty()));
+ log(Log::DebugLevel::Normal, TQString(" Firmware file: %1").arg(url.pretty()));
Log::StringView sview;
PURL::File file(url, sview);
if ( !file.openForRead() ) {
- log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").tqarg(url.pretty()));
+ log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").arg(url.pretty()));
return false;
}
if ( !doUploadFirmware(file) ) return false;
diff --git a/src/progs/icd2/base/icd2_serial.cpp b/src/progs/icd2/base/icd2_serial.cpp
index 7f276f0..5a25462 100644
--- a/src/progs/icd2/base/icd2_serial.cpp
+++ b/src/progs/icd2/base/icd2_serial.cpp
@@ -40,7 +40,7 @@ bool Icd2::SerialHardware::internalConnect(const TQString &mode)
if ( !_port->send(a.data(), a.count()) ) return false;
if ( !_port->receive(1, s) ) return false;
if ( s.upper()!=mode ) {
- log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").tqarg(mode));
+ log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").arg(mode));
return false;
}
//log(Log::Debug, "set fast speed");
diff --git a/src/progs/icd2/base/icd2_usb.cpp b/src/progs/icd2/base/icd2_usb.cpp
index 7cc2458..61fd5ae 100644
--- a/src/progs/icd2/base/icd2_usb.cpp
+++ b/src/progs/icd2/base/icd2_usb.cpp
@@ -128,7 +128,7 @@ bool Icd2::USBPort::poll(uint size, TQMemArray<uchar> &a)
if ( !doSequence(Poll, (char *)a.data(), size) ) return false;
if (_poll) break;
}
- //log(Log::DebugLevel::Max, TQString("Receiced: \"%1\"").tqarg(toPrintable((const char *)a.data(), size)));
+ //log(Log::DebugLevel::Max, TQString("Receiced: \"%1\"").arg(toPrintable((const char *)a.data(), size)));
return true;
}
@@ -152,7 +152,7 @@ Icd2::USBHardware::USBHardware(::Programmer::Base &base)
bool Icd2::USBHardware::internalConnect(const TQString &mode)
{
// load control messages for USB device if needed
- log(Log::DebugLevel::Extra, TQString("need firmware ? %1").tqarg(USBPort::findDevice(Microchip::VENDOR_ID, ID_FIRMWARE)!=0));
+ log(Log::DebugLevel::Extra, TQString("need firmware ? %1").arg(USBPort::findDevice(Microchip::VENDOR_ID, ID_FIRMWARE)!=0));
if ( Port::USB::findDevice(Microchip::VENDOR_ID, ID_FIRMWARE) ) {
USBPort port(ID_FIRMWARE, *this);
if ( !port.open() ) return false;
@@ -163,7 +163,7 @@ bool Icd2::USBHardware::internalConnect(const TQString &mode)
}
port.close();
for (uint i=0; i<10; i++) {
- log(Log::DebugLevel::Extra, TQString("client here ? %1").tqarg(USBPort::findDevice(Microchip::VENDOR_ID, ID_CLIENT)!=0));
+ log(Log::DebugLevel::Extra, TQString("client here ? %1").arg(USBPort::findDevice(Microchip::VENDOR_ID, ID_CLIENT)!=0));
if ( Port::USB::findDevice(Microchip::VENDOR_ID, ID_CLIENT) ) break;
Port::msleep(1000);
}
diff --git a/src/progs/icd2/base/icd_prog.cpp b/src/progs/icd2/base/icd_prog.cpp
index 00f7c25..3923650 100644
--- a/src/progs/icd2/base/icd_prog.cpp
+++ b/src/progs/icd2/base/icd_prog.cpp
@@ -19,7 +19,7 @@ bool Icd::ProgrammerBase::doUploadFirmware(PURL::File &file)
TQStringList errors, warnings;
Pic::Memory::WarningTypes warningTypes;
if ( !memory.load(file.stream(), errors, warningTypes, warnings) ) {
- log(Log::LineType::Error, i18n("Could not read firmware hex file \"%1\": %2.").tqarg(file.url().pretty()).tqarg(errors[0]));
+ log(Log::LineType::Error, i18n("Could not read firmware hex file \"%1\": %2.").arg(file.url().pretty()).arg(errors[0]));
return false;
}
if ( warningTypes!=Pic::Memory::NoWarning ) {
diff --git a/src/progs/icd2/xml/xml_icd2_parser.cpp b/src/progs/icd2/xml/xml_icd2_parser.cpp
index 06eed27..5cb1196 100644
--- a/src/progs/icd2/xml/xml_icd2_parser.cpp
+++ b/src/progs/icd2/xml/xml_icd2_parser.cpp
@@ -29,7 +29,7 @@ uint Icd2::XmlToData::familyIndex(const TQString &family) const
uint i = 0;
for (; Icd2::FAMILY_DATA[i].efid!=0; i++)
if ( family==Icd2::FAMILY_DATA[i].name ) break;
- if ( Icd2::FAMILY_DATA[i].efid==0 ) qFatal(TQString("Family \"%1\" is unknown").tqarg(family));
+ if ( Icd2::FAMILY_DATA[i].efid==0 ) qFatal(TQString("Family \"%1\" is unknown").arg(family));
return i;
}
diff --git a/src/progs/manager/debug_manager.cpp b/src/progs/manager/debug_manager.cpp
index 7a47d5b..0ae4e9f 100644
--- a/src/progs/manager/debug_manager.cpp
+++ b/src/progs/manager/debug_manager.cpp
@@ -81,7 +81,7 @@ bool Debugger::Manager::internalInit()
if ( !coffUrl().exists() ) return false;
Log::Base log;
log.setView(compileView());
- log.log(Log::LineType::Information, i18n("Parsing COFF file: %1").tqarg(coffUrl().pretty()));
+ log.log(Log::LineType::Information, i18n("Parsing COFF file: %1").arg(coffUrl().pretty()));
_coff = new Coff::TextObject(_data, coffUrl());
if ( !_coff->parse(log) ) {
delete _coff;
@@ -110,7 +110,7 @@ void Debugger::Manager::freeActiveBreakpoint()
uint max = programmerGroup()->maxNbBreakpoints(deviceData());
Q_ASSERT( nb<=max && max!=0 );
if ( nb==max ) {
- log(Log::LineType::Warning, i18n("The number of active breakpoints is higher than the maximum for the current debugger (%1): disabling the last breakpoint.").tqarg(max));
+ log(Log::LineType::Warning, i18n("The number of active breakpoints is higher than the maximum for the current debugger (%1): disabling the last breakpoint.").arg(max));
Breakpoint::list().setState(last, Breakpoint::Disabled);
}
}
@@ -384,7 +384,7 @@ bool Debugger::Manager::prepareDebugging()
break;
}
if ( i==Programmer::Nb_InputFileTypes ) {
- log(Log::LineType::Error, i18n("Cannot start debugging session without input file (%1).").tqarg(first.pretty()));
+ log(Log::LineType::Error, i18n("Cannot start debugging session without input file (%1).").arg(first.pretty()));
return false;
}
}
diff --git a/src/progs/manager/prog_manager.cpp b/src/progs/manager/prog_manager.cpp
index fddd60c..dac29ee 100644
--- a/src/progs/manager/prog_manager.cpp
+++ b/src/progs/manager/prog_manager.cpp
@@ -61,8 +61,8 @@ bool Programmer::Manager::internalInitProgramming(bool)
}
if ( !group().isSupported(device()->name()) ) {
if ( group().isSoftware() && group().supportedDevices().isEmpty() )
- sorry(i18n("Could not detect supported devices for \"%1\". Please check installation.").tqarg(group().label()));
- else sorry(i18n("The current programmer \"%1\" does not support device \"%2\".").tqarg(group().label()).tqarg(device()->name()));
+ sorry(i18n("Could not detect supported devices for \"%1\". Please check installation.").arg(group().label()));
+ else sorry(i18n("The current programmer \"%1\" does not support device \"%2\".").arg(group().label()).arg(device()->name()));
return false;
}
createProgrammer(device());
diff --git a/src/progs/picdem_bootloader/base/picdem_bootloader.cpp b/src/progs/picdem_bootloader/base/picdem_bootloader.cpp
index 347ec52..1e06537 100644
--- a/src/progs/picdem_bootloader/base/picdem_bootloader.cpp
+++ b/src/progs/picdem_bootloader/base/picdem_bootloader.cpp
@@ -42,13 +42,13 @@ bool PicdemBootloader::Port::receive(uint nb, TQMemArray<uchar> &data)
{
data.resize(nb);
if ( !read(0x81, (char *)data.data(), nb) ) return false;
- log(Log::DebugLevel::Max, TQString("received: \"%1\"").tqarg(toPrintable(data, PrintEscapeAll)));
+ log(Log::DebugLevel::Max, TQString("received: \"%1\"").arg(toPrintable(data, PrintEscapeAll)));
return true;
}
bool PicdemBootloader::Port::send(const TQMemArray<uchar> &cmd)
{
- log(Log::DebugLevel::Extra, TQString("send: \"%1\"").tqarg(toPrintable(cmd, PrintEscapeAll)));
+ log(Log::DebugLevel::Extra, TQString("send: \"%1\"").arg(toPrintable(cmd, PrintEscapeAll)));
return write(0x01, (const char *)cmd.data(), cmd.count());
}
@@ -81,7 +81,7 @@ bool PicdemBootloader::Hardware::internalConnectHardware()
cmd.fill(0);
if ( !port().sendAndReceive(cmd, 4) ) return false;
VersionData version(cmd[3], cmd[2], 0);
- log(Log::LineType::Information, i18n("Bootloader version %1 detected").tqarg(version.pretty()));
+ log(Log::LineType::Information, i18n("Bootloader version %1 detected").arg(version.pretty()));
if ( version.majorNum()!=1 ) {
log(Log::LineType::Error, i18n("Only bootloader version 1.x is supported"));
return false;
@@ -108,7 +108,7 @@ bool PicdemBootloader::Hardware::write(Pic::MemoryRangeType type, const Device::
if ( i>=0x400 ) continue;
if ( data[i]==device().mask(Pic::MemoryRangeType::Code) ) continue;
uint address = device().addressIncrement(Pic::MemoryRangeType::Code) * i;
- log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").tqarg(toHexLabel(address, device().nbCharsAddress())));
+ log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").arg(toHexLabel(address, device().nbCharsAddress())));
break;
}
}
@@ -157,9 +157,9 @@ bool PicdemBootloader::Hardware::read(Pic::MemoryRangeType type, Device::Array &
if ( nbBytesWord==2 ) data[index] |= (cmd[5 + k+1] << 8);
if ( vdata && index>=0x0800 && data[index]!=varray[index] ) {
log(Log::LineType::Error, i18n("Device memory does not match hex file (at address 0x%2: reading 0x%3 and expecting 0x%4).")
- .tqarg(TQString(toHex(index/2, device().nbCharsAddress())))
- .tqarg(TQString(toHex(data[index], device().nbCharsWord(type))))
- .tqarg(TQString(toHex(varray[index], device().nbCharsWord(type)))));
+ .arg(TQString(toHex(index/2, device().nbCharsAddress())))
+ .arg(TQString(toHex(data[index], device().nbCharsWord(type))))
+ .arg(TQString(toHex(varray[index], device().nbCharsWord(type)))));
return false;
}
}
diff --git a/src/progs/pickit1/base/pickit1.cpp b/src/progs/pickit1/base/pickit1.cpp
index 55d98e4..31d5787 100644
--- a/src/progs/pickit1/base/pickit1.cpp
+++ b/src/progs/pickit1/base/pickit1.cpp
@@ -38,7 +38,7 @@ bool Pickit1::Baseline::incrementPC(uint nb)
Array cmd;
uint high = (nb >> 8) & 0xFF;
log(Log::DebugLevel::Extra, TQString("work around bug in firmware (nb_inc=%1 high=%2)")
- .tqarg(toHexLabel(nb, 4)).tqarg(toHexLabel(high, 2)));
+ .arg(toHexLabel(nb, 4)).arg(toHexLabel(high, 2)));
if ( high==1 ) {
cmd[0] = 'I';
cmd[1] = 0x40;
diff --git a/src/progs/pickit2/base/pickit.cpp b/src/progs/pickit2/base/pickit.cpp
index 3344ef8..e6284e1 100644
--- a/src/progs/pickit2/base/pickit.cpp
+++ b/src/progs/pickit2/base/pickit.cpp
@@ -52,14 +52,14 @@ bool Pickit::USBPort::command(const char *s)
bool Pickit::USBPort::command(const Array &cmd)
{
- log(Log::DebugLevel::Extra, TQString("send command: \"%1\"").tqarg(cmd.pretty()));
+ log(Log::DebugLevel::Extra, TQString("send command: \"%1\"").arg(cmd.pretty()));
return write(writeEndPoint(), (const char *)cmd._data.data(), cmd.length());
}
bool Pickit::USBPort::receive(Pickit::Array &array)
{
if ( !read(readEndPoint(), (char *)array._data.data(), array.length()) ) return false;
- log(Log::DebugLevel::Max, TQString("received: \"%1\"").tqarg(array.pretty()));
+ log(Log::DebugLevel::Max, TQString("received: \"%1\"").arg(array.pretty()));
return true;
}
@@ -80,7 +80,7 @@ bool Pickit::USBPort::getMode(VersionData &version, ::Programmer::Mode &mode)
bool Pickit::USBPort::receiveWords(uint nbBytesWord, uint nbRead, TQValueVector<uint> &words, uint offset)
{
- log(Log::DebugLevel::Max, TQString("receive words nbBytesWord=%1 nbRead=%2 offset=%3").tqarg(nbBytesWord).tqarg(nbRead).tqarg(offset));
+ log(Log::DebugLevel::Max, TQString("receive words nbBytesWord=%1 nbRead=%2 offset=%3").arg(nbBytesWord).arg(nbRead).arg(offset));
Array a = array();
TQMemArray<uchar> data(nbRead*a.length());
uint l = 0;
diff --git a/src/progs/pickit2/base/pickit2.cpp b/src/progs/pickit2/base/pickit2.cpp
index 6a010ff..4c06eb9 100644
--- a/src/progs/pickit2/base/pickit2.cpp
+++ b/src/progs/pickit2/base/pickit2.cpp
@@ -50,9 +50,9 @@ bool Pickit2::USBPort::readFirmwareCodeMemory(Device::Array &data, const Device:
data[index]= read[5 + 2*k] & 0xFF | (read[6 + 2*k] << 8);
if ( vdata && index>=0x1000 && index<0x3FF0 && data[index]!=(*vdata)[index] ) {
log(Log::LineType::Error, i18n("Firmware memory does not match hex file (at address 0x%2: reading 0x%3 and expecting 0x%4).")
- .tqarg(TQString(toHex(index/2, device->nbCharsAddress())))
- .tqarg(TQString(toHex(data[index], device->nbCharsWord(Pic::MemoryRangeType::Code))))
- .tqarg(TQString(toHex((*vdata)[index], device->nbCharsWord(Pic::MemoryRangeType::Code)))));
+ .arg(TQString(toHex(index/2, device->nbCharsAddress())))
+ .arg(TQString(toHex(data[index], device->nbCharsWord(Pic::MemoryRangeType::Code))))
+ .arg(TQString(toHex((*vdata)[index], device->nbCharsWord(Pic::MemoryRangeType::Code)))));
return false;
}
}
@@ -111,7 +111,7 @@ bool Pickit2::USBPort::uploadFirmware(const Pic::Memory &memory, ProgressMonitor
//-----------------------------------------------------------------------------
bool Pickit2::Hardware::readVoltages(VoltagesData &voltages)
{
- log(Log::DebugLevel::Extra, TQString("readVoltages: Firmware is %1").tqarg(_base.firmwareVersion().pretty()));
+ log(Log::DebugLevel::Extra, TQString("readVoltages: Firmware is %1").arg(_base.firmwareVersion().pretty()));
if ( _base.firmwareVersion()<VersionData(1, 20, 0) ) {
log(Log::LineType::Warning, i18n("Cannot read voltages with this firmware version."));
return true;
@@ -128,9 +128,9 @@ bool Pickit2::Hardware::readVoltages(VoltagesData &voltages)
bool Pickit2::Hardware::setVddVpp(double vdd, double vpp)
{
- log(Log::DebugLevel::Extra, TQString("setVddVpp: Firmware is %1").tqarg(_base.firmwareVersion().pretty()));
+ log(Log::DebugLevel::Extra, TQString("setVddVpp: Firmware is %1").arg(_base.firmwareVersion().pretty()));
if ( _base.firmwareVersion()<VersionData(1, 20, 0) ) return true;
- log(Log::DebugLevel::Normal, TQString(" set Vdd = %1 V and Vpp = %2 V").tqarg(vdd).tqarg(vpp));
+ log(Log::DebugLevel::Normal, TQString(" set Vdd = %1 V and Vpp = %2 V").arg(vdd).arg(vpp));
Array cmd;
cmd[0] = 's';
uint cvdd = uint(32.0 * vdd + 12.5);
diff --git a/src/progs/pickit2/base/pickit2_prog.cpp b/src/progs/pickit2/base/pickit2_prog.cpp
index 3e3a2bd..071f3b0 100644
--- a/src/progs/pickit2/base/pickit2_prog.cpp
+++ b/src/progs/pickit2/base/pickit2_prog.cpp
@@ -53,7 +53,7 @@ bool Pickit2::Base::doUploadFirmware(PURL::File &file)
TQStringList errors, warnings;
Pic::Memory::WarningTypes warningTypes;
if ( !memory.load(file.stream(), errors, warningTypes, warnings) ) {
- log(Log::LineType::Error, i18n("Could not read firmware hex file \"%1\" (%2).").tqarg(file.url().pretty()).tqarg(errors[0]));
+ log(Log::LineType::Error, i18n("Could not read firmware hex file \"%1\" (%2).").arg(file.url().pretty()).arg(errors[0]));
return false;
}
if ( warningTypes!=Pic::Memory::NoWarning ) {
diff --git a/src/progs/pickit2/base/pickit_prog.cpp b/src/progs/pickit2/base/pickit_prog.cpp
index f894906..39d13f8 100644
--- a/src/progs/pickit2/base/pickit_prog.cpp
+++ b/src/progs/pickit2/base/pickit_prog.cpp
@@ -28,22 +28,22 @@ bool Pickit::Base::readFirmwareVersion()
bool Pickit::Base::regenerateOsccal(const PURL::Url &url)
{
- log(Log::DebugLevel::Normal, TQString(" Calibration firmware file: %1").tqarg(url.pretty()));
+ log(Log::DebugLevel::Normal, TQString(" Calibration firmware file: %1").arg(url.pretty()));
Log::StringView sview;
PURL::File file(url, sview);
if ( !file.openForRead() ) {
- log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").tqarg(url.pretty()));
+ log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").arg(url.pretty()));
return false;
}
Pic::Memory memory(*device());
TQStringList errors, warnings;
Pic::Memory::WarningTypes warningTypes;
if ( !memory.load(file.stream(), errors, warningTypes, warnings) ) {
- log(Log::LineType::Error, i18n("Could not read calibration firmware file \"%1\" (%2).").tqarg(url.pretty()).tqarg(errors[0]));
+ log(Log::LineType::Error, i18n("Could not read calibration firmware file \"%1\" (%2).").arg(url.pretty()).arg(errors[0]));
return false;
}
if ( warningTypes!=Pic::Memory::NoWarning ) {
- log(Log::LineType::Error, i18n("Calibration firmware file seems incompatible with selected device %1.").tqarg(device()->name()));
+ log(Log::LineType::Error, i18n("Calibration firmware file seems incompatible with selected device %1.").arg(device()->name()));
return false;
}
if ( !askContinue(i18n("This will overwrite the device code memory. Continue anyway?")) ) return false;
diff --git a/src/progs/pickit2_bootloader/base/pickit2_bootloader.cpp b/src/progs/pickit2_bootloader/base/pickit2_bootloader.cpp
index 7620a9b..d080481 100644
--- a/src/progs/pickit2_bootloader/base/pickit2_bootloader.cpp
+++ b/src/progs/pickit2_bootloader/base/pickit2_bootloader.cpp
@@ -33,7 +33,7 @@ bool Pickit2Bootloader::Hardware::internalConnectHardware()
}
}
}
- log(Log::LineType::Information, i18n("Bootloader version %1 detected.").tqarg(version.pretty()));
+ log(Log::LineType::Information, i18n("Bootloader version %1 detected.").arg(version.pretty()));
if ( version.majorNum()!=2 ) {
log(Log::LineType::Error, i18n("Only bootloader version 2.x is supported."));
return false;
@@ -50,7 +50,7 @@ bool Pickit2Bootloader::Hardware::write(Pic::MemoryRangeType type, const Device:
if ( i>=0x1000 && i<0x3FF0 ) continue;
if ( data[i]==device().mask(Pic::MemoryRangeType::Code) ) continue;
uint address = device().addressIncrement(Pic::MemoryRangeType::Code) * i;
- log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").tqarg(toHexLabel(address, device().nbCharsAddress())));
+ log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").arg(toHexLabel(address, device().nbCharsAddress())));
break;
}
return port().writeFirmwareCodeMemory(data, _base.progressMonitor());
diff --git a/src/progs/pickit2v2/base/pickit2v2.cpp b/src/progs/pickit2v2/base/pickit2v2.cpp
index fbd9997..a79484b 100644
--- a/src/progs/pickit2v2/base/pickit2v2.cpp
+++ b/src/progs/pickit2v2/base/pickit2v2.cpp
@@ -68,7 +68,7 @@ bool Pickit2V2::Hardware::executeScript(uint i)
{
Q_ASSERT( i!=0 );
const ScriptData &sdata = SCRIPT_DATA[i-1];
- log(Log::DebugLevel::Extra, TQString("execute script #%1: %2").tqarg(i).tqarg(sdata.name));
+ log(Log::DebugLevel::Extra, TQString("execute script #%1: %2").arg(i).arg(sdata.name));
return sendScript(sdata.data, sdata.length);
}
@@ -78,7 +78,7 @@ bool Pickit2V2::Hardware::getScriptBufferChecksum(uint &checksum)
Array array;
if ( !port().receive(array) ) return false;
checksum = (array[0] << 24) + (array[1] << 16) + (array[2] << 8) + array[3];
- log(Log::DebugLevel::Extra, TQString("get script buffer checksum: %1").tqarg(toHexLabel(checksum, 8)));
+ log(Log::DebugLevel::Extra, TQString("get script buffer checksum: %1").arg(toHexLabel(checksum, 8)));
return true;
}
@@ -87,7 +87,7 @@ bool Pickit2V2::Hardware::downloadScript(ScriptType type, uint i)
if (i==0 ) return true; // empty script
const ScriptData &sdata = SCRIPT_DATA[i-1];
log(Log::DebugLevel::Max, TQString(" download script #%1 (\"%2\") at position #%3")
- .tqarg(i-1).tqarg(sdata.name).tqarg(toHexLabel(type, 2)));
+ .arg(i-1).arg(sdata.name).arg(toHexLabel(type, 2)));
Array cmd;
cmd[0] = DownloadScript;
cmd[1] = type;
@@ -168,7 +168,7 @@ bool Pickit2V2::Hardware::setVppVoltage(double value, double threshold)
bool Pickit2V2::Hardware::setVddOn(bool on)
{
- log(Log::DebugLevel::Extra, TQString("Vdd set to %1, self powered is %2").tqarg(on).tqarg(_base.isTargetSelfPowered()));
+ log(Log::DebugLevel::Extra, TQString("Vdd set to %1, self powered is %2").arg(on).arg(_base.isTargetSelfPowered()));
ushort script[2];
script[0] = (on ? VddGroundOff : VddOff);
if ( _base.isTargetSelfPowered() ) script[1] = (on ? VddOff : VddGroundOff);
@@ -215,7 +215,7 @@ bool Pickit2V2::Hardware::readVoltages(VoltagesData &voltagesData)
bool Pickit2V2::Hardware::downloadAddress(Address address)
{
- log(Log::DebugLevel::Max, TQString("download address %1").tqarg(toHexLabel(address, 6)));
+ log(Log::DebugLevel::Max, TQString("download address %1").arg(toHexLabel(address, 6)));
Array cmd;
cmd[0] = ClearDownloadBuffer;
cmd[1] = DownloadData;
@@ -229,7 +229,7 @@ bool Pickit2V2::Hardware::downloadAddress(Address address)
bool Pickit2V2::Hardware::runScript(ScriptType stype, uint repetitions, uint nbNoLens)
{
log(Log::DebugLevel::Max, TQString("run script %1: repetitions=%2 nbNoLen=%3")
- .tqarg(toHexLabel(stype, 2)).tqarg(repetitions).tqarg(nbNoLens));
+ .arg(toHexLabel(stype, 2)).arg(repetitions).arg(nbNoLens));
#if 0 // ALTERNATE METHOD
const Data &d = data(device().name());
for (uint i=0; i<repetitions; i++)
@@ -283,7 +283,7 @@ bool Pickit2V2::Hardware::readMemory(Pic::MemoryRangeType otype, Device::Array &
{
uint nbWords = device().nbWords(otype);
data.resize(nbWords);
- log(Log::DebugLevel::Max, TQString("read %1 nbWords=%2").tqarg(otype.label()).tqarg(nbWords));
+ log(Log::DebugLevel::Max, TQString("read %1 nbWords=%2").arg(otype.label()).arg(nbWords));
uint nbBytesWord = device().nbBytesWord(otype);
// EEPROM is read like regular program memory in midrange
if ( !device().is18Family() && !device().is16bitFamily() && otype==Pic::MemoryRangeType::Eeprom ) nbBytesWord = 2;
@@ -322,7 +322,7 @@ bool Pickit2V2::Hardware::readMemory(Pic::MemoryRangeType otype, Device::Array &
if ( !runScript(stype, nbRuns, nbReceive) ) return false;
if ( !port().receiveWords(nbBytesWord, nbReceive, words) ) return false;
}
- log(Log::DebugLevel::Max, TQString("nbRunWords=%1 readNbWords=%2 index=%3/%4").tqarg(nbRunWords).tqarg(words.count()).tqarg(i).tqarg(nbWords));
+ log(Log::DebugLevel::Max, TQString("nbRunWords=%1 readNbWords=%2 index=%3/%4").arg(nbRunWords).arg(words.count()).arg(i).arg(nbWords));
for (uint k=0; k<words.count(); k++) {
if ( i>=nbWords ) break;
data[i] = words[k];
diff --git a/src/progs/pickit2v2/base/pickit2v2_prog.cpp b/src/progs/pickit2v2/base/pickit2v2_prog.cpp
index ab378c4..74b82b6 100644
--- a/src/progs/pickit2v2/base/pickit2v2_prog.cpp
+++ b/src/progs/pickit2v2/base/pickit2v2_prog.cpp
@@ -59,7 +59,7 @@ bool Pickit2V2::Base::identifyDevice()
if ( !hardware().executeScript(fdata.progExitScript) ) return false;
uint rawId = (data[2]<<8) + data[1];
if (fdata.progMemShift) rawId >>= 1;
- log(Log::DebugLevel::Normal, TQString("Read id for family %1: %2").tqarg(fdata.architecture.key()).tqarg(toHexLabelAbs(rawId)));
+ log(Log::DebugLevel::Normal, TQString("Read id for family %1: %2").arg(fdata.architecture.key()).arg(toHexLabelAbs(rawId)));
TQMap<TQString, Device::IdData> ids;
::Group::Base::ConstIterator it;
for (it=group().begin(); it!=group().end(); ++it) {
@@ -69,9 +69,9 @@ bool Pickit2V2::Base::identifyDevice()
if ( data->matchId(rawId, idata) ) ids[it.key()] = idata;
}
if ( ids.count()!=0 ) {
- log(Log::LineType::Information, i18n("Read id: %1").tqarg(device()->idNames(ids).join("; ")));
+ log(Log::LineType::Information, i18n("Read id: %1").arg(device()->idNames(ids).join("; ")));
if ( ids.contains(device()->name()) ) return true;
- message = i18n("Read id does not match the specified device name \"%1\".").tqarg(device()->name());
+ message = i18n("Read id does not match the specified device name \"%1\".").arg(device()->name());
break;
}
}
@@ -79,7 +79,7 @@ bool Pickit2V2::Base::identifyDevice()
logUserAbort();
return false;
}
- log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").tqarg(device()->name()));
+ log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").arg(device()->name()));
return true;
}
@@ -97,8 +97,8 @@ bool Pickit2V2::Base::selfTest(bool ask)
if ( status & VppError ) error += i18n("Vpp voltage level error; ");
if ( status & VddError ) error += i18n("Vdd voltage level error; ");
if ( error.isEmpty() ) return true;
- log(Log::LineType::Warning, i18n("Self-test failed: %1").tqarg(error));
- if ( ask && !askContinue(i18n("Self-test failed (%1). Do you want to continue anyway?").tqarg(error)) ) {
+ log(Log::LineType::Warning, i18n("Self-test failed: %1").arg(error));
+ if ( ask && !askContinue(i18n("Self-test failed (%1). Do you want to continue anyway?").arg(error)) ) {
logUserAbort();
return false;
}
diff --git a/src/progs/psp/base/psp.cpp b/src/progs/psp/base/psp.cpp
index 0f86180..96dcf4e 100644
--- a/src/progs/psp/base/psp.cpp
+++ b/src/progs/psp/base/psp.cpp
@@ -281,8 +281,8 @@ bool Psp::Hardware::readMemory(Pic::MemoryRangeType type, Device::Array &data, c
for (uint i=0; i<data.count(); i++) {
if ( !port()->receive(2, a) ) return false;
data[i] = (a[0] << 8) + a[1];
-// log(Log::DebugLevel::Max, TQString("code data %1: %2 (%3, %4)").tqarg(i).tqarg(toHexLabel(data[i], 4))
-// .tqarg(toHexLabel(a[0], 2)).tqarg(toHexLabel(a[1], 2)));
+// log(Log::DebugLevel::Max, TQString("code data %1: %2 (%3, %4)").arg(i).arg(toHexLabel(data[i], 4))
+// .arg(toHexLabel(a[0], 2)).arg(toHexLabel(a[1], 2)));
}
if ( !port()->receiveEnd() ) return false;
break;
diff --git a/src/progs/psp/base/psp_serial.cpp b/src/progs/psp/base/psp_serial.cpp
index 7da4c00..b29be31 100644
--- a/src/progs/psp/base/psp_serial.cpp
+++ b/src/progs/psp/base/psp_serial.cpp
@@ -48,7 +48,7 @@ bool Psp::SerialPort::reset()
bool Psp::SerialPort::command(uchar c, uint nbBytes, TQMemArray<uchar> &a)
{
- log(Log::DebugLevel::Extra, TQString("Command %1").tqarg(toHexLabel(c, 2)));
+ log(Log::DebugLevel::Extra, TQString("Command %1").arg(toHexLabel(c, 2)));
if ( !sendChar(c) ) return false;
return receive(nbBytes, a);
}
@@ -57,7 +57,7 @@ bool Psp::SerialPort::checkAck(uchar ec, uchar rc)
{
if ( ec==rc ) return true;
log(Log::LineType::Error, i18n("Incorrect ack: expecting %1, received %2")
- .tqarg(TQString(toHex(ec, 2))).tqarg(TQString(toHex(rc, 2))));
+ .arg(TQString(toHex(ec, 2))).arg(TQString(toHex(rc, 2))));
return false;
}
@@ -65,7 +65,7 @@ bool Psp::SerialPort::checkEnd(uchar c)
{
if ( c==0 ) return true;
log(Log::LineType::Error, i18n("Incorrect received data end: expecting 00, received %1")
- .tqarg(TQString(toHex(c, 2))));
+ .arg(TQString(toHex(c, 2))));
return false;
}
diff --git a/src/progs/sdcdb/base/sdcdb_debug.cpp b/src/progs/sdcdb/base/sdcdb_debug.cpp
index ba0e78f..3a7aa9f 100644
--- a/src/progs/sdcdb/base/sdcdb_debug.cpp
+++ b/src/progs/sdcdb/base/sdcdb_debug.cpp
@@ -125,7 +125,7 @@ bool GPSim::Debugger::getRegister(const TQString &name, BitValue &value)
for (; i<uint(lines.count()); i++)
if ( r.exactMatch(lines[i]) ) break;
if ( i==uint(lines.count()) ) {
- log(Log::Error, i18n("Error reading register \"%1\"").tqarg(name));
+ log(Log::Error, i18n("Error reading register \"%1\"").arg(name));
return false;
}
value = fromHex(r.cap(1), 0);
@@ -137,7 +137,7 @@ bool GPSim::Debugger::getRegister(Address address, BitValue &value)
const Pic::RegistersData &rdata = device()->registersData();
TQString name = toHex(address, rdata.nbCharsAddress());
if ( hardware()->version()<VersionData(0, 22, 0) ) return getRegister("0x" + name, value);
- return getRegister(TQString("ramData[$%1]").tqarg(name), value);
+ return getRegister(TQString("ramData[$%1]").arg(name), value);
}
bool GPSim::Debugger::readRegister(const Register::TypeData &data, BitValue &value)
@@ -161,14 +161,14 @@ bool GPSim::Debugger::setRegister(const TQString &name, BitValue value)
return true;
}
const Pic::RegistersData &rdata = device()->registersData();
- TQString s = TQString("%1 = %2").tqarg(name).tqarg(toHexLabel(value, rdata.nbChars()));
+ TQString s = TQString("%1 = %2").arg(name).arg(toHexLabel(value, rdata.nbChars()));
return hardware()->execute(s, true);
}
bool GPSim::Debugger::setRegister(Address address, BitValue value)
{
const Pic::RegistersData &rdata = device()->registersData();
- TQString s = TQString("ramData[$%1]").tqarg(toHex(address, rdata.nbCharsAddress()));
+ TQString s = TQString("ramData[$%1]").arg(toHex(address, rdata.nbCharsAddress()));
return setRegister(s, value);
}
@@ -203,7 +203,7 @@ bool GPSim::Debugger::updatePortStatus(uint index, TQMap<uint, Device::PortBitDa
if ( !hardware()->execute("symbol " + name, true, &lines) ) return false;
TQString pattern = "^(\\w+)=([^\\s])+\\s*", value;
if ( !findRegExp(lines, pattern, "bitState", value) || value.length()!=1 ) {
- log(Log::Error, i18n("Error reading state of IO bit: %1").tqarg(name));
+ log(Log::Error, i18n("Error reading state of IO bit: %1").arg(name));
return false;
}
switch (value[0].latin1()) {
@@ -217,24 +217,24 @@ bool GPSim::Debugger::updatePortStatus(uint index, TQMap<uint, Device::PortBitDa
case 'X': bits[i].state = Device::Unknown; break;
default:
bits[i].state = Device::Unknown;
- log(Log::Warning, i18n("Unknown state for IO bit: %1 (%2)").tqarg(name).tqarg(value));
+ log(Log::Warning, i18n("Unknown state for IO bit: %1 (%2)").arg(name).arg(value));
break;
}
if ( !findRegExp(lines, pattern, "Driving", value) || value.length()!=1 ) {
- log(Log::Error, i18n("Error reading driving state of IO bit: %1").tqarg(name));
+ log(Log::Error, i18n("Error reading driving state of IO bit: %1").arg(name));
return false;
}
bits[i].driving = ( value[0]=='1' );
if (bits[i].driving) {
if ( !findRegExp(lines, pattern, "drivingState", value) || value.length()!=1 ) {
- log(Log::Error, i18n("Error reading driving state of IO bit: %1").tqarg(name));
+ log(Log::Error, i18n("Error reading driving state of IO bit: %1").arg(name));
return false;
}
bits[i].drivingState = (value[0]=='0' ? Device::IoLow : Device::IoHigh);
bits[i].drivenState = Device::IoUnknown;
} else {
if ( !findRegExp(lines, pattern, "drivenState", value) || value.length()!=1 ) {
- log(Log::Error, i18n("Error reading driven state of IO bit: %1").tqarg(name));
+ log(Log::Error, i18n("Error reading driven state of IO bit: %1").arg(name));
return false;
}
bits[i].drivenState = (value[0]=='0' ? Device::IoLow : Device::IoHigh);
diff --git a/src/progs/tbl_bootloader/base/tbl_bootloader.cpp b/src/progs/tbl_bootloader/base/tbl_bootloader.cpp
index 3b8c324..381e827 100644
--- a/src/progs/tbl_bootloader/base/tbl_bootloader.cpp
+++ b/src/progs/tbl_bootloader/base/tbl_bootloader.cpp
@@ -81,12 +81,12 @@ bool TinyBootloader::Hardware::verifyDeviceId()
for (uint i=0; i<uint(list.count()); i++)
if ( _id==data(list[i]).id ) devices.append(list[i]);
if ( _id!=id ) {
- if ( devices.count()==0 ) log(Log::LineType::Error, i18n("Unknown id returned by bootloader (%1 read and %2 expected).").tqarg(toHexLabel(_id, 2)).tqarg(toHexLabel(id, 2)));
- else log(Log::LineType::Error, i18n("Id returned by bootloader corresponds to other devices: %1 (%2 read and %3 expected).").tqarg(devices.join(" ")).tqarg(toHexLabel(_id, 2)).tqarg(toHexLabel(id, 2)));
+ if ( devices.count()==0 ) log(Log::LineType::Error, i18n("Unknown id returned by bootloader (%1 read and %2 expected).").arg(toHexLabel(_id, 2)).arg(toHexLabel(id, 2)));
+ else log(Log::LineType::Error, i18n("Id returned by bootloader corresponds to other devices: %1 (%2 read and %3 expected).").arg(devices.join(" ")).arg(toHexLabel(_id, 2)).arg(toHexLabel(id, 2)));
// we can't ask for "continue anyway?" because bootloader can timeout...
return false;
}
- log(Log::LineType::Information, " " + i18n("Bootloader identified device as: %1").tqarg(devices.join(" ")));
+ log(Log::LineType::Information, " " + i18n("Bootloader identified device as: %1").arg(devices.join(" ")));
return true;
}
@@ -101,10 +101,10 @@ bool TinyBootloader::Hardware::waitReady(bool *checkCRC)
if (checkCRC) {
*checkCRC = false;
if ( c=='N' ) return true;
- log(Log::LineType::Error, i18n("Received unexpected character ('%1' received; 'K' or 'N' expected).").tqarg(toPrintable(c, PrintAlphaNum)));
+ log(Log::LineType::Error, i18n("Received unexpected character ('%1' received; 'K' or 'N' expected).").arg(toPrintable(c, PrintAlphaNum)));
return true;
}
- log(Log::LineType::Error, i18n("Received unexpected character ('%1' received; 'K' expected).").tqarg(toPrintable(c, PrintAlphaNum)));
+ log(Log::LineType::Error, i18n("Received unexpected character ('%1' received; 'K' expected).").arg(toPrintable(c, PrintAlphaNum)));
return false;
}
@@ -160,7 +160,7 @@ bool TinyBootloader::Hardware::writeCode(const Device::Array &data, bool erase)
for (uint i=nb; i<data.size(); i++) {
if ( data[i]==device().mask(Pic::MemoryRangeType::Code) ) continue;
uint address = device().addressIncrement(Pic::MemoryRangeType::Code) * i;
- log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").tqarg(toHexLabel(address, device().nbCharsAddress())));
+ log(Log::LineType::Warning, " " + i18n("Code is present in bootloader reserved area (at address %1). It will be ignored.").arg(toHexLabel(address, device().nbCharsAddress())));
break;
}
@@ -206,7 +206,7 @@ bool TinyBootloader::Hardware::writeCode(const Device::Array &data, bool erase)
if ( !sendCodeAddress(address, crc) ) return false;
uint nbw = device().nbBytesWord(Pic::MemoryRangeType::Code);
if ( !sendChar(nbw*nbWords, &crc) ) return false;
- log(Log::DebugLevel::Normal, TQString("write code memory at %1: %2 bytes").tqarg(toHexLabel(address, 4)).tqarg(2*nbWords));
+ log(Log::DebugLevel::Normal, TQString("write code memory at %1: %2 bytes").arg(toHexLabel(address, 4)).arg(2*nbWords));
for(uint k=0; k<nbWords; k++) {
if ( !sendChar(wdata[i+k].byte(0), &crc) ) return false; // data low
if ( !sendChar(wdata[i+k].byte(1), &crc) ) return false; // data high