summaryrefslogtreecommitdiffstats
path: root/src/xml_to_data/device_xml_to_data.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-19 11:40:25 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-19 11:40:25 -0600
commit4374b9aebc67cce74e5c1099d5f4ad1749b05fc6 (patch)
tree8f99491ad0bd6e9632a912f07acdccebd2af9127 /src/xml_to_data/device_xml_to_data.cpp
parent9d9fe02a944fe0719c2475739411727a729251ad (diff)
downloadpiklab-4374b9aebc67cce74e5c1099d5f4ad1749b05fc6.tar.gz
piklab-4374b9aebc67cce74e5c1099d5f4ad1749b05fc6.zip
Remove additional unneeded tq method conversions
Diffstat (limited to 'src/xml_to_data/device_xml_to_data.cpp')
-rw-r--r--src/xml_to_data/device_xml_to_data.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/xml_to_data/device_xml_to_data.cpp b/src/xml_to_data/device_xml_to_data.cpp
index 3389664..3f0dcc0 100644
--- a/src/xml_to_data/device_xml_to_data.cpp
+++ b/src/xml_to_data/device_xml_to_data.cpp
@@ -84,7 +84,7 @@ void Device::XmlToDataBase::processDevice(TQDomElement device)
{
TQString name = device.attribute("name").upper();
if ( name.isEmpty() ) qFatal("Device has no name");
- if ( _map.contains(name) ) qFatal(TQString("Device \"%1\" already defined").tqarg(name));
+ if ( _map.contains(name) ) qFatal(TQString("Device \"%1\" already defined").arg(name));
_data = createData();
_map[name] = _data;
_data->_name = name;
@@ -119,26 +119,26 @@ void Device::XmlToDataBase::processDevice(TQDomElement device)
_data->_documents.datasheet = documents.attribute("datasheet");
TQRegExp rexp("\\d{5}");
if ( _data->_documents.datasheet=="?" ) warning("No datasheet specified");
- if ( !rexp.exactMatch(_data->_documents.datasheet) ) qFatal(TQString("Malformed datasheet \"%1\" (5 digits)").tqarg(_data->_documents.datasheet));
+ if ( !rexp.exactMatch(_data->_documents.datasheet) ) qFatal(TQString("Malformed datasheet \"%1\" (5 digits)").arg(_data->_documents.datasheet));
_data->_documents.progsheet = documents.attribute("progsheet");
if ( _data->_documents.progsheet=="?" ) warning("No progsheet specified");
- if ( !rexp.exactMatch(_data->_documents.datasheet) ) qFatal(TQString("Malformed progsheet \"%1\" (5 digits)").tqarg(_data->_documents.progsheet));
+ if ( !rexp.exactMatch(_data->_documents.datasheet) ) qFatal(TQString("Malformed progsheet \"%1\" (5 digits)").arg(_data->_documents.progsheet));
_data->_documents.erratas = TQStringList::split(" ", documents.attribute("erratas"));
for (uint i=0; i<uint(_data->_documents.erratas.count()); i++) {
TQString errata = _data->_documents.erratas[i];
if ( !rexp.exactMatch(errata) ) {
TQRegExp rexp2("\\d{5}e\\d");
if ( !rexp2.exactMatch(errata) && !errata.startsWith("er") && errata.mid(2)!=_data->_name.lower() )
- qFatal(TQString("Malformed erratas \"%1\" (5 digits or 5 digits + e + 1 digit or \"er\" + name)").tqarg(errata));
+ qFatal(TQString("Malformed erratas \"%1\" (5 digits or 5 digits + e + 1 digit or \"er\" + name)").arg(errata));
}
}
}
if ( _data->_documents.webpage=="?" ) warning("No webpage specified");
else {
TQRegExp rexp("\\d{6}");
- if ( !rexp.exactMatch(_data->_documents.webpage) ) qFatal(TQString("Malformed webpage \"%1\" (6 digits)").tqarg(_data->_documents.webpage));
+ if ( !rexp.exactMatch(_data->_documents.webpage) ) qFatal(TQString("Malformed webpage \"%1\" (6 digits)").arg(_data->_documents.webpage));
if ( _documents.contains(_data->_documents.webpage) )
- qFatal(TQString("webpage duplicated (already used for %1)").tqarg(_documents[_data->_documents.webpage]));
+ qFatal(TQString("webpage duplicated (already used for %1)").arg(_documents[_data->_documents.webpage]));
_documents[_data->_documents.webpage] = name;
}
@@ -194,21 +194,21 @@ Device::Package Device::XmlToDataBase::processPackage(TQDomElement element)
for (; Package::TYPE_DATA[i].name; i++) {
if ( types[k]!=Package::TYPE_DATA[i].name ) continue;
for (uint j=0; j<uint(package.types.count()); j++)
- if ( package.types[j]==i ) qFatal(TQString("Duplicated package type %1").tqarg(types[k]));
+ if ( package.types[j]==i ) qFatal(TQString("Duplicated package type %1").arg(types[k]));
uint j = 0;
for (; j<Package::MAX_NB; j++)
if ( nb==Package::TYPE_DATA[i].nbPins[j] ) break;
- if ( j==Package::MAX_NB ) qFatal(TQString("Package %1 does not have the correct number of pins %2 (%3)").tqarg(types[k]).tqarg(nb).tqarg(Package::TYPE_DATA[i].nbPins[0]));
+ if ( j==Package::MAX_NB ) qFatal(TQString("Package %1 does not have the correct number of pins %2 (%3)").arg(types[k]).arg(nb).arg(Package::TYPE_DATA[i].nbPins[0]));
package.types.append(i);
break;
}
- if ( Package::TYPE_DATA[i].name==0 ) qFatal(TQString("Unknown package type \"%1\"").tqarg(types[k]));
+ if ( Package::TYPE_DATA[i].name==0 ) qFatal(TQString("Unknown package type \"%1\"").arg(types[k]));
}
// pins
TQString name = Package::TYPE_DATA[package.types[0]].name;
if ( name=="sot23" ) {
if ( package.types.count()!=1 ) qFatal("SOT23 should be a specific package");
- } else if ( (nb%2)!=0 ) qFatal(TQString("\"nb_pins\" should be even for package \"%1\"").tqarg(name));
+ } else if ( (nb%2)!=0 ) qFatal(TQString("\"nb_pins\" should be even for package \"%1\"").arg(name));
uint have_pins = false;
TQMemArray<bool> found(nb);
found.fill(false);
@@ -234,7 +234,7 @@ Device::Package Device::XmlToDataBase::processPackage(TQDomElement element)
child = child.nextSibling();
}
if ( !have_pins ) ;//warning("Pins not specified"); // #### REMOVE ME !!
- else for (uint i=0; i<nb; i++) if ( !found[i] ) qFatal(TQString("Pin #%1 not specified").tqarg(i+1));
+ else for (uint i=0; i<nb; i++) if ( !found[i] ) qFatal(TQString("Pin #%1 not specified").arg(i+1));
return package;
}
@@ -255,6 +255,6 @@ void Device::XmlToDataBase::parse()
for (; ait!=_alternatives.end(); ++ait) {
TQStringList::const_iterator lit = ait.data().begin();
for (; lit!=ait.data().end(); ++lit)
- if ( !_map.contains(*lit) ) qFatal(TQString("Unknown alternative %1 for device %2").tqarg((*lit)).tqarg(ait.key()));
+ if ( !_map.contains(*lit) ) qFatal(TQString("Unknown alternative %1 for device %2").arg((*lit)).arg(ait.key()));
}
}