diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:57:30 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:57:30 -0600 |
commit | ad1fc5fc8eadb9b63e8767e57ac41cbac84f7eb7 (patch) | |
tree | c47273eb6595f763c282d33fb89affe1f8866120 /src/xml_to_data/device_xml_to_data.cpp | |
parent | 9d6927a7d6a543332f828bffedf65eecf6774c6d (diff) | |
download | piklab-ad1fc5fc8eadb9b63e8767e57ac41cbac84f7eb7.tar.gz piklab-ad1fc5fc8eadb9b63e8767e57ac41cbac84f7eb7.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 9d6927a7d6a543332f828bffedf65eecf6774c6d.
Diffstat (limited to 'src/xml_to_data/device_xml_to_data.cpp')
-rw-r--r-- | src/xml_to_data/device_xml_to_data.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/xml_to_data/device_xml_to_data.cpp b/src/xml_to_data/device_xml_to_data.cpp index c0861d4..c1d41ac 100644 --- a/src/xml_to_data/device_xml_to_data.cpp +++ b/src/xml_to_data/device_xml_to_data.cpp @@ -10,7 +10,7 @@ #include <tqdir.h> #include <tqfile.h> -#include <textstream.h> +#include <tqtextstream.h> #include <tqregexp.h> bool Device::XmlToDataBase::getFrequencyRange(OperatingCondition oc, Special special, TQDomElement element) @@ -84,27 +84,27 @@ 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").arg(name)); + if ( _map.contains(name) ) qFatal(TQString("Device \"%1\" already defined").tqarg(name)); _data = createData(); _map[name] = _data; _data->_name = name; _data->_alternatives = TQStringList::split(' ', device.attribute("alternative")); if ( _data->_alternatives.count() ) _alternatives[name] = _data->_alternatives; - _data->_status = Status::fromKey(device.attribute("status")); + _data->_status = tqStatus::fromKey(device.attribute("status")); switch (_data->_status.type()) { - case Status::Nb_Types: + case tqStatus::Nb_Types: qFatal("Unrecognized or absent device status"); break; - case Status::Future: + case tqStatus::Future: if ( _data->_alternatives.count() ) qFatal("Future device has alternative"); break; - case Status::NotRecommended: - case Status::Mature: + case tqStatus::NotRecommended: + case tqStatus::Mature: if ( _data->_alternatives.count()==0 ) warning("Not-recommended/mature device has no alternative"); break; - case Status::InProduction: - case Status::EOL: - case Status::Unknown: break; + case tqStatus::InProduction: + case tqStatus::EOL: + case tqStatus::Unknown: break; } // document @@ -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)").arg(_data->_documents.datasheet)); + if ( !rexp.exactMatch(_data->_documents.datasheet) ) qFatal(TQString("Malformed datasheet \"%1\" (5 digits)").tqarg(_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)").arg(_data->_documents.progsheet)); + if ( !rexp.exactMatch(_data->_documents.datasheet) ) qFatal(TQString("Malformed progsheet \"%1\" (5 digits)").tqarg(_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)").arg(errata)); + qFatal(TQString("Malformed erratas \"%1\" (5 digits or 5 digits + e + 1 digit or \"er\" + name)").tqarg(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)").arg(_data->_documents.webpage)); + if ( !rexp.exactMatch(_data->_documents.webpage) ) qFatal(TQString("Malformed webpage \"%1\" (6 digits)").tqarg(_data->_documents.webpage)); if ( _documents.contains(_data->_documents.webpage) ) - qFatal(TQString("webpage duplicated (already used for %1)").arg(_documents[_data->_documents.webpage])); + qFatal(TQString("webpage duplicated (already used for %1)").tqarg(_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").arg(types[k])); + if ( package.types[j]==i ) qFatal(TQString("Duplicated package type %1").tqarg(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)").arg(types[k]).arg(nb).arg(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)").tqarg(types[k]).tqarg(nb).tqarg(Package::TYPE_DATA[i].nbPins[0])); package.types.append(i); break; } - if ( Package::TYPE_DATA[i].name==0 ) qFatal(TQString("Unknown package type \"%1\"").arg(types[k])); + if ( Package::TYPE_DATA[i].name==0 ) qFatal(TQString("Unknown package type \"%1\"").tqarg(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\"").arg(name)); + } else if ( (nb%2)!=0 ) qFatal(TQString("\"nb_pins\" should be even for package \"%1\"").tqarg(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").arg(i+1)); + else for (uint i=0; i<nb; i++) if ( !found[i] ) qFatal(TQString("Pin #%1 not specified").tqarg(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").arg((*lit)).arg(ait.key())); + if ( !_map.contains(*lit) ) qFatal(TQString("Unknown alternative %1 for device %2").tqarg((*lit)).tqarg(ait.key())); } } |