diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:57:30 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:57:30 -0600 |
commit | ad1fc5fc8eadb9b63e8767e57ac41cbac84f7eb7 (patch) | |
tree | c47273eb6595f763c282d33fb89affe1f8866120 /src/progs/icd2 | |
parent | 9d6927a7d6a543332f828bffedf65eecf6774c6d (diff) | |
download | piklab-ad1fc5fc8eadb9b63e8767e57ac41cbac84f7eb7.tar.gz piklab-ad1fc5fc8eadb9b63e8767e57ac41cbac84f7eb7.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 9d6927a7d6a543332f828bffedf65eecf6774c6d.
Diffstat (limited to 'src/progs/icd2')
-rw-r--r-- | src/progs/icd2/base/icd.cpp | 4 | ||||
-rw-r--r-- | src/progs/icd2/base/icd2.cpp | 16 | ||||
-rw-r--r-- | src/progs/icd2/base/icd2_debug.cpp | 26 | ||||
-rw-r--r-- | src/progs/icd2/base/icd2_debug_specific.cpp | 10 | ||||
-rw-r--r-- | src/progs/icd2/base/icd2_prog.cpp | 12 | ||||
-rw-r--r-- | src/progs/icd2/base/icd2_serial.cpp | 2 | ||||
-rw-r--r-- | src/progs/icd2/base/icd2_usb.cpp | 6 | ||||
-rw-r--r-- | src/progs/icd2/base/icd_prog.cpp | 2 | ||||
-rw-r--r-- | src/progs/icd2/xml/xml_icd2_parser.cpp | 2 |
9 files changed, 40 insertions, 40 deletions
diff --git a/src/progs/icd2/base/icd.cpp b/src/progs/icd2/base/icd.cpp index c926ca4..18e9574 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") - .arg(toHexLabel(wordOffset, device().nbCharsAddress())).arg(toHexLabel(nbWords, device().nbCharsAddress())) - .arg(toHexLabel(data.count(), device().nbCharsAddress())).arg(force ? "true" : "false")); + .tqarg(toHexLabel(wordOffset, device().nbCharsAddress())).tqarg(toHexLabel(nbWords, device().nbCharsAddress())) + .tqarg(toHexLabel(data.count(), device().nbCharsAddress())).tqarg(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 073dd26..6765340 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).").arg(s)); + log(Log::LineType::Error, i18n("Unexpected answer ($7F00) from ICD2 (%1).").tqarg(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).").arg(_rx)); + log(Log::LineType::Error, i18n("Unexpected answer (08) from ICD2 (%1).").tqarg(_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'").arg(tx)); + log(Log::DebugLevel::Extra, TQString("send command: '%1'").tqarg(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'").arg(_rx)); + log(Log::DebugLevel::Extra, TQString("received answer: '%1'").tqarg(_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\"").arg(_rx)); + log(Log::LineType::Error, i18n("Malformed string received \"%1\"").tqarg(_rx)); return false; } if ( command.mid(0, 2)!=_rx.mid(3, 2) ) { log(Log::LineType::Error, i18n("Wrong return value (\"%1\"; was expecting \"%2\")") - .arg(_rx.mid(3, 2)).arg(command.mid(0, 2))); + .tqarg(_rx.mid(3, 2)).tqarg(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).").arg(cs).arg(toHex(chk, 2))); + log(Log::LineType::Error, i18n("Bad checksum for read block: %1 (%2 expected).").tqarg(cs).tqarg(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)").arg(toHex(wordIndex, 8)).arg(toHex(nbWords, 8)).arg(toHex(data.size(), 8))); + 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))); 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 6beb0e9..5d4a35f 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).") - .arg(i18n(Pic::TARGET_MODE_LABELS[mode])).arg(i18n(Pic::TARGET_MODE_LABELS[rmode]))); + .tqarg(i18n(Pic::TARGET_MODE_LABELS[mode])).tqarg(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").arg(toHexLabel(addresses[i], device()->nbCharsAddress()))); + log(Log::DebugLevel::Normal, TQString("Set breakpoint at %1").tqarg(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").arg(TQString(toString(NumberBase::Dec, reservedBank, 2))); - } else filename = TQString("de%1.hex").arg(fdata.debugExec); + filename = TQString("de18F_BANK%1.hex").tqarg(TQString(toString(NumberBase::Dec, reservedBank, 2))); + } else filename = TQString("de%1.hex").tqarg(fdata.debugExec); PURL::Url url = dir.findMatchingFilename(filename); - log(Log::DebugLevel::Normal, TQString(" Debug executive file: %1").arg(url.pretty())); + log(Log::DebugLevel::Normal, TQString(" Debug executive file: %1").tqarg(url.pretty())); if ( !url.exists() ) { - log(Log::LineType::Error, i18n("Could not find debug executive file \"%1\".").arg(url.pretty())); + log(Log::LineType::Error, i18n("Could not find debug executive file \"%1\".").tqarg(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\".").arg(url.pretty())); + log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").tqarg(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.").arg(url.pretty()).arg(errors[0])); + log(Log::LineType::Error, i18n("Could not read debug executive file \"%1\": %2.").tqarg(url.pretty()).tqarg(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").arg(url.pretty()).arg(toHexLabel(_deStart, 4)).arg(toHexLabel(_deEnd, 4))); + log(Log::DebugLevel::Extra, TQString("debug executive: \"%1\" %2:%3").tqarg(url.pretty()).tqarg(toHexLabel(_deStart, 4)).tqarg(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).") - .arg(toHexLabel(address, device()->nbCharsAddress())) - .arg(toHexLabel(data[i], device()->nbCharsWord(Pic::MemoryRangeType::Code))) - .arg(toHexLabel(_deArray[_deStart+i], device()->nbCharsWord(Pic::MemoryRangeType::Code)))); + .tqarg(toHexLabel(address, device()->nbCharsAddress())) + .tqarg(toHexLabel(data[i], device()->nbCharsWord(Pic::MemoryRangeType::Code))) + .tqarg(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").arg(_debugExecutiveVersion.pretty())); + log(Log::LineType::Information, i18n(" Debug executive version: %1").tqarg(_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 f856a61..cd05d06 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").arg(vdd)); + log(Log::DebugLevel::Normal, TQString(" Target Vdd: %1 V").tqarg(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)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(value, 4))); + log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(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)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(base().pc(), 4))); + log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(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)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(value, 4))); + log(Log::DebugLevel::Normal, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(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)").arg(toHexLabel(expectedPC, 4)).arg(toHexLabel(base().pc(), 4))); + log(Log::LineType::Error, i18n(" PC is not at address %1 (%2)").tqarg(toHexLabel(expectedPC, 4)).tqarg(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 71300e1..dbea1d3 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").arg(s)); - if ( ask && !askContinue(i18n("Self-test failed (%1). Do you want to continue anyway?").arg(s)) ) { + 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)) ) { 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").arg(_firmwareId).arg(fdata.efid)); + log(Log::DebugLevel::Normal, TQString(" Firmware id is %1 and we want %2").tqarg(_firmwareId).tqarg(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\".").arg(nameFilter).arg(dir.path())); + log(Log::LineType::Error, i18n("Could not find firmware file \"%1\" in directory \"%2\".").tqarg(nameFilter).tqarg(dir.path())); return false; } // upload hex file PURL::Url url(dir, files[files.count()-1]); - log(Log::DebugLevel::Normal, TQString(" Firmware file: %1").arg(url.pretty())); + log(Log::DebugLevel::Normal, TQString(" Firmware file: %1").tqarg(url.pretty())); Log::StringView sview; PURL::File file(url, sview); if ( !file.openForRead() ) { - log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").arg(url.pretty())); + log(Log::LineType::Error, i18n("Could not open firmware file \"%1\".").tqarg(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 5a25462..7f276f0 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'.").arg(mode)); + log(Log::LineType::Error, i18n("Failed to set port mode to '%1'.").tqarg(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 61fd5ae..7cc2458 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\"").arg(toPrintable((const char *)a.data(), size))); + //log(Log::DebugLevel::Max, TQString("Receiced: \"%1\"").tqarg(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").arg(USBPort::findDevice(Microchip::VENDOR_ID, ID_FIRMWARE)!=0)); + log(Log::DebugLevel::Extra, TQString("need firmware ? %1").tqarg(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").arg(USBPort::findDevice(Microchip::VENDOR_ID, ID_CLIENT)!=0)); + log(Log::DebugLevel::Extra, TQString("client here ? %1").tqarg(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 3923650..00f7c25 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.").arg(file.url().pretty()).arg(errors[0])); + log(Log::LineType::Error, i18n("Could not read firmware hex file \"%1\": %2.").tqarg(file.url().pretty()).tqarg(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 5cb1196..06eed27 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").arg(family)); + if ( Icd2::FAMILY_DATA[i].efid==0 ) qFatal(TQString("Family \"%1\" is unknown").tqarg(family)); return i; } |