diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | d98fea1f859d23e1b1220a65d7a8eda3b757fd08 (patch) | |
tree | a7e6a450baf5017f93f73636f9e8f9b5e9a56f05 /src/xml_to_data | |
parent | 704123e8152edcd80447659317f1c8b31a1576e6 (diff) | |
download | piklab-d98fea1f859d23e1b1220a65d7a8eda3b757fd08.tar.gz piklab-d98fea1f859d23e1b1220a65d7a8eda3b757fd08.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/xml_to_data')
-rw-r--r-- | src/xml_to_data/device_xml_to_data.cpp | 10 | ||||
-rw-r--r-- | src/xml_to_data/prog_xml_to_data.h | 8 | ||||
-rw-r--r-- | src/xml_to_data/xml_to_data.cpp | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/xml_to_data/device_xml_to_data.cpp b/src/xml_to_data/device_xml_to_data.cpp index 515c6c9..c1d41ac 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.tqcontains(name) ) qFatal(TQString("Device \"%1\" already defined").tqarg(name)); + if ( _map.contains(name) ) qFatal(TQString("Device \"%1\" already defined").tqarg(name)); _data = createData(); _map[name] = _data; _data->_name = name; @@ -137,7 +137,7 @@ void Device::XmlToDataBase::processDevice(TQDomElement device) else { TQRegExp rexp("\\d{6}"); if ( !rexp.exactMatch(_data->_documents.webpage) ) qFatal(TQString("Malformed webpage \"%1\" (6 digits)").tqarg(_data->_documents.webpage)); - if ( _documents.tqcontains(_data->_documents.webpage) ) + if ( _documents.contains(_data->_documents.webpage) ) qFatal(TQString("webpage duplicated (already used for %1)").tqarg(_documents[_data->_documents.webpage])); _documents[_data->_documents.webpage] = name; } @@ -165,7 +165,7 @@ void Device::XmlToDataBase::processDevice(TQDomElement device) if ( p.pins[i].isEmpty() || p.pins[i]=="N/C" ) continue; TQStringList labels = TQStringList::split("/", p.pins[i]); for(uint k=0; k<uint(labels.count()); k++) { - if ( pinLabels.tqcontains(labels[k]) ) pinLabels[labels[k]]++; + if ( pinLabels.contains(labels[k]) ) pinLabels[labels[k]]++; else pinLabels[labels[k]] = 1; } } @@ -225,7 +225,7 @@ Device::Package Device::XmlToDataBase::processPackage(TQDomElement element) TQString name = pin.attribute("name"); if ( !name.isEmpty() && name!="N/C" ) { TQStringList labels = TQStringList::split("/", name); - if ( name.tqcontains(" ") || labels.count()==0 ) qFatal("Malformed pin name"); + if ( name.contains(" ") || labels.count()==0 ) qFatal("Malformed pin name"); if ( name!=name.upper() ) qFatal("Pin name should be uppercase"); } package.pins[i-1] = name; @@ -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.tqcontains(*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").tqarg((*lit)).tqarg(ait.key())); } } diff --git a/src/xml_to_data/prog_xml_to_data.h b/src/xml_to_data/prog_xml_to_data.h index 6eea337..e45e6e1 100644 --- a/src/xml_to_data/prog_xml_to_data.h +++ b/src/xml_to_data/prog_xml_to_data.h @@ -28,7 +28,7 @@ protected: TQString _basename, _namespace; virtual bool hasFamilies() const { return true; } const TQStringList &families() const { return _families; } - virtual uint familyIndex(const TQString &family) const { return _families.tqfindIndex(family); } + virtual uint familyIndex(const TQString &family) const { return _families.findIndex(family); } virtual void parseData(TQDomElement, Data &) = 0; virtual void includes(TQTextStream &) const {} virtual void outputData(const Data &, TQTextStream &) const {} @@ -36,7 +36,7 @@ protected: virtual TQString currentDevice() const { return _current; } virtual void parseDevice(TQDomElement element); ::Group::Support extractSupport(const TQString &s) const; - bool hasDevice(const TQString &device) const { return _map.tqcontains(device); } + bool hasDevice(const TQString &device) const { return _map.contains(device); } virtual void parse(); protected: @@ -69,12 +69,12 @@ void ExtXmlToData<Data>::parseDevice(TQDomElement element) if ( element.nodeName()!="device" ) qFatal("Root node child should be named \"device\""); _current = element.attribute("name").upper(); if ( Device::lister().data(_current)==0 ) qFatal(TQString("Device name \"%1\" unknown").tqarg(_current)); - if ( _map.tqcontains(_current) ) qFatal(TQString("Device \"%1\" already parsed").tqarg(_current)); + if ( _map.contains(_current) ) qFatal(TQString("Device \"%1\" already parsed").tqarg(_current)); PData data; if ( hasFamilies() ) { TQString family = element.attribute("family"); if ( family.isEmpty() ) qFatal(TQString("Family is empty").tqarg(family)); - if ( _families.tqfind(family)==_families.end() ) _families.append(family); + if ( _families.find(family)==_families.end() ) _families.append(family); data.family = familyIndex(family); } data.support = extractSupport(element.attribute("support_type")); diff --git a/src/xml_to_data/xml_to_data.cpp b/src/xml_to_data/xml_to_data.cpp index 65dc463..39eba60 100644 --- a/src/xml_to_data/xml_to_data.cpp +++ b/src/xml_to_data/xml_to_data.cpp @@ -34,7 +34,7 @@ void XmlToData::checkTagNames(TQDomElement element, const TQString &tag, for (uint i=0; i<uint(list.count()); i++) { if ( !list.item(i).isElement() ) continue; TQString name = list.item(i).toElement().attribute("name"); - if ( names.tqfind(name)==names.end() ) qFatal(TQString("Illegal name %1 for %2 element").tqarg(name).tqarg(tag)); + if ( names.find(name)==names.end() ) qFatal(TQString("Illegal name %1 for %2 element").tqarg(name).tqarg(tag)); } } |