diff options
author | Timothy Pearson <[email protected]> | 2011-12-19 11:40:25 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-19 11:40:25 -0600 |
commit | 4374b9aebc67cce74e5c1099d5f4ad1749b05fc6 (patch) | |
tree | 8f99491ad0bd6e9632a912f07acdccebd2af9127 /src/progs/pickit2v2/base | |
parent | 9d9fe02a944fe0719c2475739411727a729251ad (diff) | |
download | piklab-4374b9aebc67cce74e5c1099d5f4ad1749b05fc6.tar.gz piklab-4374b9aebc67cce74e5c1099d5f4ad1749b05fc6.zip |
Remove additional unneeded tq method conversions
Diffstat (limited to 'src/progs/pickit2v2/base')
-rw-r--r-- | src/progs/pickit2v2/base/pickit2v2.cpp | 16 | ||||
-rw-r--r-- | src/progs/pickit2v2/base/pickit2v2_prog.cpp | 12 |
2 files changed, 14 insertions, 14 deletions
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; } |