From ad1fc5fc8eadb9b63e8767e57ac41cbac84f7eb7 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 16 Dec 2011 09:57:30 -0600 Subject: Revert "Rename a number of old tq methods that are no longer tq specific" This reverts commit 9d6927a7d6a543332f828bffedf65eecf6774c6d. --- src/devices/base/device_group.cpp | 24 +++--- src/devices/base/device_group.h | 2 +- src/devices/base/generic_device.cpp | 2 +- src/devices/base/generic_device.h | 10 +-- src/devices/base/generic_memory.cpp | 2 +- src/devices/base/hex_buffer.cpp | 8 +- src/devices/base/register.cpp | 2 +- src/devices/gui/memory_editor.cpp | 2 +- src/devices/gui/register_view.cpp | 10 +-- src/devices/mem24/gui/mem24_hex_view.cpp | 2 +- src/devices/mem24/gui/mem24_memory_editor.cpp | 2 +- src/devices/mem24/mem24/mem24_group.cpp | 4 +- src/devices/mem24/mem24/mem24_memory.cpp | 2 +- src/devices/mem24/prog/mem24_prog.cpp | 4 +- src/devices/mem24/xml/mem24_xml_to_data.cpp | 4 +- src/devices/pic/base/pic.cpp | 12 +-- src/devices/pic/base/pic_config.cpp | 4 +- src/devices/pic/base/pic_protection.cpp | 8 +- src/devices/pic/base/pic_register.cpp | 2 +- src/devices/pic/gui/pic_config_editor.cpp | 2 +- src/devices/pic/gui/pic_config_word_editor.cpp | 4 +- src/devices/pic/gui/pic_group_ui.cpp | 2 +- src/devices/pic/gui/pic_hex_view.cpp | 2 +- src/devices/pic/gui/pic_memory_editor.cpp | 10 +-- src/devices/pic/gui/pic_prog_group_ui.cpp | 2 +- src/devices/pic/gui/pic_register_view.cpp | 10 +-- src/devices/pic/pic/pic_group.cpp | 8 +- src/devices/pic/pic/pic_memory.cpp | 2 +- src/devices/pic/prog/pic_debug.cpp | 22 ++--- src/devices/pic/prog/pic_debug.h | 6 +- src/devices/pic/prog/pic_prog.cpp | 56 ++++++------ src/devices/pic/prog/pic_prog_specific.cpp | 16 ++-- src/devices/pic/xml/pic_xml_to_data.cpp | 114 ++++++++++++------------- 33 files changed, 181 insertions(+), 181 deletions(-) (limited to 'src/devices') diff --git a/src/devices/base/device_group.cpp b/src/devices/base/device_group.cpp index db70264..94586bd 100644 --- a/src/devices/base/device_group.cpp +++ b/src/devices/base/device_group.cpp @@ -12,16 +12,16 @@ # include # include -TQColor Device::statusColor(Status status) +TQColor Device::statusColor(tqStatus status) { switch (status.type()) { - case Status::Future: return TQt::blue; - case Status::InProduction: return TQt::green; - case Status::Mature: - case Status::NotRecommended: return TQColor("orange"); - case Status::EOL: return TQt::red; - case Status::Unknown: - case Status::Nb_Types: break; + case tqStatus::Future: return TQt::blue; + case tqStatus::InProduction: return TQt::green; + case tqStatus::Mature: + case tqStatus::NotRecommended: return TQColor("orange"); + case tqStatus::EOL: return TQt::red; + case tqStatus::Unknown: + case tqStatus::Nb_Types: break; } return TQt::black; } @@ -232,8 +232,8 @@ TQString Device::htmlInfo(const Device::Data &data, const TQString &deviceHref, if ( i!=0 ) s += ", "; if ( deviceHref.isEmpty() ) s += data.alternatives()[i].upper(); else { - TQString href = deviceHref.arg(data.alternatives()[i].upper()); - s += TQString("%2").arg(href).arg(data.alternatives()[i].upper()); + TQString href = deviceHref.tqarg(data.alternatives()[i].upper()); + s += TQString("%2").tqarg(href).tqarg(data.alternatives()[i].upper()); } } doc += htmlTableRow(i18n("Alternatives"), s); @@ -247,7 +247,7 @@ TQString Device::htmlInfo(const Device::Data &data, const TQString &deviceHref, TQString s; for (uint i=0; i &boxes); extern const Package *barPackage(const char *name, const Data &data); extern TQPixmap pinsGraph(const Package &package); diff --git a/src/devices/base/generic_device.cpp b/src/devices/base/generic_device.cpp index d147e4b..c0109de 100644 --- a/src/devices/base/generic_device.cpp +++ b/src/devices/base/generic_device.cpp @@ -13,7 +13,7 @@ #include "register.h" //----------------------------------------------------------------------------- -const Device::Status::Data Device::Status::DATA[Nb_Types] = { +const Device::tqStatus::Data Device::tqStatus::DATA[Nb_Types] = { { "IP", I18N_NOOP("In Production") }, { "Future", I18N_NOOP("Future Product") }, { "NR", I18N_NOOP("Not Recommended for New Design") }, diff --git a/src/devices/base/generic_device.h b/src/devices/base/generic_device.h index 373601c..73f9b15 100644 --- a/src/devices/base/generic_device.h +++ b/src/devices/base/generic_device.h @@ -19,9 +19,9 @@ namespace Device { //---------------------------------------------------------------------------- -BEGIN_DECLARE_ENUM(Status) +BEGIN_DECLARE_ENUM(tqStatus) InProduction = 0, Future, NotRecommended, EOL, Unknown, Mature -END_DECLARE_ENUM_STD(Status) +END_DECLARE_ENUM_STD(tqStatus) BEGIN_DECLARE_ENUM(MemoryTechnology) Flash = 0, Eprom, Rom, Romless @@ -70,7 +70,7 @@ public: enum { MAX_NB = 9 }; struct TypeData { const char *name, *label; - Shape shape; + Shape tqshape; uint nbPins[MAX_NB]; }; static const TypeData TYPE_DATA[]; @@ -121,7 +121,7 @@ public: virtual TQString name() const { return _name; } virtual TQString fname(Special) const { return _name; } virtual TQString listViewGroup() const = 0; - Status status() const { return _status; } + tqStatus status() const { return _status; } const Documents &documents() const { return _documents; } const TQStringList &alternatives() const { return _alternatives; } MemoryTechnology memoryTechnology() const { return _memoryTechnology; } @@ -141,7 +141,7 @@ protected: TQString _name; Documents _documents; TQStringList _alternatives; - Status _status; + tqStatus _status; TQValueVector _frequencyRanges; MemoryTechnology _memoryTechnology; RegistersData *_registersData; diff --git a/src/devices/base/generic_memory.cpp b/src/devices/base/generic_memory.cpp index 6430497..54190f5 100644 --- a/src/devices/base/generic_memory.cpp +++ b/src/devices/base/generic_memory.cpp @@ -31,7 +31,7 @@ Device::Memory::WarningTypes Device::Memory::fromHexBuffer(const HexBuffer &hb, if ( !it.data().isInitialized() || inRange[it.key()] ) continue; if ( !(result & ValueOutsideRange) ) { result |= ValueOutsideRange; - warnings += i18n("At least one value (at address %1) is defined outside memory ranges.").arg(toHexLabel(it.key(), 8)); + warnings += i18n("At least one value (at address %1) is defined outside memory ranges.").tqarg(toHexLabel(it.key(), 8)); } break; } diff --git a/src/devices/base/hex_buffer.cpp b/src/devices/base/hex_buffer.cpp index a0a4704..f389c92 100644 --- a/src/devices/base/hex_buffer.cpp +++ b/src/devices/base/hex_buffer.cpp @@ -9,7 +9,7 @@ ***************************************************************************/ #include "hex_buffer.h" -#include +#include #include "devices/base/generic_device.h" @@ -136,10 +136,10 @@ bool HexBuffer::fetchNextBlock(const_iterator& it, const const_iterator &end, in TQString HexBuffer::ErrorData::message() const { switch (type) { - case UnrecognizedFormat: return i18n("Unrecognized format (line %1).").arg(line); + case UnrecognizedFormat: return i18n("Unrecognized format (line %1).").tqarg(line); case UnexpectedEOF: return i18n("Unexpected end-of-file."); - case UnexpectedEOL: return i18n("Unexpected end-of-line (line %1).").arg(line); - case WrongCRC: return i18n("CRC mismatch (line %1).").arg(line); + case UnexpectedEOL: return i18n("Unexpected end-of-line (line %1).").tqarg(line); + case WrongCRC: return i18n("CRC mismatch (line %1).").tqarg(line); } Q_ASSERT(false); return TQString(); diff --git a/src/devices/base/register.cpp b/src/devices/base/register.cpp index d6ff59c..946f668 100644 --- a/src/devices/base/register.cpp +++ b/src/devices/base/register.cpp @@ -48,7 +48,7 @@ Register::Type Register::TypeData::type() const TQString Register::TypeData::toString() const { - return TQString("%1 %2 %3").arg(toLabel(_address)).arg(_nbChars).arg(_name); + return TQString("%1 %2 %3").tqarg(toLabel(_address)).tqarg(_nbChars).tqarg(_name); } Register::TypeData Register::TypeData::fromString(const TQString &s) diff --git a/src/devices/gui/memory_editor.cpp b/src/devices/gui/memory_editor.cpp index d46b6c4..bee291e 100644 --- a/src/devices/gui/memory_editor.cpp +++ b/src/devices/gui/memory_editor.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/devices/gui/register_view.cpp b/src/devices/gui/register_view.cpp index bd444c9..264a04b 100644 --- a/src/devices/gui/register_view.cpp +++ b/src/devices/gui/register_view.cpp @@ -43,7 +43,7 @@ void Register::PortBitListViewItem::updateView() else text += (pdata[_bit].drivenState==Device::IoHigh ? "1" : "0"); } setText(2, text); - repaint(); + tqrepaint(); } void Register::PortBitListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align) @@ -114,7 +114,7 @@ void Register::ListViewItem::updateView() if ( _data.type()!=Special ) setText(0, toHexLabel(_data.address(), nbCharsAddress()) + ":"); setText(1, label()); setText(2, text()); - repaint(); + tqrepaint(); for (uint i=0; i<_items.count(); i++) _items[i]->updateView(); } @@ -145,8 +145,8 @@ TQString Register::ListViewItem::tooltip(int col) const if ( isprint(c) ) s = c + s; else s = "." + s; } - return TQString("%1 - %2 - \"%3\"").arg(toHexLabel(value, _data.nbChars())) - .arg(toLabel(NumberBase::Bin, value, 4*_data.nbChars())).arg(s); + return TQString("%1 - %2 - \"%3\"").tqarg(toHexLabel(value, _data.nbChars())) + .tqarg(toLabel(NumberBase::Bin, value, 4*_data.nbChars())).tqarg(s); } TQWidget *Register::ListViewItem::editWidgetFactory(int col) const @@ -176,7 +176,7 @@ void Register::LineEdit::updateText() setText(_value.isInitialized() ? toLabel(_base, _value, _nbChars) : "--"); uint w = 2*frameWidth() + maxLabelWidth(_base, _nbChars, font()); setFixedWidth(w+5); - setFixedHeight(minimumSizeHint().height()); + setFixedHeight(tqminimumSizeHint().height()); } void Register::LineEdit::setValue(NumberBase base, BitValue value, uint nbChars) diff --git a/src/devices/mem24/gui/mem24_hex_view.cpp b/src/devices/mem24/gui/mem24_hex_view.cpp index c732731..349e2fc 100644 --- a/src/devices/mem24/gui/mem24_hex_view.cpp +++ b/src/devices/mem24/gui/mem24_hex_view.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "mem24_hex_view.h" -#include +#include #include #include diff --git a/src/devices/mem24/gui/mem24_memory_editor.cpp b/src/devices/mem24/gui/mem24_memory_editor.cpp index 27ed4a7..c395b17 100644 --- a/src/devices/mem24/gui/mem24_memory_editor.cpp +++ b/src/devices/mem24/gui/mem24_memory_editor.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "mem24_memory_editor.h" -#include +#include #include #include diff --git a/src/devices/mem24/mem24/mem24_group.cpp b/src/devices/mem24/mem24/mem24_group.cpp index 00ca072..f396027 100644 --- a/src/devices/mem24/mem24/mem24_group.cpp +++ b/src/devices/mem24/mem24/mem24_group.cpp @@ -18,7 +18,7 @@ Device::Memory *Mem24::Group::createMemory(const Device::Data &data) const TQString Mem24::Group::informationHtml(const Device::Data &data) const { const Mem24::Data &mdata = static_cast(data); - TQString tmp = i18n("%1 bytes").arg(formatNumber(mdata.nbBytes())); + TQString tmp = i18n("%1 bytes").tqarg(formatNumber(mdata.nbBytes())); return htmlTableRow(i18n("Memory Size"), tmp); } @@ -35,7 +35,7 @@ TQPixmap Mem24::Group::memoryGraph(const Device::Data &data) const data.endAddress = offset - 1; data.start = toHexLabel(data.startAddress, mdata.nbCharsAddress()); data.end = toHexLabel(data.endAddress, mdata.nbCharsAddress()); - data.label = i18n("Block #%1").arg(i+1); + data.label = i18n("Block #%1").tqarg(i+1); ranges.append(data); } return Device::memoryGraph(ranges); diff --git a/src/devices/mem24/mem24/mem24_memory.cpp b/src/devices/mem24/mem24/mem24_memory.cpp index aba1cbf..f3ce758 100644 --- a/src/devices/mem24/mem24/mem24_memory.cpp +++ b/src/devices/mem24/mem24/mem24_memory.cpp @@ -84,7 +84,7 @@ void Mem24::Memory::fromHexBuffer(const HexBuffer &hb, WarningTypes &result, if ( !(result & ValueTooLarge) && !_data[k].isInside(mask) ) { result |= ValueTooLarge; warnings += i18n("At least one word (at offset %1) is larger (%2) than the corresponding mask (%3).") - .arg(toHexLabel(k, 8)).arg(toHexLabel(_data[k], 8)).arg(toHexLabel(mask, 8)); + .tqarg(toHexLabel(k, 8)).tqarg(toHexLabel(_data[k], 8)).tqarg(toHexLabel(mask, 8)); } _data[k] = _data[k].maskWith(mask); } diff --git a/src/devices/mem24/prog/mem24_prog.cpp b/src/devices/mem24/prog/mem24_prog.cpp index 4c4b201..82c596c 100644 --- a/src/devices/mem24/prog/mem24_prog.cpp +++ b/src/devices/mem24/prog/mem24_prog.cpp @@ -38,9 +38,9 @@ bool Programmer::Mem24DeviceSpecific::verifyByte(uint index, BitValue d, const V Address address = index; if ( vdata.actions & BlankCheckVerify ) log(Log::LineType::Error, i18n("Device memory is not blank (at address %1: reading %2 and expecting %3).") - .arg(toHexLabel(address, device().nbCharsAddress())).arg(toHexLabel(d, 2)).arg(toHexLabel(v, 2))); + .tqarg(toHexLabel(address, device().nbCharsAddress())).tqarg(toHexLabel(d, 2)).tqarg(toHexLabel(v, 2))); else log(Log::LineType::Error, i18n("Device memory doesn't match hex file (at address %1: reading %2 and expecting %3).") - .arg(toHexLabel(address, device().nbCharsAddress())).arg(toHexLabel(d, 2)).arg(toHexLabel(v, 2))); + .tqarg(toHexLabel(address, device().nbCharsAddress())).tqarg(toHexLabel(d, 2)).tqarg(toHexLabel(v, 2))); return false; } diff --git a/src/devices/mem24/xml/mem24_xml_to_data.cpp b/src/devices/mem24/xml/mem24_xml_to_data.cpp index e73d7bb..81fd7bb 100644 --- a/src/devices/mem24/xml/mem24_xml_to_data.cpp +++ b/src/devices/mem24/xml/mem24_xml_to_data.cpp @@ -7,7 +7,7 @@ * (at your option) any later version. * ***************************************************************************/ #include -#include +#include #include "xml_to_data/device_xml_to_data.h" #include "common/common/misc.h" @@ -49,7 +49,7 @@ virtual void checkPins(const TQMap &pinLabels) const if ( !pinLabels.contains("VSS") ) qFatal("No VSS pin specified"); TQMap::const_iterator it; for (it=pinLabels.begin(); it!=pinLabels.end(); ++it) - if ( it.data()!=1 ) qFatal(TQString("Duplicated pin %1").arg(it.key())); + if ( it.data()!=1 ) qFatal(TQString("Duplicated pin %1").tqarg(it.key())); } }; // class diff --git a/src/devices/pic/base/pic.cpp b/src/devices/pic/base/pic.cpp index 75e6bf4..94267e2 100644 --- a/src/devices/pic/base/pic.cpp +++ b/src/devices/pic/base/pic.cpp @@ -212,17 +212,17 @@ TQStringList Pic::Data::idNames(const TQMap &ids) cons case Architecture::P18C: case Architecture::P18F: case Architecture::P18J: - list += i18n("%1 (rev. %2)").arg(it.key()).arg(toLabel(it.data().revision)); + list += i18n("%1 (rev. %2)").tqarg(it.key()).tqarg(toLabel(it.data().revision)); break; case Architecture::P24F: - list += i18n("%1 (rev. %2.%3)").arg(it.key()).arg(toLabel(it.data().revision)).arg(toLabel(it.data().minorRevision)); + list += i18n("%1 (rev. %2.%3)").tqarg(it.key()).tqarg(toLabel(it.data().revision)).tqarg(toLabel(it.data().minorRevision)); break; case Architecture::P30F: - list += i18n("%1 (proc. %2; rev. %3.%4)").arg(it.key()).arg(toLabel(it.data().process)).arg(toLabel(it.data().revision)).arg(toLabel(it.data().minorRevision)); + list += i18n("%1 (proc. %2; rev. %3.%4)").tqarg(it.key()).tqarg(toLabel(it.data().process)).tqarg(toLabel(it.data().revision)).tqarg(toLabel(it.data().minorRevision)); break; case Architecture::P24H: case Architecture::P33F: - list += i18n("%1 (rev. %2)").arg(it.key()).arg(toLabel(it.data().revision)); + list += i18n("%1 (rev. %2)").tqarg(it.key()).tqarg(toLabel(it.data().revision)); break; case Architecture::Nb_Types: Q_ASSERT(false); break; } @@ -236,14 +236,14 @@ bool Pic::Data::checkCalibration(const Device::Array &data, TQString *message) c for (uint i=0; i &Pic::Config::masks() (*_masks)[DATA[i].mask.name] = MapData(i, -1); if ( DATA[i].type==MemoryRange ) { for (uint k=0; k=0 ) return i18n("%1 for block %2").arg(s).arg(mp.block); + if ( mp.block>=0 ) return i18n("%1 for block %2").tqarg(s).tqarg(mp.block); return s; } diff --git a/src/devices/pic/base/pic_protection.cpp b/src/devices/pic/base/pic_protection.cpp index 8fac920..d91f1f7 100644 --- a/src/devices/pic/base/pic_protection.cpp +++ b/src/devices/pic/base/pic_protection.cpp @@ -30,7 +30,7 @@ Pic::Protection::Family Pic::Protection::family() const { if ( _config.findMask("WRTBS") ) return CodeGuard; TQString mask = maskName(ProgramProtected, MemoryRangeType::Code); - if ( _config.findMask(TQString("%1_%2").arg(mask).arg(0)) ) return BlockProtection; + if ( _config.findMask(TQString("%1_%2").tqarg(mask).tqarg(0)) ) return BlockProtection; if ( _config.findMask(mask) ) return BasicProtection; return NoProtection; } @@ -79,7 +79,7 @@ TQString Pic::Protection::blockMaskName(Type type, uint block) const if ( type==StandardSecurity || type==HighSecurity ) return (block==0 ? "SSSEC" : "GSSEC"); return TQString(); } - return TQString("%1_%2").arg(maskName(type, MemoryRangeType::Code)).arg(block); + return TQString("%1_%2").tqarg(maskName(type, MemoryRangeType::Code)).tqarg(block); } TQString Pic::Protection::maskName(Type type, MemoryRangeType mtype) const @@ -341,7 +341,7 @@ uint Pic::Protection::nbBlocks() const { if ( family()==CodeGuard ) return 2; // codeguard : secure segment + general segment for (uint i=0; i"; case Sfr: return sfrNames[address]; } diff --git a/src/devices/pic/gui/pic_config_editor.cpp b/src/devices/pic/gui/pic_config_editor.cpp index 193891a..4b70c3d 100644 --- a/src/devices/pic/gui/pic_config_editor.cpp +++ b/src/devices/pic/gui/pic_config_editor.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "pic_config_editor.h" -#include +#include #include #include diff --git a/src/devices/pic/gui/pic_config_word_editor.cpp b/src/devices/pic/gui/pic_config_word_editor.cpp index 773ed03..67c5cc9 100644 --- a/src/devices/pic/gui/pic_config_word_editor.cpp +++ b/src/devices/pic/gui/pic_config_word_editor.cpp @@ -10,7 +10,7 @@ #include "pic_config_word_editor.h" #include -#include +#include #include #include @@ -114,7 +114,7 @@ Pic::ConfigWordEditor::ConfigWordEditor(Memory &memory, uint ci, bool withWordEd connect(_mdb, TQT_SIGNAL(modified()), TQT_SLOT(updateDisplay())); hbox->addWidget(_mdb); KPushButton *button = new KPushButton(i18n("Details..."), this); - button->setFixedHeight(button->sizeHint().height()); + button->setFixedHeight(button->tqsizeHint().height()); connect(button, TQT_SIGNAL(clicked()), TQT_SLOT(showDialog())); hbox->addWidget(button); hbox->addStretch(1); diff --git a/src/devices/pic/gui/pic_group_ui.cpp b/src/devices/pic/gui/pic_group_ui.cpp index d2ff2f4..fa4aa56 100644 --- a/src/devices/pic/gui/pic_group_ui.cpp +++ b/src/devices/pic/gui/pic_group_ui.cpp @@ -56,7 +56,7 @@ void Pic::GroupUI::fillWatchListContainer(ListContainer *container, TQValueVecto list = Pic::gprList(data, coff); for (uint k=0; kappendBranch(i18n("Bank %1").arg(k))); + ListContainer *bbranch = (rdata.nbBanks==1 ? branch : branch->appendBranch(i18n("Bank %1").tqarg(k))); uint nb = 0; for (uint i=0; i +#include #include #include diff --git a/src/devices/pic/gui/pic_memory_editor.cpp b/src/devices/pic/gui/pic_memory_editor.cpp index f62cbcb..a964988 100644 --- a/src/devices/pic/gui/pic_memory_editor.cpp +++ b/src/devices/pic/gui/pic_memory_editor.cpp @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include @@ -112,14 +112,14 @@ void Pic::MemoryEditorLegend::updateDisplay() if (_boot.label) { AddressRange r = memory().bootRange(); if ( r.isEmpty() ) _boot.label->setText(i18n("not present")); - else _boot.label->setText(TQString("[%1:%2]").arg(toHex(r.start, nbChars)).arg(toHex(r.end, nbChars))); + else _boot.label->setText(TQString("[%1:%2]").tqarg(toHex(r.start, nbChars)).tqarg(toHex(r.end, nbChars))); _boot.button->setEnabled(!r.isEmpty()); _boot.setProtected(memory().isBootProtected(ptype)); } for (uint i=0; i<_blocks.count(); i++) { AddressRange r = memory().blockRange(i); if ( r.isEmpty() ) _blocks[i].label->setText(i18n("not present")); - else _blocks[i].label->setText(TQString("[%1:%2]").arg(toHex(r.start, nbChars)).arg(toHex(r.end, nbChars))); + else _blocks[i].label->setText(TQString("[%1:%2]").tqarg(toHex(r.start, nbChars)).tqarg(toHex(r.end, nbChars))); _blocks[i].button->setEnabled(!r.isEmpty()); _blocks[i].setProtected(memory().isBlockProtected(ptype, i)); } @@ -251,10 +251,10 @@ void Pic::MemoryTypeEditor::init(bool first) uint nbChars = device().nbCharsWord(type()); TQString add; - if ( type()==MemoryRangeType::UserId ) add = i18n(" - recommended mask: %1").arg(toHexLabel(device().userIdRecommendedMask(), nbChars)); + if ( type()==MemoryRangeType::UserId ) add = i18n(" - recommended mask: %1").tqarg(toHexLabel(device().userIdRecommendedMask(), nbChars)); if ( type()==MemoryRangeType::Cal && _hexview ) add = i18n(" - not programmed by default"); TQString comment = i18n("%1-bit words - mask: %2") - .arg(device().nbBitsWord(type())).arg(toHexLabel(device().mask(type()), nbChars)); + .tqarg(device().nbBitsWord(type())).tqarg(toHexLabel(device().mask(type()), nbChars)); _comment->setText(comment + add); } diff --git a/src/devices/pic/gui/pic_prog_group_ui.cpp b/src/devices/pic/gui/pic_prog_group_ui.cpp index 565ec93..6e350ed 100644 --- a/src/devices/pic/gui/pic_prog_group_ui.cpp +++ b/src/devices/pic/gui/pic_prog_group_ui.cpp @@ -36,6 +36,6 @@ void Programmer::PicAdvancedDialog::updateDisplay() if ( !base().group().canReadVoltage(Pic::VoltageType(i)) ) continue; double v = base().voltage(Pic::VoltageType(i)); if ( v==::Programmer::UNKNOWN_VOLTAGE ) _voltages[i]->setText("---"); - else _voltages[i]->setText(TQString("%1 V").arg(v)); + else _voltages[i]->setText(TQString("%1 V").tqarg(v)); } } diff --git a/src/devices/pic/gui/pic_register_view.cpp b/src/devices/pic/gui/pic_register_view.cpp index c852689..b640036 100644 --- a/src/devices/pic/gui/pic_register_view.cpp +++ b/src/devices/pic/gui/pic_register_view.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "pic_register_view.h" -#include +#include #include #include #include @@ -46,20 +46,20 @@ Pic::BankWidget::BankWidget(uint i, TQWidget *parent) if ( (i/2)==0 ) { TQString title = ((i%2)==0 ? i18n("Access Bank (low)") : i18n("Access Bank (high)")); TQLabel *label = new TQLabel(title, this); - label->setAlignment(AlignCenter); + label->tqsetAlignment(AlignCenter); top->addMultiCellWidget(label, row,row, 0,6, AlignHCenter); } else { _bankCombo = new TQComboBox(this); for (uint k=1; k<2*rdata.nbBanks-1; k++) { - _bankCombo->insertItem((k%2)==0 ? i18n("Bank %1 (low)").arg(k/2) : i18n("Bank %1 (high)").arg(k/2)); + _bankCombo->insertItem((k%2)==0 ? i18n("Bank %1 (low)").tqarg(k/2) : i18n("Bank %1 (high)").tqarg(k/2)); } if ( _bindex==3 ) _bankCombo->setCurrentItem(1); connect(_bankCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(bankChanged())); top->addMultiCellWidget(_bankCombo, row,row, 0,6, AlignHCenter); } } else { - TQLabel *label = new TQLabel(i18n("Bank %1").arg(i), this); - label->setAlignment(AlignCenter); + TQLabel *label = new TQLabel(i18n("Bank %1").tqarg(i), this); + label->tqsetAlignment(AlignCenter); top->addMultiCellWidget(label, row,row, 0,6, AlignHCenter); } row++; diff --git a/src/devices/pic/pic/pic_group.cpp b/src/devices/pic/pic/pic_group.cpp index 2ae250f..311bff3 100644 --- a/src/devices/pic/pic/pic_group.cpp +++ b/src/devices/pic/pic/pic_group.cpp @@ -27,14 +27,14 @@ TQString Pic::Group::informationHtml(const Device::Data &data) const TQString s = htmlTableRow(i18n("Memory Type"), data.memoryTechnology().label()); if ( pdata.isPresent(MemoryRangeType::Code) ) { uint nbw = pdata.nbWords(MemoryRangeType::Code); - TQString tmp = i18n("%1 words").arg(formatNumber(nbw)); - tmp += i18n(" (%2 bits)").arg(pdata.nbBitsWord(MemoryRangeType::Code)); + TQString tmp = i18n("%1 words").tqarg(formatNumber(nbw)); + tmp += i18n(" (%2 bits)").tqarg(pdata.nbBitsWord(MemoryRangeType::Code)); s += htmlTableRow(MemoryRangeType(MemoryRangeType::Code).label(), tmp); } if ( pdata.isPresent(MemoryRangeType::Eeprom) ) { uint nbw = pdata.nbWords(MemoryRangeType::Eeprom); - TQString tmp = i18n("%1 bytes").arg(formatNumber(nbw)); - tmp += i18n(" (%2 bits)").arg(pdata.nbBitsWord(MemoryRangeType::Eeprom)); + TQString tmp = i18n("%1 bytes").tqarg(formatNumber(nbw)); + tmp += i18n(" (%2 bits)").tqarg(pdata.nbBitsWord(MemoryRangeType::Eeprom)); if ( !(pdata.range(MemoryRangeType::Eeprom).properties & Programmable) ) tmp += i18n(" (not programmable)"); s += htmlTableRow(MemoryRangeType(MemoryRangeType::Eeprom).label(), tmp); } diff --git a/src/devices/pic/pic/pic_memory.cpp b/src/devices/pic/pic/pic_memory.cpp index 5ffb663..5f86517 100644 --- a/src/devices/pic/pic/pic_memory.cpp +++ b/src/devices/pic/pic/pic_memory.cpp @@ -543,7 +543,7 @@ void Pic::Memory::fromHexBuffer(MemoryRangeType type, const HexBuffer &hb, Warni if ( !(result & ValueTooLarge) && _ranges[type][wOffset].maskWith(mask)!=_ranges[type][wOffset] ) { result |= ValueTooLarge; warnings += i18n("At least one word (at offset %1) is larger (%2) than the corresponding mask (%3).") - .arg(toHexLabel(offset, 8)).arg(toHexLabel(_ranges[type][wOffset], 8)).arg(toHexLabel(mask, 8)); + .tqarg(toHexLabel(offset, 8)).tqarg(toHexLabel(_ranges[type][wOffset], 8)).tqarg(toHexLabel(mask, 8)); } _ranges[type][wOffset] = _ranges[type][wOffset].maskWith(mask); } diff --git a/src/devices/pic/prog/pic_debug.cpp b/src/devices/pic/prog/pic_debug.cpp index eef84cc..9434a74 100644 --- a/src/devices/pic/prog/pic_debug.cpp +++ b/src/devices/pic/prog/pic_debug.cpp @@ -20,7 +20,7 @@ Register::TypeData Debugger::PicBase::registerTypeData(const TQString &name) con return Register::TypeData(rdata.sfrs[name].address, rdata.nbChars()); } -bool Debugger::PicBase::updatePortStatus(uint index, TQMap &bits) +bool Debugger::PicBase::updatePorttqStatus(uint index, TQMap &bits) { const Pic::RegistersData &rdata = device()->registersData(); BitValue tris; @@ -65,7 +65,7 @@ const Debugger::PicBase &Debugger::PicSpecific::base() const return static_cast(_base); } -bool Debugger::PicSpecific::updateStatus() +bool Debugger::PicSpecific::updatetqStatus() { if ( !Debugger::manager->readRegister(base().pcTypeData()) ) return false; if ( !Debugger::manager->readRegister(base().registerTypeData("STATUS")) ) return false; @@ -86,15 +86,15 @@ TQString Debugger::P16FSpecific::statusString() const uint bank = (status.bit(5) ? 1 : 0) + (status.bit(6) ? 2 : 0); BitValue wreg = Register::list().value(wregTypeData()); return TQString("W:%1 %2 %3 %4 PC:%5 Bank:%6") - .arg(toHexLabel(wreg, rdata.nbChars())).arg(status.bit(2) ? "Z" : "z") - .arg(status.bit(1) ? "DC" : "dc").arg(status.bit(0) ? "C" : "c") - .arg(toHexLabel(_base.pc(), device().nbCharsAddress())).arg(bank); + .tqarg(toHexLabel(wreg, rdata.nbChars())).tqarg(status.bit(2) ? "Z" : "z") + .tqarg(status.bit(1) ? "DC" : "dc").tqarg(status.bit(0) ? "C" : "c") + .tqarg(toHexLabel(_base.pc(), device().nbCharsAddress())).tqarg(bank); } //---------------------------------------------------------------------------- -bool Debugger::P18FSpecific::updateStatus() +bool Debugger::P18FSpecific::updatetqStatus() { - if ( !PicSpecific::updateStatus() ) return false; + if ( !PicSpecific::updatetqStatus() ) return false; if ( !Debugger::manager->readRegister(base().registerTypeData("BSR")) ) return false; return true; } @@ -111,8 +111,8 @@ TQString Debugger::P18FSpecific::statusString() const BitValue bsr = Register::list().value(base().registerTypeData("BSR")); BitValue wreg = Register::list().value(wregTypeData()); return TQString("W:%1 %2 %3 %4 %5 %6 PC:%7 Bank:%8") - .arg(toHexLabel(wreg, rdata.nbChars())).arg(status.bit(4) ? "N" : "n") - .arg(status.bit(3) ? "OV" : "ov").arg(status.bit(2) ? "Z" : "z") - .arg(status.bit(1) ? "DC" : "dc").arg(status.bit(0) ? "C" : "c") - .arg(toHexLabel(base().pc(), device().nbCharsAddress())).arg(toLabel(bsr)); + .tqarg(toHexLabel(wreg, rdata.nbChars())).tqarg(status.bit(4) ? "N" : "n") + .tqarg(status.bit(3) ? "OV" : "ov").tqarg(status.bit(2) ? "Z" : "z") + .tqarg(status.bit(1) ? "DC" : "dc").tqarg(status.bit(0) ? "C" : "c") + .tqarg(toHexLabel(base().pc(), device().nbCharsAddress())).tqarg(toLabel(bsr)); } diff --git a/src/devices/pic/prog/pic_debug.h b/src/devices/pic/prog/pic_debug.h index d73aeee..ce08387 100644 --- a/src/devices/pic/prog/pic_debug.h +++ b/src/devices/pic/prog/pic_debug.h @@ -25,7 +25,7 @@ public: const Pic::Data &device() const { return static_cast(*_base.device()); } PicBase &base(); const PicBase &base() const; - virtual bool updateStatus(); + virtual bool updatetqStatus(); virtual Register::TypeData wregTypeData() const = 0; }; @@ -44,7 +44,7 @@ class P18FSpecific : public PicSpecific public: P18FSpecific(Debugger::Base &base) : PicSpecific(base) {} virtual TQString statusString() const; - virtual bool updateStatus(); + virtual bool updatetqStatus(); virtual Register::TypeData wregTypeData() const; }; @@ -57,7 +57,7 @@ public: const PicSpecific *deviceSpecific() const { return static_cast(_deviceSpecific); } const Pic::Data *device() const { return static_cast(Debugger::Base::device()); } Register::TypeData registerTypeData(const TQString &name) const; - virtual bool updatePortStatus(uint index, TQMap &bits); + virtual bool updatePorttqStatus(uint index, TQMap &bits); }; } // namespace diff --git a/src/devices/pic/prog/pic_prog.cpp b/src/devices/pic/prog/pic_prog.cpp index b134303..f0c917d 100644 --- a/src/devices/pic/prog/pic_prog.cpp +++ b/src/devices/pic/prog/pic_prog.cpp @@ -106,9 +106,9 @@ bool Programmer::PicBase::readVoltages() if ( !group().canReadVoltage(Pic::VoltageType(i)) ) continue; if ( _voltages[i].error==true ) { ok = false; - log(Log::LineType::Error, i18n(" %1 = %2 V: error in voltage level.").arg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).arg(_voltages[i].value)); + log(Log::LineType::Error, i18n(" %1 = %2 V: error in voltage level.").tqarg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).tqarg(_voltages[i].value)); } else if ( _voltages[i].value!=UNKNOWN_VOLTAGE ) - log(Log::DebugLevel::Normal, TQString(" %1 = %2 V").arg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).arg(_voltages[i].value)); + log(Log::DebugLevel::Normal, TQString(" %1 = %2 V").tqarg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).tqarg(_voltages[i].value)); } return ok; } @@ -136,10 +136,10 @@ bool Programmer::PicBase::initProgramming(Task) const Pic::VoltageData &tvpp = device()->voltage(Pic::Vpp); if ( vpp()tvpp.max ) { TQString s = i18n("Vpp (%1 V) is higher than the maximum voltage (%2 V). You may damage the device.") - .arg(vpp()).arg(tvpp.max); + .tqarg(vpp()).tqarg(tvpp.max); log(Log::LineType::Warning, s); if ( !askContinue(s) ) { logUserAbort(); @@ -153,15 +153,15 @@ bool Programmer::PicBase::initProgramming(Task) if ( vdd()voltage(Pic::VddWrite).min!=tvdd.min ) log(Log::LineType::Warning, i18n("Vdd (%1 V) is too low for high-voltage programming\n(piklab only supports high-voltage programming at the moment).\nMinimum required is %2 V.") - .arg(vdd()).arg(tvdd.min)); + .tqarg(vdd()).tqarg(tvdd.min)); else if ( type==Pic::VddRead && device()->voltage(Pic::VddWrite).min!=tvdd.min ) log(Log::LineType::Warning, i18n("Vdd (%1 V) is too low for reading\nMinimum required is %2 V.") - .arg(vdd()).arg(tvdd.min)); + .tqarg(vdd()).tqarg(tvdd.min)); else log(Log::LineType::Warning, i18n("Vdd (%1 V) is too low for programming\nMinimum required is %2 V.") - .arg(vdd()).arg(tvdd.min)); + .tqarg(vdd()).tqarg(tvdd.min)); } else if ( vdd()>tvdd.max ) { TQString s = i18n("Vdd (%1 V) is higher than the maximum voltage (%2 V). You may damage the device.") - .arg(vdd()).arg(tvdd.max); + .tqarg(vdd()).tqarg(tvdd.max); log(Log::LineType::Warning, s); if ( !askContinue(s) ) { logUserAbort(); @@ -178,7 +178,7 @@ bool Programmer::PicBase::initProgramming(Task) _hasProtectedCode = _deviceMemory->isProtected(Pic::Protection::ProgramProtected, Pic::MemoryRangeType::Code); _hasProtectedEeprom = _deviceMemory->isProtected(Pic::Protection::ProgramProtected, Pic::MemoryRangeType::Eeprom); log(Log::DebugLevel::Normal, TQString(" protected: code=%1 data=%2") - .arg(_hasProtectedCode ? "true" : "false").arg(_hasProtectedEeprom ? "true" : "false")); + .tqarg(_hasProtectedCode ? "true" : "false").tqarg(_hasProtectedEeprom ? "true" : "false")); // read calibration if ( !readCalibration() ) return false; } @@ -250,14 +250,14 @@ bool Programmer::PicBase::verifyDeviceId() { if ( !specific()->canReadRange(Pic::MemoryRangeType::DeviceId ) ) return true; if ( !device()->isReadable(Pic::MemoryRangeType::DeviceId) ) { - log(Log::LineType::Information, i18n("Device not autodetectable: continuing with the specified device name \"%1\"...").arg(device()->name())); + log(Log::LineType::Information, i18n("Device not autodetectable: continuing with the specified device name \"%1\"...").tqarg(device()->name())); return true; } BitValue rawId = readDeviceId(); if ( hasError() ) return false; uint nbChars = device()->nbWords(Pic::MemoryRangeType::DeviceId) * device()->nbCharsWord(Pic::MemoryRangeType::DeviceId); if ( rawId==0x0 || rawId==device()->mask(Pic::MemoryRangeType::DeviceId) ) { - log(Log::LineType::Error, i18n("Missing or incorrect device (Read id is %1).").arg(toHexLabel(rawId, nbChars))); + log(Log::LineType::Error, i18n("Missing or incorrect device (Read id is %1).").tqarg(toHexLabel(rawId, nbChars))); return false; } TQMap ids; @@ -270,18 +270,18 @@ bool Programmer::PicBase::verifyDeviceId() } TQString message; if ( ids.count()!=0 ) { - log(Log::LineType::Information, i18n("Read id: %1").arg(device()->idNames(ids).join("; "))); + log(Log::LineType::Information, i18n("Read id: %1").tqarg(device()->idNames(ids).join("; "))); if ( ids.contains(device()->name()) ) return true; - message = i18n("Read id does not match the specified device name \"%1\".").arg(device()->name()); + message = i18n("Read id does not match the specified device name \"%1\".").tqarg(device()->name()); } else { - log(Log::LineType::Warning, i18n(" Unknown or incorrect device (Read id is %1).").arg(toHexLabel(rawId, nbChars))); + log(Log::LineType::Warning, i18n(" Unknown or incorrect device (Read id is %1).").tqarg(toHexLabel(rawId, nbChars))); message = i18n("Unknown device."); } if ( !askContinue(message) ) { logUserAbort(); return false; } - log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").arg(device()->name())); + log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").tqarg(device()->name())); return true; } @@ -306,7 +306,7 @@ bool Programmer::PicBase::readCalibration() Device::Array data; if ( !specific()->read(Pic::MemoryRangeType::Cal, data, 0) ) return false; _deviceMemory->setArray(Pic::MemoryRangeType::Cal, data); - log(Log::DebugLevel::Normal, TQString(" Read osccal: %1").arg(prettyCalibration(data))); + log(Log::DebugLevel::Normal, TQString(" Read osccal: %1").tqarg(prettyCalibration(data))); TQString message; if ( !device()->checkCalibration(data, &message) ) log(Log::LineType::Warning, " " + message); if ( device()->isReadable(Pic::MemoryRangeType::CalBackup) ) { @@ -316,7 +316,7 @@ bool Programmer::PicBase::readCalibration() } if ( !specific()->read(Pic::MemoryRangeType::CalBackup, data, 0) ) return false; _deviceMemory->setArray(Pic::MemoryRangeType::CalBackup, data); - log(Log::DebugLevel::Normal, TQString(" Read osccal backup: %1").arg(prettyCalibration(data))); + log(Log::DebugLevel::Normal, TQString(" Read osccal backup: %1").tqarg(prettyCalibration(data))); if ( !device()->checkCalibration(data, &message) ) log(Log::LineType::Warning, " " + message); } } @@ -381,7 +381,7 @@ bool Programmer::PicBase::restoreBandGapBits() log(Log::LineType::Warning, i18n("Could not restore band gap bits because programmer does not support writing config bits.")); return true; } - log(Log::DebugLevel::Normal, TQString(" Write config with band gap bits: %2").arg(toHexLabel(cdata[0], device()->nbCharsWord(Pic::MemoryRangeType::Config)))); + log(Log::DebugLevel::Normal, TQString(" Write config with band gap bits: %2").tqarg(toHexLabel(cdata[0], device()->nbCharsWord(Pic::MemoryRangeType::Config)))); if ( !programRange(Pic::MemoryRangeType::Config, cdata) ) return false; if ( !specific()->read(Pic::MemoryRangeType::Config, data, 0) ) return false; if ( data==cdata ) log(Log::LineType::Information, i18n(" Band gap bits have been preserved.")); @@ -464,7 +464,7 @@ bool Programmer::PicBase::internalEraseRange(Pic::MemoryRangeType type) log(Log::LineType::SoftError, i18n("Cannot erase specified range because of programmer limitations.")); return false; } - if ( !askContinue(i18n("%1: Erasing this range only is not supported with this programmer. This will erase the whole chip and restore the other memory ranges.").arg(type.label())) ) { + if ( !askContinue(i18n("%1: Erasing this range only is not supported with this programmer. This will erase the whole chip and restore the other memory ranges.").tqarg(type.label())) ) { logUserAbort(); return false; } @@ -497,19 +497,19 @@ bool Programmer::PicBase::readRange(Pic::MemoryRangeType type, Pic::Memory *memo { if ( !device()->isReadable(type) ) return true; if ( !specific()->canReadRange(type) ) { - log(Log::LineType::Information, i18n("The selected programmer cannot read %1: operation skipped.").arg(type.label())); + log(Log::LineType::Information, i18n("The selected programmer cannot read %1: operation skipped.").tqarg(type.label())); return true; } VerifyData *vdata = (vd ? new VerifyData(vd->actions, vd->memory) : 0); if (vdata) { - log(Log::LineType::Information, i18n(" Verify memory: %1").arg(type.label())); + log(Log::LineType::Information, i18n(" Verify memory: %1").tqarg(type.label())); if ( !(vdata->actions & IgnoreProtectedVerify) ) { vdata->protectedRanges = static_cast(vdata->memory).protectedRanges(Pic::Protection::ProgramProtected, type); if ( !vdata->protectedRanges.isEmpty() ) log(Log::LineType::Warning, i18n(" Part of device memory is protected (in %1) and cannot be verified.") - .arg(type.label())); + .tqarg(type.label())); } else vdata->protectedRanges.clear(); } else { - log(Log::LineType::Information, i18n(" Read memory: %1").arg(type.label())); + log(Log::LineType::Information, i18n(" Read memory: %1").tqarg(type.label())); CRASH_ASSERT(memory); } Device::Array data; @@ -562,7 +562,7 @@ bool Programmer::PicBase::programSingle(Pic::MemoryRangeType type, const Pic::Me bool Programmer::PicBase::programRange(Pic::MemoryRangeType mtype, const Device::Array &data) { - log(Log::LineType::Information, i18n(" Write memory: %1").arg(mtype.label())); + log(Log::LineType::Information, i18n(" Write memory: %1").tqarg(mtype.label())); bool only = ( readConfigEntry(Config::OnlyProgramNonMask).toBool() && (mtype==Pic::MemoryRangeType::Code || mtype==Pic::MemoryRangeType::Eeprom) ); return specific()->write(mtype, data, !only); @@ -672,15 +672,15 @@ bool Programmer::PicBase::checkProgramCalibration(const Device::Array &data) { TQString message, s = prettyCalibration(data); if ( !device()->checkCalibration(data, &message) ) { - sorry(i18n("The calibration word %1 is not valid.").arg(s), message); + sorry(i18n("The calibration word %1 is not valid.").tqarg(s), message); return false; } - return askContinue(i18n("Do you want to overwrite the device calibration with %1?").arg(s)); + return askContinue(i18n("Do you want to overwrite the device calibration with %1?").tqarg(s)); } bool Programmer::PicBase::tryProgramCalibration(const Device::Array &data, bool &success) { - log(Log::LineType::Information, i18n(" Write memory: %1").arg(Pic::MemoryRangeType(Pic::MemoryRangeType::Cal).label())); + log(Log::LineType::Information, i18n(" Write memory: %1").tqarg(Pic::MemoryRangeType(Pic::MemoryRangeType::Cal).label())); success = true; if ( !specific()->write(Pic::MemoryRangeType::Cal, data, true) ) return false; Device::Array read; @@ -691,7 +691,7 @@ bool Programmer::PicBase::tryProgramCalibration(const Device::Array &data, bool if ( device()->isWritable(Pic::MemoryRangeType::CalBackup) ) { if ( !specific()->read(Pic::MemoryRangeType::CalBackup, read, 0) ) return false; if ( device()->checkCalibration(read) ) return true; // do not overwrite correct backup value - log(Log::LineType::Information, i18n(" Write memory: %1").arg(Pic::MemoryRangeType(Pic::MemoryRangeType::CalBackup).label())); + log(Log::LineType::Information, i18n(" Write memory: %1").tqarg(Pic::MemoryRangeType(Pic::MemoryRangeType::CalBackup).label())); if ( !specific()->write(Pic::MemoryRangeType::CalBackup, data, true) ) return false; if ( !specific()->read(Pic::MemoryRangeType::CalBackup, read, 0) ) return false; for (uint i=0; i(this)->log(Log::DebugLevel::Normal, TQString("start before align: %1").arg(start)); + const_cast(this)->log(Log::DebugLevel::Normal, TQString("start before align: %1").tqarg(start)); uint align = device().nbWordsWriteAlignment(type); start -= start % align; - const_cast(this)->log(Log::DebugLevel::Normal, TQString("start after align: %1 (align=%2)").arg(start).arg(align)); + const_cast(this)->log(Log::DebugLevel::Normal, TQString("start after align: %1 (align=%2)").tqarg(start).tqarg(align)); return start; } @@ -41,10 +41,10 @@ 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(this)->log(Log::DebugLevel::Normal, TQString("end before align: %1").arg(end)); + const_cast(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(this)->log(Log::DebugLevel::Normal, TQString("end after align: %1 (align=%2)").arg(end).arg(align)); + const_cast(this)->log(Log::DebugLevel::Normal, TQString("end after align: %1 (align=%2)").tqarg(end).tqarg(align)); Q_ASSERT(end_voltages[type].min = voltages.attribute("min").toDouble(&ok1); data()->_voltages[type].max = voltages.attribute("max").toDouble(&ok2); data()->_voltages[type].nominal = voltages.attribute("nominal").toDouble(&ok3); - if ( !ok1 || !ok2 || !ok3 ) qFatal(TQString("Cannot extract voltage value for \"%1\"").arg(type.key())); + if ( !ok1 || !ok2 || !ok3 ) qFatal(TQString("Cannot extract voltage value for \"%1\"").tqarg(type.key())); if ( data()->_voltages[type].min>data()->_voltages[type].max || data()->_voltages[type].nominal_voltages[type].min || data()->_voltages[type].nominal>data()->_voltages[type].max ) @@ -50,11 +50,11 @@ bool getMemoryRange(MemoryRangeType type, TQDomElement element) if ( !ok ) qFatal("Cannot extract end address"); if ( data()->_ranges[type].end_ranges[type].start ) qFatal("Memory range end is before its start"); uint nbCharsWord = data()->nbCharsWord(type); - if ( data()->nbBitsWord(type)==0 ) qFatal(TQString("Architecture doesn't contain memory range %1").arg(type.key())); + if ( data()->nbBitsWord(type)==0 ) qFatal(TQString("Architecture doesn't contain memory range %1").tqarg(type.key())); if ( type==MemoryRangeType::UserId ) { data()->_userIdRecommendedMask = fromHexLabel(range.attribute("rmask"), nbCharsWord, &ok); if ( !ok ) qFatal("Cannot extract rmask value for user id"); - if ( !data()->_userIdRecommendedMask.isInside(data()->mask(type)) ) qFatal(TQString("rmask is not inside mask %1 (%2)").arg(toHexLabel(data()->_userIdRecommendedMask, 8)).arg(toHexLabel(data()->mask(type), 8))); + if ( !data()->_userIdRecommendedMask.isInside(data()->mask(type)) ) qFatal(TQString("rmask is not inside mask %1 (%2)").tqarg(toHexLabel(data()->_userIdRecommendedMask, 8)).tqarg(toHexLabel(data()->mask(type), 8))); } if ( range.attribute("hexfile_offset")!="?" ) { data()->_ranges[type].properties |= Programmable; @@ -100,19 +100,19 @@ void processName(const Pic::Config::Mask &cmask, BitValue pmask, Pic::Config::Va TQStringList &cnames = cvalue.configNames[Pic::ConfigNameType::Default]; if ( cvalue.name=="invalid" ) { cvalue.name = TQString(); - if ( !cnames.isEmpty() ) qFatal(TQString("No cname should be defined for invalid value in mask %1").arg(cmask.name)); + if ( !cnames.isEmpty() ) qFatal(TQString("No cname should be defined for invalid value in mask %1").tqarg(cmask.name)); return; } - if ( cvalue.name.isEmpty() ) qFatal(TQString("Empty value name in mask %1").arg(cmask.name)); + if ( cvalue.name.isEmpty() ) qFatal(TQString("Empty value name in mask %1").tqarg(cmask.name)); if ( cmask.value.isInside(pmask) ) { // protected bits - if ( !cnames.isEmpty() ) qFatal(TQString("Config name should be null for protected config mask \"%1\"").arg(cmask.name)); + if ( !cnames.isEmpty() ) qFatal(TQString("Config name should be null for protected config mask \"%1\"").tqarg(cmask.name)); } else { if ( cnames.isEmpty() && cmask.name!="BSSEC" && cmask.name!="BSSIZ" && cmask.name!="SSSEC" && cmask.name!="SSSIZ" ) { // ### FIXME: 18J 24H 30F1010/202X if ( data()->architecture()!=Pic::Architecture::P18J && data()->architecture()!=Pic::Architecture::P24H && data()->architecture()!=Pic::Architecture::P24F && data()->architecture()!=Pic::Architecture::P33F && data()->name()!="30F1010" && data()->name()!="30F2020" && data()->name()!="30F2023" ) - qFatal(TQString("cname not defined for \"%1\" (%2)").arg(cvalue.name).arg(cmask.name)); + qFatal(TQString("cname not defined for \"%1\" (%2)").tqarg(cvalue.name).tqarg(cmask.name)); } if ( cnames.count()==1 && cnames[0]=="_" ) cnames.clear(); for (uint i=0; iarchitecture()==Pic::Architecture::P30F) ) continue; - qFatal(TQString("Invalid config name for \"%1\"/\"%2\"").arg(cmask.name).arg(cvalue.name)); + qFatal(TQString("Invalid config name for \"%1\"/\"%2\"").tqarg(cmask.name).tqarg(cvalue.name)); } TQStringList &ecnames = cvalue.configNames[Pic::ConfigNameType::Extra]; for (uint i=0; i defConfigNames; Config::Mask cmask; cmask.name = mask.attribute("name"); - if ( !Config::hasMaskName(cmask.name) ) qFatal(TQString("Unknown mask name %1").arg(cmask.name)); + if ( !Config::hasMaskName(cmask.name) ) qFatal(TQString("Unknown mask name %1").tqarg(cmask.name)); cmask.value = fromHexLabel(mask.attribute("value"), nbChars, &ok); if ( !ok || cmask.value==0 || cmask.value>data()->mask(MemoryRangeType::Config) ) - qFatal(TQString("Malformed mask value in mask %1").arg(mask.attribute("name"))); + qFatal(TQString("Malformed mask value in mask %1").tqarg(mask.attribute("name"))); //TQStringList names; TQDomNode child = mask.firstChild(); while ( !child.isNull() ) { TQDomElement value = child.toElement(); child = child.nextSibling(); if ( value.isNull() ) continue; - if ( value.nodeName()!="value" ) qFatal(TQString("Non value child in mask %1").arg(cmask.name)); + if ( value.nodeName()!="value" ) qFatal(TQString("Non value child in mask %1").tqarg(cmask.name)); if ( value.attribute("value")=="default" ) { - if ( !defName.isEmpty() ) qFatal(TQString("Default value already defined for mask %1").arg(cmask.name)); + if ( !defName.isEmpty() ) qFatal(TQString("Default value already defined for mask %1").tqarg(cmask.name)); defName = value.attribute("name"); - //if ( names.contains(defName) ) qFatal(TQString("Value name duplicated in mask %1").arg(cmask.name)); + //if ( names.contains(defName) ) qFatal(TQString("Value name duplicated in mask %1").tqarg(cmask.name)); //names.append(defName); FOR_EACH(Pic::ConfigNameType, type) defConfigNames[type] = TQStringList::split(' ', value.attribute(type.data().key)); continue; } Config::Value cvalue; cvalue.value = fromHexLabel(value.attribute("value"), nbChars, &ok); - if ( !ok || !cvalue.value.isInside(cmask.value) ) qFatal(TQString("Malformed value in mask %1").arg(cmask.name)); + if ( !ok || !cvalue.value.isInside(cmask.value) ) qFatal(TQString("Malformed value in mask %1").tqarg(cmask.name)); cvalue.name = value.attribute("name"); - //if ( names.contains(cvalue.name) ) qFatal(TQString("Value name duplicated in mask %1").arg(cmask.name)); + //if ( names.contains(cvalue.name) ) qFatal(TQString("Value name duplicated in mask %1").tqarg(cmask.name)); //names.append(cvalue.name); FOR_EACH(Pic::ConfigNameType, type) cvalue.configNames[type] = TQStringList::split(' ', value.attribute(type.data().key)); processName(cmask, pmask, cvalue); @@ -183,7 +183,7 @@ Pic::Config::Mask toConfigMask(TQDomElement mask, BitValue pmask) processName(cmask, pmask, cvalue); cmask.values.append(cvalue); } - if ( nb<=1 ) qFatal(TQString("Default value used less than twice in mask %1").arg(cmask.name)); + if ( nb<=1 ) qFatal(TQString("Default value used less than twice in mask %1").tqarg(cmask.name)); } qHeapSort(cmask.values); return cmask; @@ -198,9 +198,9 @@ Pic::Config::Word toConfigWord(TQDomElement config) bool ok; cword.wmask = fromHexLabel(config.attribute("wmask"), nbChars, &ok); BitValue gmask = data()->mask(MemoryRangeType::Config); - if ( !ok || cword.wmask>gmask ) qFatal(TQString("Missing or malformed config wmask \"%1\"").arg(config.attribute("wmask"))); + if ( !ok || cword.wmask>gmask ) qFatal(TQString("Missing or malformed config wmask \"%1\"").tqarg(config.attribute("wmask"))); cword.bvalue = fromHexLabel(config.attribute("bvalue"), nbChars, &ok); - if ( !ok ) qFatal(TQString("Missing or malformed config bvalue \"%1\"").arg(config.attribute("bvalue"))); + if ( !ok ) qFatal(TQString("Missing or malformed config bvalue \"%1\"").tqarg(config.attribute("bvalue"))); if ( config.attribute("pmask").isEmpty() ) cword.pmask = 0; else { bool ok; @@ -209,19 +209,19 @@ Pic::Config::Word toConfigWord(TQDomElement config) } cword.ignoredCNames = TQStringList::split(' ', config.attribute("icnames")); for (uint i=0; igmask ) qFatal("Missing or malformed config cmask"); - //if ( data()->_architecture==Pic::Architecture::P30X &&cword.cmask==cword.wmask ) qFatal(TQString("Redundant cmask in %1").arg(cword.name)); - if ( cword.cmask==mask ) qFatal(TQString("Redundant cmask in %1").arg(cword.name)); + //if ( data()->_architecture==Pic::Architecture::P30X &&cword.cmask==cword.wmask ) qFatal(TQString("Redundant cmask in %1").tqarg(cword.name)); + if ( cword.cmask==mask ) qFatal(TQString("Redundant cmask in %1").tqarg(cword.name)); } if ( !cword.pmask.isInside(cword.usedMask()) ) qFatal("pmask should be inside or'ed mask values."); return cword; @@ -255,11 +255,11 @@ TQValueVector getConfigWords(TQDomElement element) if ( !ok ) qFatal("Missing or malformed config offset"); if ( (offset % data()->addressIncrement(MemoryRangeType::Config))!=0 ) qFatal("Config offset not aligned"); offset /= data()->addressIncrement(MemoryRangeType::Config); - if ( offset>=nbWords ) qFatal(TQString("Offset too big %1/%2").arg(offset).arg(nbWords)); - if ( !configWords[offset].name.isNull() ) qFatal(TQString("Config offset %1 is duplicated").arg(offset)); + if ( offset>=nbWords ) qFatal(TQString("Offset too big %1/%2").tqarg(offset).tqarg(nbWords)); + if ( !configWords[offset].name.isNull() ) qFatal(TQString("Config offset %1 is duplicated").tqarg(offset)); for (uint i=0; iconfig().findMask(list[i]); - if ( mask==0 ) qFatal(TQString("Not valid mask name for \"protected\" tag in checksum: %1").arg(list[i])); + if ( mask==0 ) qFatal(TQString("Not valid mask name for \"protected\" tag in checksum: %1").tqarg(list[i])); if ( mask->values.count()==2 ) continue; for (uint k=0; kvalues.count()); k++) { TQString valueName = mask->values[k].name; if ( valueName.isEmpty() ) continue; if ( !protection.isNoneProtectedValueName(valueName) && !protection.isAllProtectedValueName(valueName) ) - qFatal(TQString("Not switch protection from mask name for \"protected\" tag in checksum: %1").arg(list[i])); + qFatal(TQString("Not switch protection from mask name for \"protected\" tag in checksum: %1").tqarg(list[i])); } } cdata.protectedMaskNames = list; @@ -358,7 +358,7 @@ virtual void processDevice(TQDomElement device) TQString arch = device.attribute("architecture"); data()->_architecture = Architecture::fromKey(arch); - if ( data()->_architecture==Architecture::Nb_Types ) qFatal(TQString("Unrecognized architecture \"%1\"").arg(arch)); + if ( data()->_architecture==Architecture::Nb_Types ) qFatal(TQString("Unrecognized architecture \"%1\"").tqarg(arch)); if ( (data()->_architecture==Architecture::P18F && data()->_name.contains("C")) || (data()->_architecture==Architecture::P18F && data()->_name.contains("J")) ) qFatal("Not matching family"); @@ -396,7 +396,7 @@ virtual void processDevice(TQDomElement device) if ( !getVoltages(vtype, device) ) { switch (vtype.type()) { case ProgVoltageType::Vpp: - case ProgVoltageType::VddBulkErase: qFatal(TQString("Voltage \"%1\" not defined").arg(vtype.key())); + case ProgVoltageType::VddBulkErase: qFatal(TQString("Voltage \"%1\" not defined").tqarg(vtype.key())); case ProgVoltageType::VddWrite: data()->_voltages[ProgVoltageType::VddWrite] = data()->_voltages[ProgVoltageType::VddBulkErase]; break; case ProgVoltageType::Nb_Types: Q_ASSERT(false); break; } @@ -426,7 +426,7 @@ virtual void processDevice(TQDomElement device) Address start2 = data()->_ranges[i].start + data()->_ranges[i].hexFileOffset; Address end2 = data()->_ranges[i].end + data()->_ranges[i].hexFileOffset; if ( end1>=start2 && start1<=end2 ) - qFatal(TQString("Overlapping memory ranges (%1 and %2)").arg(k.key()).arg(i.key())); + qFatal(TQString("Overlapping memory ranges (%1 and %2)").tqarg(k.key()).tqarg(i.key())); } } checkTagNames(device, "memory", names); @@ -440,7 +440,7 @@ virtual void processDevice(TQDomElement device) FOR_EACH(Pic::ConfigNameType, type) { TQMap cnames; // cname -> mask name for (uint i=0; i_config->_words[i] = cwords[i]; const Config::Word &word = data()->_config->_words[i]; for (uint j=0; j_config->checkValueName(mask.name, value.name) ) - qFatal(TQString("Malformed value name \"%1\" in mask %2").arg(value.name).arg(mask.name)); + qFatal(TQString("Malformed value name \"%1\" in mask %2").tqarg(value.name).tqarg(mask.name)); } } } @@ -477,7 +477,7 @@ virtual void processDevice(TQDomElement device) const Config::Mask &mask = word.masks[j]; BitValue::const_iterator it; for (it=mask.value.begin(); it!=mask.value.end(); ++it) - if ( !hasValue(mask, *it) ) qFatal(TQString("Value %1 not defined in mask %2").arg(toHexLabel(*it, data()->nbCharsWord(MemoryRangeType::Config))).arg(mask.name)); + if ( !hasValue(mask, *it) ) qFatal(TQString("Value %1 not defined in mask %2").tqarg(toHexLabel(*it, data()->nbCharsWord(MemoryRangeType::Config))).tqarg(mask.name)); } } @@ -507,7 +507,7 @@ virtual void processDevice(TQDomElement device) } TQMap::const_iterator it; for (it=valueNames.begin(); it!=valueNames.end(); ++it) - if ( !it.key().isEmpty() && !it.data() ) qFatal(TQString("Missing checksum \"%1\"").arg(it.key())); + if ( !it.key().isEmpty() && !it.data() ) qFatal(TQString("Missing checksum \"%1\"").tqarg(it.key())); } } @@ -552,13 +552,13 @@ void processSfr(TQDomElement e) qFatal("SFR name is duplicated"); bool ok; uint address = fromHexLabel(e.attribute("address"), &ok); - if ( !ok ) qFatal(TQString("SFR %1 address %2 is malformed").arg(name).arg(e.attribute("address"))); + if ( !ok ) qFatal(TQString("SFR %1 address %2 is malformed").tqarg(name).tqarg(e.attribute("address"))); uint rlength = data()->registersData().nbBanks * data()->architecture().data().registerBankLength; - if ( address>=rlength ) qFatal(TQString("Address %1 outside register range").arg(toHexLabel(address, 3))); + if ( address>=rlength ) qFatal(TQString("Address %1 outside register range").tqarg(toHexLabel(address, 3))); RegisterData rdata; rdata.address = address; uint nb = data()->registersData().nbBits(); - if ( nb>Device::MAX_NB_PORT_BITS ) qFatal(TQString("Need higher MAX_NB_PORT_BITS: %1").arg(nb)); + if ( nb>Device::MAX_NB_PORT_BITS ) qFatal(TQString("Need higher MAX_NB_PORT_BITS: %1").tqarg(nb)); TQString access = e.attribute("access"); if ( uint(access.length())!=nb ) qFatal("access is missing or malformed"); TQString mclr = e.attribute("mclr"); @@ -569,11 +569,11 @@ void processSfr(TQDomElement e) uint k = nb - i - 1; bool ok; rdata.bits[k].properties = RegisterBitProperties(fromHex(access[i].latin1(), &ok)); - if ( !ok || rdata.bits[k].properties>MaxRegisterBitProperty ) qFatal(TQString("Malformed access bit %1").arg(k)); + if ( !ok || rdata.bits[k].properties>MaxRegisterBitProperty ) qFatal(TQString("Malformed access bit %1").tqarg(k)); rdata.bits[k].mclr = RegisterBitState(fromHex(mclr[i].latin1(), &ok)); - if ( !ok || rdata.bits[k].mclr>Nb_RegisterBitStates ) qFatal(TQString("Malformed mclr bit %1").arg(k)); + if ( !ok || rdata.bits[k].mclr>Nb_RegisterBitStates ) qFatal(TQString("Malformed mclr bit %1").tqarg(k)); rdata.bits[k].por = RegisterBitState(fromHex(por[i].latin1(), &ok)); - if ( !ok || rdata.bits[k].por>Nb_RegisterBitStates ) qFatal(TQString("Malformed por bit %1").arg(k)); + if ( !ok || rdata.bits[k].por>Nb_RegisterBitStates ) qFatal(TQString("Malformed por bit %1").tqarg(k)); } static_cast(data()->_registersData)->sfrs[name] = rdata; } @@ -587,13 +587,13 @@ void processCombined(TQDomElement e) bool ok; CombinedData rdata; rdata.address = fromHexLabel(e.attribute("address"), &ok); - if ( !ok ) qFatal(TQString("Combined %1 address %2 is malformed").arg(name).arg(e.attribute("address"))); + if ( !ok ) qFatal(TQString("Combined %1 address %2 is malformed").tqarg(name).tqarg(e.attribute("address"))); uint rlength = data()->registersData().nbBanks * data()->architecture().data().registerBankLength; - if ( rdata.address>=rlength ) qFatal(TQString("Address %1 outside register range").arg(toHexLabel(rdata.address, 3))); + if ( rdata.address>=rlength ) qFatal(TQString("Address %1 outside register range").tqarg(toHexLabel(rdata.address, 3))); rdata.nbChars = 2*e.attribute("size").toUInt(&ok); - if ( !ok || rdata.nbChars<2 ) qFatal(TQString("Combined %1 size %2 is malformed").arg(name).arg(e.attribute("size"))); + if ( !ok || rdata.nbChars<2 ) qFatal(TQString("Combined %1 size %2 is malformed").tqarg(name).tqarg(e.attribute("size"))); Address end = rdata.address + rdata.nbChars/2 - 1; - if ( end>=rlength ) qFatal(TQString("Address %1 outside register range").arg(toHexLabel(end, 3))); + if ( end>=rlength ) qFatal(TQString("Address %1 outside register range").tqarg(toHexLabel(end, 3))); static_cast(data()->_registersData)->combined[name] = rdata; } @@ -601,7 +601,7 @@ void processDeviceRegisters(TQDomElement element) { TQString s = element.attribute("same_as"); if ( !s.isEmpty() ) { - if ( !_map.contains(s) ) qFatal(TQString("Registers same as unknown device %1").arg(s)); + if ( !_map.contains(s) ) qFatal(TQString("Registers same as unknown device %1").tqarg(s)); const Pic::Data *d = static_cast(_map[s]); data()->_registersData = d->_registersData; return; @@ -629,7 +629,7 @@ void processDeviceRegisters(TQDomElement element) else if ( e.nodeName()=="unused" ) processUnused(e); else if ( e.nodeName()=="combined" ) processCombined(e); else if ( e.nodeName()=="sfr" ) processSfr(e); - else qFatal(TQString("Node name \"%1\" is not recognized").arg(e.nodeName())); + else qFatal(TQString("Node name \"%1\" is not recognized").tqarg(e.nodeName())); child = child.nextSibling(); } @@ -640,11 +640,11 @@ void processDeviceRegisters(TQDomElement element) TQString trisname = rdata.trisName(i); if ( trisname.isEmpty() ) continue; bool hasTris = rdata.sfrs.contains(trisname); - if ( !hasPort && hasTris ) qFatal(TQString("%1 needs %2 to be present").arg(trisname).arg(portname)); + if ( !hasPort && hasTris ) qFatal(TQString("%1 needs %2 to be present").tqarg(trisname).tqarg(portname)); TQString latchname = rdata.latchName(i); if ( latchname.isEmpty() ) continue; bool hasLatch = rdata.sfrs.contains(latchname); - if ( !hasPort && hasLatch ) qFatal(TQString("%1 needs %2 to be present").arg(latchname).arg(portname)); + if ( !hasPort && hasLatch ) qFatal(TQString("%1 needs %2 to be present").tqarg(latchname).tqarg(portname)); } } @@ -660,7 +660,7 @@ void processRegistersFile(const TQString &filename, TQStringList &devices) if ( child.nodeName()!="device" ) qFatal("Device node should be named \"device\""); TQDomElement device = child.toElement(); TQString name = device.attribute("name"); - if ( devices.contains(name) ) qFatal(TQString("Registers already defined for %1").arg(name)); + if ( devices.contains(name) ) qFatal(TQString("Registers already defined for %1").tqarg(name)); if ( _map.contains(name) ) { _data = _map[name]; processDeviceRegisters(device); @@ -691,7 +691,7 @@ virtual void checkPins(const TQMap &pinLabels) const TQMap::const_iterator it; for (it=pinLabels.begin(); it!=pinLabels.end(); ++it) { if ( it.key()=="VDD" || it.key()=="VSS" || it.key().startsWith("CCP") ) continue; - if ( it.data()!=1 ) qFatal(TQString("Duplicated pin \"%1\"").arg(it.key())); + if ( it.data()!=1 ) qFatal(TQString("Duplicated pin \"%1\"").tqarg(it.key())); } const Pic::RegistersData &rdata = static_cast(*_data->registersData()); for (uint i=0; i &pinLabels) const for (uint k=0; k