summaryrefslogtreecommitdiffstats
path: root/src/devices/pic/xml
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:33:27 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:33:27 -0600
commit9d6927a7d6a543332f828bffedf65eecf6774c6d (patch)
tree9f8210096908fddb7d266b477152021c45fa1a00 /src/devices/pic/xml
parent3534213800bd8d151759df307755f2bbd592dfa1 (diff)
downloadpiklab-9d6927a7d6a543332f828bffedf65eecf6774c6d.tar.gz
piklab-9d6927a7d6a543332f828bffedf65eecf6774c6d.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'src/devices/pic/xml')
-rw-r--r--src/devices/pic/xml/pic_xml_to_data.cpp114
1 files changed, 57 insertions, 57 deletions
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));
}
}
}