diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
commit | 0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch) | |
tree | b95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/devices/pic/prog/pic_prog_specific.cpp | |
parent | b79a2c28534cf09987eeeba3077fff9236df182a (diff) | |
download | piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip |
TQt4 port piklab
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/devices/pic/prog/pic_prog_specific.cpp')
-rw-r--r-- | src/devices/pic/prog/pic_prog_specific.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/devices/pic/prog/pic_prog_specific.cpp b/src/devices/pic/prog/pic_prog_specific.cpp index bfcd2fa..bca71b4 100644 --- a/src/devices/pic/prog/pic_prog_specific.cpp +++ b/src/devices/pic/prog/pic_prog_specific.cpp @@ -28,11 +28,11 @@ uint Programmer::PicDeviceSpecific::findNonMaskStart(Pic::MemoryRangeType type, { uint start = 0; for (; start<data.count(); start++) - if ( data[start]!=device().mask(type) ) break; - const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, QString("start before align: %1").arg(start)); + if ( data[start]!=device().tqmask(type) ) break; + const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("start before align: %1").tqarg(start)); uint align = device().nbWordsWriteAlignment(type); start -= start % align; - const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, QString("start after align: %1 (align=%2)").arg(start).arg(align)); + const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("start after align: %1 (align=%2)").tqarg(start).tqarg(align)); return start; } @@ -40,11 +40,11 @@ uint Programmer::PicDeviceSpecific::findNonMaskEnd(Pic::MemoryRangeType type, co { uint end = data.count()-1; for (; end>0; end--) - if ( data[end]!=device().mask(type) ) break; - const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, QString("end before align: %1").arg(end)); + if ( data[end]!=device().tqmask(type) ) break; + const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("end before align: %1").tqarg(end)); uint align = device().nbWordsWriteAlignment(type); if ( (end+1) % align ) end += align - (end+1) % align; - const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, QString("end after align: %1 (align=%2)").arg(end).arg(align)); + const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("end after align: %1 (align=%2)").tqarg(end).tqarg(align)); Q_ASSERT(end<data.count()); return end; } @@ -99,23 +99,23 @@ bool Programmer::PicHardware::compareWords(Pic::MemoryRangeType type, uint index Address address = device().range(type).start + inc * index; if ( actions & ::Programmer::BlankCheckVerify ) log(Log::LineType::SoftError, i18n("Device memory is not blank (in %1 at address %2: reading %3 and expecting %4).") - .arg(type.label()).arg(toHexLabel(address, device().nbCharsAddress())) - .arg(toHexLabel(d, device().nbCharsWord(type))).arg(toHexLabel(v, device().nbCharsWord(type)))); + .tqarg(type.label()).tqarg(toHexLabel(address, device().nbCharsAddress())) + .tqarg(toHexLabel(d, device().nbCharsWord(type))).tqarg(toHexLabel(v, device().nbCharsWord(type)))); else log(Log::LineType::SoftError, i18n("Device memory does not match hex file (in %1 at address %2: reading %3 and expecting %4).") - .arg(type.label()).arg(toHexLabel(address, device().nbCharsAddress())) - .arg(toHexLabel(d, device().nbCharsWord(type))).arg(toHexLabel(v, device().nbCharsWord(type)))); + .tqarg(type.label()).tqarg(toHexLabel(address, device().nbCharsAddress())) + .tqarg(toHexLabel(d, device().nbCharsWord(type))).tqarg(toHexLabel(v, device().nbCharsWord(type)))); return false; } bool Programmer::PicHardware::verifyWord(uint i, BitValue word, Pic::MemoryRangeType type, const VerifyData &vdata) { - if ( !(vdata.actions & ::Programmer::IgnoreProtectedVerify) && vdata.protectedRanges.contains(i) ) return true; // protected + if ( !(vdata.actions & ::Programmer::IgnoreProtectedVerify) && vdata.protectedRanges.tqcontains(i) ) return true; // protected BitValue v = static_cast<const Pic::Memory &>(vdata.memory).normalizedWord(type, i); BitValue d = static_cast<const Pic::Memory &>(vdata.memory).normalizeWord(type, i, word); if ( type==Pic::MemoryRangeType::Config ) { - BitValue pmask = device().config()._words[i].pmask; - v = v.clearMaskBits(pmask); - d = d.clearMaskBits(pmask); + BitValue ptqmask = device().config()._words[i].ptqmask; + v = v.clearMaskBits(ptqmask); + d = d.clearMaskBits(ptqmask); } return compareWords(type, i, v, d, vdata.actions); } |