summaryrefslogtreecommitdiffstats
path: root/src/devices/pic
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/pic')
-rw-r--r--src/devices/pic/base/pic.cpp12
-rw-r--r--src/devices/pic/base/pic_config.cpp4
-rw-r--r--src/devices/pic/base/pic_protection.cpp8
-rw-r--r--src/devices/pic/base/pic_register.cpp2
-rw-r--r--src/devices/pic/gui/pic_config_editor.cpp2
-rw-r--r--src/devices/pic/gui/pic_config_word_editor.cpp4
-rw-r--r--src/devices/pic/gui/pic_group_ui.cpp2
-rw-r--r--src/devices/pic/gui/pic_hex_view.cpp2
-rw-r--r--src/devices/pic/gui/pic_memory_editor.cpp10
-rw-r--r--src/devices/pic/gui/pic_prog_group_ui.cpp2
-rw-r--r--src/devices/pic/gui/pic_register_view.cpp10
-rw-r--r--src/devices/pic/pic/pic_group.cpp8
-rw-r--r--src/devices/pic/pic/pic_memory.cpp2
-rw-r--r--src/devices/pic/prog/pic_debug.cpp22
-rw-r--r--src/devices/pic/prog/pic_debug.h6
-rw-r--r--src/devices/pic/prog/pic_prog.cpp56
-rw-r--r--src/devices/pic/prog/pic_prog_specific.cpp16
-rw-r--r--src/devices/pic/xml/pic_xml_to_data.cpp114
18 files changed, 141 insertions, 141 deletions
diff --git a/src/devices/pic/base/pic.cpp b/src/devices/pic/base/pic.cpp
index 94267e2..75e6bf4 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<TQString, Device::IdData> &ids) cons
case Architecture::P18C:
case Architecture::P18F:
case Architecture::P18J:
- list += i18n("%1 (rev. %2)").tqarg(it.key()).tqarg(toLabel(it.data().revision));
+ list += i18n("%1 (rev. %2)").arg(it.key()).arg(toLabel(it.data().revision));
break;
case Architecture::P24F:
- list += i18n("%1 (rev. %2.%3)").tqarg(it.key()).tqarg(toLabel(it.data().revision)).tqarg(toLabel(it.data().minorRevision));
+ list += i18n("%1 (rev. %2.%3)").arg(it.key()).arg(toLabel(it.data().revision)).arg(toLabel(it.data().minorRevision));
break;
case Architecture::P30F:
- 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));
+ 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));
break;
case Architecture::P24H:
case Architecture::P33F:
- list += i18n("%1 (rev. %2)").tqarg(it.key()).tqarg(toLabel(it.data().revision));
+ list += i18n("%1 (rev. %2)").arg(it.key()).arg(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<data.count(); i++) {
TQString address = toHexLabel(range(MemoryRangeType::Cal).start + i*addressIncrement(MemoryRangeType::Cal), nbCharsAddress());
if ( data[i]==mask(MemoryRangeType::Cal) ) {
- if (message) *message = i18n("Calibration word at address %1 is blank.").tqarg(address);
+ if (message) *message = i18n("Calibration word at address %1 is blank.").arg(address);
return false;
}
}
if ( data.count()==1 ) {
if ( data[0].maskWith(_calibration.opcodeMask)!=_calibration.opcode ) {
if (message) *message = i18n("Calibration word is not a compatible opcode (%2).")
- .tqarg(toHexLabel(_calibration.opcode, nbCharsWord(MemoryRangeType::Code)));
+ .arg(toHexLabel(_calibration.opcode, nbCharsWord(MemoryRangeType::Code)));
return false;
}
}
diff --git a/src/devices/pic/base/pic_config.cpp b/src/devices/pic/base/pic_config.cpp
index 39c865f..f18955d 100644
--- a/src/devices/pic/base/pic_config.cpp
+++ b/src/devices/pic/base/pic_config.cpp
@@ -289,7 +289,7 @@ TQMap<TQString, Pic::Config::MapData> &Pic::Config::masks()
(*_masks)[DATA[i].mask.name] = MapData(i, -1);
if ( DATA[i].type==MemoryRange ) {
for (uint k=0; k<Protection::MAX_NB_BLOCKS; k++)
- (*_masks)[TQString("%1_%2").tqarg(DATA[i].mask.name).tqarg(k)] = MapData(i, k);
+ (*_masks)[TQString("%1_%2").arg(DATA[i].mask.name).arg(k)] = MapData(i, k);
}
}
}
@@ -305,7 +305,7 @@ TQString Pic::Config::maskLabel(const TQString &mask)
{
const MapData &mp = masks()[mask];
TQString s = i18n(DATA[mp.index].mask.label);
- if ( mp.block>=0 ) return i18n("%1 for block %2").tqarg(s).tqarg(mp.block);
+ if ( mp.block>=0 ) return i18n("%1 for block %2").arg(s).arg(mp.block);
return s;
}
diff --git a/src/devices/pic/base/pic_protection.cpp b/src/devices/pic/base/pic_protection.cpp
index d91f1f7..8fac920 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").tqarg(mask).tqarg(0)) ) return BlockProtection;
+ if ( _config.findMask(TQString("%1_%2").arg(mask).arg(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").tqarg(maskName(type, MemoryRangeType::Code)).tqarg(block);
+ return TQString("%1_%2").arg(maskName(type, MemoryRangeType::Code)).arg(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<MAX_NB_BLOCKS; i++)
- if ( _config.findMask(TQString("CP_%1").tqarg(i))==0 ) return i;
+ if ( _config.findMask(TQString("CP_%1").arg(i))==0 ) return i;
return MAX_NB_BLOCKS;
}
@@ -357,5 +357,5 @@ TQString Pic::Protection::blockLabel(uint i) const
if ( i==0 ) return i18n("Secure Segment");
return i18n("General Segment");
}
- return i18n("Block #%1").tqarg(i);
+ return i18n("Block #%1").arg(i);
}
diff --git a/src/devices/pic/base/pic_register.cpp b/src/devices/pic/base/pic_register.cpp
index 8316805..97ff6c5 100644
--- a/src/devices/pic/base/pic_register.cpp
+++ b/src/devices/pic/base/pic_register.cpp
@@ -73,7 +73,7 @@ TQString Pic::RegistersData::label(Address address) const
{
switch ( type(address) ) {
case UnusedRegister: return "---";
- case Mirrored: return i18n("Mirror of %1").tqarg(toHexLabel(mirroredAddress(address), nbCharsAddress()));
+ case Mirrored: return i18n("Mirror of %1").arg(toHexLabel(mirroredAddress(address), nbCharsAddress()));
case Gpr: return "<GPR>";
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 4b70c3d..193891a 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 <tqlayout.h>
+#include <layout.h>
#include <tqvgroupbox.h>
#include <tqapplication.h>
diff --git a/src/devices/pic/gui/pic_config_word_editor.cpp b/src/devices/pic/gui/pic_config_word_editor.cpp
index 67c5cc9..773ed03 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 <tqlabel.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqcombobox.h>
#include <klocale.h>
@@ -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->tqsizeHint().height());
+ button->setFixedHeight(button->sizeHint().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 fa4aa56..d2ff2f4 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; k<rdata.nbBanks; k++) {
if ( !rdata.isBankUsed(k) ) continue;
- ListContainer *bbranch = (rdata.nbBanks==1 ? branch : branch->appendBranch(i18n("Bank %1").tqarg(k)));
+ ListContainer *bbranch = (rdata.nbBanks==1 ? branch : branch->appendBranch(i18n("Bank %1").arg(k)));
uint nb = 0;
for (uint i=0; i<list.count(); i++) {
if ( rdata.bankFromAddress(list[i].data().address())!=k ) continue;
diff --git a/src/devices/pic/gui/pic_hex_view.cpp b/src/devices/pic/gui/pic_hex_view.cpp
index bbcc161..0c96654 100644
--- a/src/devices/pic/gui/pic_hex_view.cpp
+++ b/src/devices/pic/gui/pic_hex_view.cpp
@@ -9,7 +9,7 @@
***************************************************************************/
#include "pic_hex_view.h"
-#include <tqlayout.h>
+#include <layout.h>
#include <tqlabel.h>
#include <klocale.h>
diff --git a/src/devices/pic/gui/pic_memory_editor.cpp b/src/devices/pic/gui/pic_memory_editor.cpp
index a964988..f62cbcb 100644
--- a/src/devices/pic/gui/pic_memory_editor.cpp
+++ b/src/devices/pic/gui/pic_memory_editor.cpp
@@ -18,7 +18,7 @@
#include <tqtooltip.h>
#include <tqregexp.h>
#include <tqcolor.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqpixmap.h>
#include <klocale.h>
@@ -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]").tqarg(toHex(r.start, nbChars)).tqarg(toHex(r.end, nbChars)));
+ else _boot.label->setText(TQString("[%1:%2]").arg(toHex(r.start, nbChars)).arg(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]").tqarg(toHex(r.start, nbChars)).tqarg(toHex(r.end, nbChars)));
+ else _blocks[i].label->setText(TQString("[%1:%2]").arg(toHex(r.start, nbChars)).arg(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").tqarg(toHexLabel(device().userIdRecommendedMask(), nbChars));
+ if ( type()==MemoryRangeType::UserId ) add = i18n(" - recommended mask: %1").arg(toHexLabel(device().userIdRecommendedMask(), nbChars));
if ( type()==MemoryRangeType::Cal && _hexview ) add = i18n(" - not programmed by default");
TQString comment = i18n("%1-bit words - mask: %2")
- .tqarg(device().nbBitsWord(type())).tqarg(toHexLabel(device().mask(type()), nbChars));
+ .arg(device().nbBitsWord(type())).arg(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 6e350ed..565ec93 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").tqarg(v));
+ else _voltages[i]->setText(TQString("%1 V").arg(v));
}
}
diff --git a/src/devices/pic/gui/pic_register_view.cpp b/src/devices/pic/gui/pic_register_view.cpp
index b640036..c852689 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 <tqlayout.h>
+#include <layout.h>
#include <tqlabel.h>
#include <tqpushbutton.h>
#include <tqcheckbox.h>
@@ -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->tqsetAlignment(AlignCenter);
+ label->setAlignment(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)").tqarg(k/2) : i18n("Bank %1 (high)").tqarg(k/2));
+ _bankCombo->insertItem((k%2)==0 ? i18n("Bank %1 (low)").arg(k/2) : i18n("Bank %1 (high)").arg(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").tqarg(i), this);
- label->tqsetAlignment(AlignCenter);
+ TQLabel *label = new TQLabel(i18n("Bank %1").arg(i), this);
+ label->setAlignment(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 311bff3..2ae250f 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").tqarg(formatNumber(nbw));
- tmp += i18n(" (%2 bits)").tqarg(pdata.nbBitsWord(MemoryRangeType::Code));
+ TQString tmp = i18n("%1 words").arg(formatNumber(nbw));
+ tmp += i18n(" (%2 bits)").arg(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").tqarg(formatNumber(nbw));
- tmp += i18n(" (%2 bits)").tqarg(pdata.nbBitsWord(MemoryRangeType::Eeprom));
+ TQString tmp = i18n("%1 bytes").arg(formatNumber(nbw));
+ tmp += i18n(" (%2 bits)").arg(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 5f86517..5ffb663 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).")
- .tqarg(toHexLabel(offset, 8)).tqarg(toHexLabel(_ranges[type][wOffset], 8)).tqarg(toHexLabel(mask, 8));
+ .arg(toHexLabel(offset, 8)).arg(toHexLabel(_ranges[type][wOffset], 8)).arg(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 9434a74..eef84cc 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::updatePorttqStatus(uint index, TQMap<uint, Device::PortBitData> &bits)
+bool Debugger::PicBase::updatePortStatus(uint index, TQMap<uint, Device::PortBitData> &bits)
{
const Pic::RegistersData &rdata = device()->registersData();
BitValue tris;
@@ -65,7 +65,7 @@ const Debugger::PicBase &Debugger::PicSpecific::base() const
return static_cast<PicBase &>(_base);
}
-bool Debugger::PicSpecific::updatetqStatus()
+bool Debugger::PicSpecific::updateStatus()
{
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")
- .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);
+ .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);
}
//----------------------------------------------------------------------------
-bool Debugger::P18FSpecific::updatetqStatus()
+bool Debugger::P18FSpecific::updateStatus()
{
- if ( !PicSpecific::updatetqStatus() ) return false;
+ if ( !PicSpecific::updateStatus() ) 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")
- .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));
+ .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));
}
diff --git a/src/devices/pic/prog/pic_debug.h b/src/devices/pic/prog/pic_debug.h
index ce08387..d73aeee 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<const Pic::Data &>(*_base.device()); }
PicBase &base();
const PicBase &base() const;
- virtual bool updatetqStatus();
+ virtual bool updateStatus();
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 updatetqStatus();
+ virtual bool updateStatus();
virtual Register::TypeData wregTypeData() const;
};
@@ -57,7 +57,7 @@ public:
const PicSpecific *deviceSpecific() const { return static_cast<const PicSpecific *>(_deviceSpecific); }
const Pic::Data *device() const { return static_cast<const Pic::Data *>(Debugger::Base::device()); }
Register::TypeData registerTypeData(const TQString &name) const;
- virtual bool updatePorttqStatus(uint index, TQMap<uint, Device::PortBitData> &bits);
+ virtual bool updatePortStatus(uint index, TQMap<uint, Device::PortBitData> &bits);
};
} // namespace
diff --git a/src/devices/pic/prog/pic_prog.cpp b/src/devices/pic/prog/pic_prog.cpp
index f0c917d..b134303 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.").tqarg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).tqarg(_voltages[i].value));
+ log(Log::LineType::Error, i18n(" %1 = %2 V: error in voltage level.").arg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).arg(_voltages[i].value));
} else if ( _voltages[i].value!=UNKNOWN_VOLTAGE )
- log(Log::DebugLevel::Normal, TQString(" %1 = %2 V").tqarg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).tqarg(_voltages[i].value));
+ log(Log::DebugLevel::Normal, TQString(" %1 = %2 V").arg(i18n(Pic::VOLTAGE_TYPE_LABELS[i])).arg(_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.min )
log(Log::LineType::Warning, i18n("Vpp (%1 V) is lower than the minimum required voltage (%2 V).")
- .tqarg(vpp()).tqarg(tvpp.min));
+ .arg(vpp()).arg(tvpp.min));
if ( vpp()>tvpp.max ) {
TQString s = i18n("Vpp (%1 V) is higher than the maximum voltage (%2 V). You may damage the device.")
- .tqarg(vpp()).tqarg(tvpp.max);
+ .arg(vpp()).arg(tvpp.max);
log(Log::LineType::Warning, s);
if ( !askContinue(s) ) {
logUserAbort();
@@ -153,15 +153,15 @@ bool Programmer::PicBase::initProgramming(Task)
if ( vdd()<tvdd.min ) {
if ( type==Pic::VddBulkErase && device()->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.")
- .tqarg(vdd()).tqarg(tvdd.min));
+ .arg(vdd()).arg(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.")
- .tqarg(vdd()).tqarg(tvdd.min));
+ .arg(vdd()).arg(tvdd.min));
else log(Log::LineType::Warning, i18n("Vdd (%1 V) is too low for programming\nMinimum required is %2 V.")
- .tqarg(vdd()).tqarg(tvdd.min));
+ .arg(vdd()).arg(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.")
- .tqarg(vdd()).tqarg(tvdd.max);
+ .arg(vdd()).arg(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")
- .tqarg(_hasProtectedCode ? "true" : "false").tqarg(_hasProtectedEeprom ? "true" : "false"));
+ .arg(_hasProtectedCode ? "true" : "false").arg(_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\"...").tqarg(device()->name()));
+ log(Log::LineType::Information, i18n("Device not autodetectable: continuing with the specified device name \"%1\"...").arg(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).").tqarg(toHexLabel(rawId, nbChars)));
+ log(Log::LineType::Error, i18n("Missing or incorrect device (Read id is %1).").arg(toHexLabel(rawId, nbChars)));
return false;
}
TQMap<TQString, Device::IdData> ids;
@@ -270,18 +270,18 @@ bool Programmer::PicBase::verifyDeviceId()
}
TQString message;
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());
} else {
- log(Log::LineType::Warning, i18n(" Unknown or incorrect device (Read id is %1).").tqarg(toHexLabel(rawId, nbChars)));
+ log(Log::LineType::Warning, i18n(" Unknown or incorrect device (Read id is %1).").arg(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\"...").tqarg(device()->name()));
+ log(Log::LineType::Information, i18n("Continue with the specified device name: \"%1\"...").arg(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").tqarg(prettyCalibration(data)));
+ log(Log::DebugLevel::Normal, TQString(" Read osccal: %1").arg(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").tqarg(prettyCalibration(data)));
+ log(Log::DebugLevel::Normal, TQString(" Read osccal backup: %1").arg(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").tqarg(toHexLabel(cdata[0], device()->nbCharsWord(Pic::MemoryRangeType::Config))));
+ log(Log::DebugLevel::Normal, TQString(" Write config with band gap bits: %2").arg(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.").tqarg(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.").arg(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.").tqarg(type.label()));
+ log(Log::LineType::Information, i18n("The selected programmer cannot read %1: operation skipped.").arg(type.label()));
return true;
}
VerifyData *vdata = (vd ? new VerifyData(vd->actions, vd->memory) : 0);
if (vdata) {
- log(Log::LineType::Information, i18n(" Verify memory: %1").tqarg(type.label()));
+ log(Log::LineType::Information, i18n(" Verify memory: %1").arg(type.label()));
if ( !(vdata->actions & IgnoreProtectedVerify) ) {
vdata->protectedRanges = static_cast<const Pic::Memory &>(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.")
- .tqarg(type.label()));
+ .arg(type.label()));
} else vdata->protectedRanges.clear();
} else {
- log(Log::LineType::Information, i18n(" Read memory: %1").tqarg(type.label()));
+ log(Log::LineType::Information, i18n(" Read memory: %1").arg(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").tqarg(mtype.label()));
+ log(Log::LineType::Information, i18n(" Write memory: %1").arg(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.").tqarg(s), message);
+ sorry(i18n("The calibration word %1 is not valid.").arg(s), message);
return false;
}
- return askContinue(i18n("Do you want to overwrite the device calibration with %1?").tqarg(s));
+ return askContinue(i18n("Do you want to overwrite the device calibration with %1?").arg(s));
}
bool Programmer::PicBase::tryProgramCalibration(const Device::Array &data, bool &success)
{
- log(Log::LineType::Information, i18n(" Write memory: %1").tqarg(Pic::MemoryRangeType(Pic::MemoryRangeType::Cal).label()));
+ log(Log::LineType::Information, i18n(" Write memory: %1").arg(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").tqarg(Pic::MemoryRangeType(Pic::MemoryRangeType::CalBackup).label()));
+ log(Log::LineType::Information, i18n(" Write memory: %1").arg(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<data.count(); i++)
diff --git a/src/devices/pic/prog/pic_prog_specific.cpp b/src/devices/pic/prog/pic_prog_specific.cpp
index c8d958b..b37febb 100644
--- a/src/devices/pic/prog/pic_prog_specific.cpp
+++ b/src/devices/pic/prog/pic_prog_specific.cpp
@@ -29,10 +29,10 @@ 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, TQString("start before align: %1").tqarg(start));
+ const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("start before align: %1").arg(start));
uint align = device().nbWordsWriteAlignment(type);
start -= start % align;
- const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("start after align: %1 (align=%2)").tqarg(start).tqarg(align));
+ const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("start after align: %1 (align=%2)").arg(start).arg(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<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("end before align: %1").tqarg(end));
+ const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("end before align: %1").arg(end));
uint align = device().nbWordsWriteAlignment(type);
if ( (end+1) % align ) end += align - (end+1) % align;
- const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("end after align: %1 (align=%2)").tqarg(end).tqarg(align));
+ const_cast<PicDeviceSpecific *>(this)->log(Log::DebugLevel::Normal, TQString("end after align: %1 (align=%2)").arg(end).arg(align));
Q_ASSERT(end<data.count());
return end;
}
@@ -99,11 +99,11 @@ 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).")
- .tqarg(type.label()).tqarg(toHexLabel(address, device().nbCharsAddress()))
- .tqarg(toHexLabel(d, device().nbCharsWord(type))).tqarg(toHexLabel(v, device().nbCharsWord(type))));
+ .arg(type.label()).arg(toHexLabel(address, device().nbCharsAddress()))
+ .arg(toHexLabel(d, device().nbCharsWord(type))).arg(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).")
- .tqarg(type.label()).tqarg(toHexLabel(address, device().nbCharsAddress()))
- .tqarg(toHexLabel(d, device().nbCharsWord(type))).tqarg(toHexLabel(v, device().nbCharsWord(type))));
+ .arg(type.label()).arg(toHexLabel(address, device().nbCharsAddress()))
+ .arg(toHexLabel(d, device().nbCharsWord(type))).arg(toHexLabel(v, device().nbCharsWord(type))));
return false;
}
diff --git a/src/devices/pic/xml/pic_xml_to_data.cpp b/src/devices/pic/xml/pic_xml_to_data.cpp
index 85eed73..9c14879 100644
--- a/src/devices/pic/xml/pic_xml_to_data.cpp
+++ b/src/devices/pic/xml/pic_xml_to_data.cpp
@@ -29,7 +29,7 @@ bool getVoltages(ProgVoltageType type, TQDomElement element)
data()->_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\"").tqarg(type.key()));
+ if ( !ok1 || !ok2 || !ok3 ) qFatal(TQString("Cannot extract voltage value for \"%1\"").arg(type.key()));
if ( data()->_voltages[type].min>data()->_voltages[type].max
|| data()->_voltages[type].nominal<data()->_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<data()->_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").tqarg(type.key()));
+ if ( data()->nbBitsWord(type)==0 ) qFatal(TQString("Architecture doesn't contain memory range %1").arg(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)").tqarg(toHexLabel(data()->_userIdRecommendedMask, 8)).tqarg(toHexLabel(data()->mask(type), 8)));
+ 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 ( 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").tqarg(cmask.name));
+ if ( !cnames.isEmpty() ) qFatal(TQString("No cname should be defined for invalid value in mask %1").arg(cmask.name));
return;
}
- if ( cvalue.name.isEmpty() ) qFatal(TQString("Empty value name in mask %1").tqarg(cmask.name));
+ if ( cvalue.name.isEmpty() ) qFatal(TQString("Empty value name in mask %1").arg(cmask.name));
if ( cmask.value.isInside(pmask) ) { // protected bits
- if ( !cnames.isEmpty() ) qFatal(TQString("Config name should be null for protected config mask \"%1\"").tqarg(cmask.name));
+ if ( !cnames.isEmpty() ) qFatal(TQString("Config name should be null for protected config mask \"%1\"").arg(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)").tqarg(cvalue.name).tqarg(cmask.name));
+ qFatal(TQString("cname not defined for \"%1\" (%2)").arg(cvalue.name).arg(cmask.name));
}
if ( cnames.count()==1 && cnames[0]=="_" ) cnames.clear();
for (uint i=0; i<uint(cnames.count()); i++) {
@@ -124,11 +124,11 @@ void processName(const Pic::Config::Mask &cmask, BitValue pmask, Pic::Config::Va
BitValue mask = cmask.value.complementInMask(maxValue(NumberBase::Hex, nbChars));
if ( ok && v==(mask | cvalue.value) ) continue;
} else if ( XOR(cnames[i].startsWith("_"), data()->architecture()==Pic::Architecture::P30F) ) continue;
- qFatal(TQString("Invalid config name for \"%1\"/\"%2\"").tqarg(cmask.name).tqarg(cvalue.name));
+ qFatal(TQString("Invalid config name for \"%1\"/\"%2\"").arg(cmask.name).arg(cvalue.name));
}
TQStringList &ecnames = cvalue.configNames[Pic::ConfigNameType::Extra];
for (uint i=0; i<uint(ecnames.count()); i++)
- if ( ecnames[i][0]!='_' ) qFatal(TQString("Invalid extra config name for %1").tqarg(cvalue.name));
+ if ( ecnames[i][0]!='_' ) qFatal(TQString("Invalid extra config name for %1").arg(cvalue.name));
}
}
@@ -140,30 +140,30 @@ Pic::Config::Mask toConfigMask(TQDomElement mask, BitValue pmask)
TQMap<Pic::ConfigNameType, TQStringList> defConfigNames;
Config::Mask cmask;
cmask.name = mask.attribute("name");
- if ( !Config::hasMaskName(cmask.name) ) qFatal(TQString("Unknown mask name %1").tqarg(cmask.name));
+ if ( !Config::hasMaskName(cmask.name) ) qFatal(TQString("Unknown mask name %1").arg(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").tqarg(mask.attribute("name")));
+ qFatal(TQString("Malformed mask value in mask %1").arg(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").tqarg(cmask.name));
+ if ( value.nodeName()!="value" ) qFatal(TQString("Non value child in mask %1").arg(cmask.name));
if ( value.attribute("value")=="default" ) {
- if ( !defName.isEmpty() ) qFatal(TQString("Default value already defined for mask %1").tqarg(cmask.name));
+ if ( !defName.isEmpty() ) qFatal(TQString("Default value already defined for mask %1").arg(cmask.name));
defName = value.attribute("name");
- //if ( names.contains(defName) ) qFatal(TQString("Value name duplicated in mask %1").tqarg(cmask.name));
+ //if ( names.contains(defName) ) qFatal(TQString("Value name duplicated in mask %1").arg(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").tqarg(cmask.name));
+ if ( !ok || !cvalue.value.isInside(cmask.value) ) qFatal(TQString("Malformed value in mask %1").arg(cmask.name));
cvalue.name = value.attribute("name");
- //if ( names.contains(cvalue.name) ) qFatal(TQString("Value name duplicated in mask %1").tqarg(cmask.name));
+ //if ( names.contains(cvalue.name) ) qFatal(TQString("Value name duplicated in mask %1").arg(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").tqarg(cmask.name));
+ if ( nb<=1 ) qFatal(TQString("Default value used less than twice in mask %1").arg(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\"").tqarg(config.attribute("wmask")));
+ if ( !ok || cword.wmask>gmask ) qFatal(TQString("Missing or malformed config wmask \"%1\"").arg(config.attribute("wmask")));
cword.bvalue = fromHexLabel(config.attribute("bvalue"), nbChars, &ok);
- if ( !ok ) qFatal(TQString("Missing or malformed config bvalue \"%1\"").tqarg(config.attribute("bvalue")));
+ if ( !ok ) qFatal(TQString("Missing or malformed config bvalue \"%1\"").arg(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; i<uint(cword.ignoredCNames.count()); i++)
- if ( cword.ignoredCNames[i][0]!='_' ) qFatal(TQString("Invalid ignored config name for %1").tqarg(cword.name));
+ if ( cword.ignoredCNames[i][0]!='_' ) qFatal(TQString("Invalid ignored config name for %1").arg(cword.name));
TQDomNode child = config.firstChild();
while ( !child.isNull() ) {
TQDomElement mask = child.toElement();
child = child.nextSibling();
if ( mask.isNull() ) continue;
- if ( mask.nodeName()!="mask" ) qFatal(TQString("Non mask child in config %1").tqarg(cword.name));
- if ( mask.attribute("name").isEmpty() ) qFatal(TQString("Empty mask name in config %1").tqarg(cword.name));
+ if ( mask.nodeName()!="mask" ) qFatal(TQString("Non mask child in config %1").arg(cword.name));
+ if ( mask.attribute("name").isEmpty() ) qFatal(TQString("Empty mask name in config %1").arg(cword.name));
Config::Mask cmask = toConfigMask(mask, cword.pmask);
- if ( !cmask.value.isInside(gmask) ) qFatal(TQString("Mask value not inside mask in config %1").tqarg(cword.name));
+ if ( !cmask.value.isInside(gmask) ) qFatal(TQString("Mask value not inside mask in config %1").arg(cword.name));
for (uint i=0; i<uint(cword.masks.count()); i++) {
- if ( cword.masks[i].name==cmask.name ) qFatal(TQString("Duplicated mask name %1 in config %2").tqarg(cmask.name).tqarg(cword.name));
- if ( cmask.value.isOverlapping(cword.masks[i].value) ) qFatal(TQString("Overlapping masks in config %1").tqarg(cword.name));
+ if ( cword.masks[i].name==cmask.name ) qFatal(TQString("Duplicated mask name %1 in config %2").arg(cmask.name).arg(cword.name));
+ if ( cmask.value.isOverlapping(cword.masks[i].value) ) qFatal(TQString("Overlapping masks in config %1").arg(cword.name));
}
cword.masks.append(cmask);
}
@@ -234,8 +234,8 @@ Pic::Config::Word toConfigWord(TQDomElement config)
bool ok;
cword.cmask = fromHexLabel(config.attribute("cmask"), nbChars, &ok);
if ( !ok || cword.cmask>gmask ) qFatal("Missing or malformed config cmask");
- //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 ( 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 ( !cword.pmask.isInside(cword.usedMask()) ) qFatal("pmask should be inside or'ed mask values.");
return cword;
@@ -255,11 +255,11 @@ TQValueVector<Pic::Config::Word> 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").tqarg(offset).tqarg(nbWords));
- if ( !configWords[offset].name.isNull() ) qFatal(TQString("Config offset %1 is duplicated").tqarg(offset));
+ 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));
for (uint i=0; i<nbWords; i++) {
if ( !configWords[i].name.isNull() && configWords[i].name==config.attribute("name") )
- qFatal(TQString("Duplicated config name %1").tqarg(configWords[i].name));
+ qFatal(TQString("Duplicated config name %1").arg(configWords[i].name));
}
configWords[offset] = toConfigWord(config);
}
@@ -320,13 +320,13 @@ TQString getChecksumData(TQDomElement checksum)
TQStringList list = TQStringList::split(" ", s);
for (uint i=0; i<uint(list.count()); i++) {
const Config::Mask *mask = data()->config().findMask(list[i]);
- if ( mask==0 ) qFatal(TQString("Not valid mask name for \"protected\" tag in checksum: %1").tqarg(list[i]));
+ if ( mask==0 ) qFatal(TQString("Not valid mask name for \"protected\" tag in checksum: %1").arg(list[i]));
if ( mask->values.count()==2 ) continue;
for (uint k=0; k<uint(mask->values.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").tqarg(list[i]));
+ qFatal(TQString("Not switch protection from mask name for \"protected\" tag in checksum: %1").arg(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\"").tqarg(arch));
+ if ( data()->_architecture==Architecture::Nb_Types ) qFatal(TQString("Unrecognized architecture \"%1\"").arg(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").tqarg(vtype.key()));
+ case ProgVoltageType::VddBulkErase: qFatal(TQString("Voltage \"%1\" not defined").arg(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)").tqarg(k.key()).tqarg(i.key()));
+ qFatal(TQString("Overlapping memory ranges (%1 and %2)").arg(k.key()).arg(i.key()));
}
}
checkTagNames(device, "memory", names);
@@ -440,7 +440,7 @@ virtual void processDevice(TQDomElement device)
FOR_EACH(Pic::ConfigNameType, type) {
TQMap<TQString, TQString> cnames; // cname -> mask name
for (uint i=0; i<nbWords; i++) {
- if ( cwords[i].name.isNull() ) qFatal(TQString("Config word #%1 not defined").tqarg(i));
+ if ( cwords[i].name.isNull() ) qFatal(TQString("Config word #%1 not defined").arg(i));
data()->_config->_words[i] = cwords[i];
const Config::Word &word = data()->_config->_words[i];
for (uint j=0; j<uint(word.masks.count()); j++) {
@@ -450,7 +450,7 @@ virtual void processDevice(TQDomElement device)
for (uint l=0; l<uint(vcnames.count()); l++) {
if ( vcnames[l].startsWith("0x") ) continue;
if ( cnames.contains(vcnames[l]) && cnames[vcnames[l]]!=mask.name )
- qFatal(TQString("Duplicated config name for %1/%2").tqarg(mask.name).tqarg(mask.values[k].name));
+ qFatal(TQString("Duplicated config name for %1/%2").arg(mask.name).arg(mask.values[k].name));
cnames[vcnames[l]] = word.masks[j].name;
}
}
@@ -466,7 +466,7 @@ virtual void processDevice(TQDomElement device)
const Config::Value &value = mask.values[k];
if ( !value.isValid() ) continue;
if ( !data()->_config->checkValueName(mask.name, value.name) )
- qFatal(TQString("Malformed value name \"%1\" in mask %2").tqarg(value.name).tqarg(mask.name));
+ qFatal(TQString("Malformed value name \"%1\" in mask %2").arg(value.name).arg(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").tqarg(toHexLabel(*it, data()->nbCharsWord(MemoryRangeType::Config))).tqarg(mask.name));
+ if ( !hasValue(mask, *it) ) qFatal(TQString("Value %1 not defined in mask %2").arg(toHexLabel(*it, data()->nbCharsWord(MemoryRangeType::Config))).arg(mask.name));
}
}
@@ -507,7 +507,7 @@ virtual void processDevice(TQDomElement device)
}
TQMap<TQString, bool>::const_iterator it;
for (it=valueNames.begin(); it!=valueNames.end(); ++it)
- if ( !it.key().isEmpty() && !it.data() ) qFatal(TQString("Missing checksum \"%1\"").tqarg(it.key()));
+ if ( !it.key().isEmpty() && !it.data() ) qFatal(TQString("Missing checksum \"%1\"").arg(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").tqarg(name).tqarg(e.attribute("address")));
+ if ( !ok ) qFatal(TQString("SFR %1 address %2 is malformed").arg(name).arg(e.attribute("address")));
uint rlength = data()->registersData().nbBanks * data()->architecture().data().registerBankLength;
- if ( address>=rlength ) qFatal(TQString("Address %1 outside register range").tqarg(toHexLabel(address, 3)));
+ if ( address>=rlength ) qFatal(TQString("Address %1 outside register range").arg(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").tqarg(nb));
+ if ( nb>Device::MAX_NB_PORT_BITS ) qFatal(TQString("Need higher MAX_NB_PORT_BITS: %1").arg(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").tqarg(k));
+ if ( !ok || rdata.bits[k].properties>MaxRegisterBitProperty ) qFatal(TQString("Malformed access bit %1").arg(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").tqarg(k));
+ if ( !ok || rdata.bits[k].mclr>Nb_RegisterBitStates ) qFatal(TQString("Malformed mclr bit %1").arg(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").tqarg(k));
+ if ( !ok || rdata.bits[k].por>Nb_RegisterBitStates ) qFatal(TQString("Malformed por bit %1").arg(k));
}
static_cast<RegistersData *>(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").tqarg(name).tqarg(e.attribute("address")));
+ if ( !ok ) qFatal(TQString("Combined %1 address %2 is malformed").arg(name).arg(e.attribute("address")));
uint rlength = data()->registersData().nbBanks * data()->architecture().data().registerBankLength;
- if ( rdata.address>=rlength ) qFatal(TQString("Address %1 outside register range").tqarg(toHexLabel(rdata.address, 3)));
+ if ( rdata.address>=rlength ) qFatal(TQString("Address %1 outside register range").arg(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").tqarg(name).tqarg(e.attribute("size")));
+ if ( !ok || rdata.nbChars<2 ) qFatal(TQString("Combined %1 size %2 is malformed").arg(name).arg(e.attribute("size")));
Address end = rdata.address + rdata.nbChars/2 - 1;
- if ( end>=rlength ) qFatal(TQString("Address %1 outside register range").tqarg(toHexLabel(end, 3)));
+ if ( end>=rlength ) qFatal(TQString("Address %1 outside register range").arg(toHexLabel(end, 3)));
static_cast<RegistersData *>(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").tqarg(s));
+ if ( !_map.contains(s) ) qFatal(TQString("Registers same as unknown device %1").arg(s));
const Pic::Data *d = static_cast<const Pic::Data *>(_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").tqarg(e.nodeName()));
+ else qFatal(TQString("Node name \"%1\" is not recognized").arg(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").tqarg(trisname).tqarg(portname));
+ if ( !hasPort && hasTris ) qFatal(TQString("%1 needs %2 to be present").arg(trisname).arg(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").tqarg(latchname).tqarg(portname));
+ if ( !hasPort && hasLatch ) qFatal(TQString("%1 needs %2 to be present").arg(latchname).arg(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").tqarg(name));
+ if ( devices.contains(name) ) qFatal(TQString("Registers already defined for %1").arg(name));
if ( _map.contains(name) ) {
_data = _map[name];
processDeviceRegisters(device);
@@ -691,7 +691,7 @@ virtual void checkPins(const TQMap<TQString, uint> &pinLabels) const
TQMap<TQString, uint>::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\"").tqarg(it.key()));
+ if ( it.data()!=1 ) qFatal(TQString("Duplicated pin \"%1\"").arg(it.key()));
}
const Pic::RegistersData &rdata = static_cast<const Pic::RegistersData &>(*_data->registersData());
for (uint i=0; i<Device::MAX_NB_PORTS; i++) {
@@ -699,7 +699,7 @@ virtual void checkPins(const TQMap<TQString, uint> &pinLabels) const
for (uint k=0; k<Device::MAX_NB_PORT_BITS; k++) {
if ( !rdata.hasPortBit(i, k) ) continue;
TQString name = rdata.portBitName(i, k);
- if ( !pinLabels.contains(name) ) qFatal(TQString("Pin \"%1\" not present").tqarg(name));
+ if ( !pinLabels.contains(name) ) qFatal(TQString("Pin \"%1\" not present").arg(name));
}
}
}