summaryrefslogtreecommitdiffstats
path: root/src/devices
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commitd98fea1f859d23e1b1220a65d7a8eda3b757fd08 (patch)
treea7e6a450baf5017f93f73636f9e8f9b5e9a56f05 /src/devices
parent704123e8152edcd80447659317f1c8b31a1576e6 (diff)
downloadpiklab-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/devices')
-rw-r--r--src/devices/base/register.cpp6
-rw-r--r--src/devices/base/register.h2
-rw-r--r--src/devices/gui/memory_editor.cpp12
-rw-r--r--src/devices/gui/register_view.cpp4
-rw-r--r--src/devices/mem24/xml/mem24_xml_to_data.cpp4
-rw-r--r--src/devices/pic/base/pic.cpp32
-rw-r--r--src/devices/pic/base/pic_config.cpp2
-rw-r--r--src/devices/pic/base/pic_register.cpp14
-rw-r--r--src/devices/pic/gui/pic_memory_editor.cpp6
-rw-r--r--src/devices/pic/pic/pic_memory.cpp6
-rw-r--r--src/devices/pic/prog/pic_debug.cpp2
-rw-r--r--src/devices/pic/prog/pic_prog.cpp2
-rw-r--r--src/devices/pic/prog/pic_prog_specific.cpp2
-rw-r--r--src/devices/pic/xml/pic_xml_to_data.cpp38
14 files changed, 66 insertions, 66 deletions
diff --git a/src/devices/base/register.cpp b/src/devices/base/register.cpp
index dcd4c18..946f668 100644
--- a/src/devices/base/register.cpp
+++ b/src/devices/base/register.cpp
@@ -83,7 +83,7 @@ void Register::List::init()
void Register::List::setWatched(const TypeData &data, bool watched)
{
if (watched) {
- if ( _watched.tqcontains(data) ) return;
+ if ( _watched.contains(data) ) return;
_watched.append(data);
} else _watched.remove(data);
delayedChanged();
@@ -122,7 +122,7 @@ void Register::List::setPortData(uint index, const TQMap<uint, Device::PortBitDa
BitValue Register::List::value(const TypeData &data) const
{
if ( !data.address().isValid() ) {
- if ( !_specials.tqcontains(data.name()) ) return BitValue();
+ if ( !_specials.contains(data.name()) ) return BitValue();
return _specials[data.name()].current;
}
Q_ASSERT( (data.nbChars()%2)==0 );
@@ -140,7 +140,7 @@ BitValue Register::List::value(const TypeData &data) const
BitValue Register::List::oldValue(const TypeData &data) const
{
if ( !data.address().isValid() ) {
- if ( !_specials.tqcontains(data.name()) ) return BitValue();
+ if ( !_specials.contains(data.name()) ) return BitValue();
return _specials[data.name()].old;
}
Q_ASSERT( (data.nbChars()%2)==0 );
diff --git a/src/devices/base/register.h b/src/devices/base/register.h
index 5e89f91..3936ad1 100644
--- a/src/devices/base/register.h
+++ b/src/devices/base/register.h
@@ -103,7 +103,7 @@ public:
void setWatched(const TypeData &data, bool watched);
void clearWatched();
const TQValueList<TypeData> &watched() const { return _watched; }
- bool isWatched(const TypeData &data) const { return _watched.tqcontains(data); }
+ bool isWatched(const TypeData &data) const { return _watched.contains(data); }
void setValue(const TypeData &data, BitValue value);
BitValue value(const TypeData &data) const;
BitValue oldValue(const TypeData &data) const;
diff --git a/src/devices/gui/memory_editor.cpp b/src/devices/gui/memory_editor.cpp
index 4504e6b..6679a57 100644
--- a/src/devices/gui/memory_editor.cpp
+++ b/src/devices/gui/memory_editor.cpp
@@ -167,7 +167,7 @@ void Device::MemoryRangeEditor::setIndex(int index)
void Device::MemoryRangeEditor::moveNext()
{
- TQValueList<HexWordEditor *>::iterator it = _editors.tqfind((HexWordEditor *)sender());
+ TQValueList<HexWordEditor *>::iterator it = _editors.find((HexWordEditor *)sender());
++it;
if ( it==_editors.end() || (*it)->offset()==-1 ) {
if ( current()==uint(_scrollbar->maxValue()) ) return; // at end
@@ -178,7 +178,7 @@ void Device::MemoryRangeEditor::moveNext()
void Device::MemoryRangeEditor::movePrev()
{
- TQValueList<HexWordEditor *>::iterator it = _editors.tqfind((HexWordEditor *)sender());
+ TQValueList<HexWordEditor *>::iterator it = _editors.find((HexWordEditor *)sender());
if ( it==_editors.begin() ) {
if ( current()==0 ) return; // at beginning
setIndex(current()-1);
@@ -209,7 +209,7 @@ void Device::MemoryRangeEditor::moveLast()
void Device::MemoryRangeEditor::moveUp()
{
- int i = _editors.tqfindIndex((HexWordEditor *)sender());
+ int i = _editors.findIndex((HexWordEditor *)sender());
uint line = i / _nbCols;
if ( line==0 ) {
if ( current()==0 ) return; // on first line
@@ -220,7 +220,7 @@ void Device::MemoryRangeEditor::moveUp()
void Device::MemoryRangeEditor::moveDown()
{
- int i = _editors.tqfindIndex((HexWordEditor *)sender());
+ int i = _editors.findIndex((HexWordEditor *)sender());
uint line = i / _nbCols;
if ( line+1==_nbLines ) {
if ( current()==uint(_scrollbar->maxValue()) ) return; // on last line
@@ -232,7 +232,7 @@ void Device::MemoryRangeEditor::moveDown()
void Device::MemoryRangeEditor::moveNextPage()
{
- int i = _editors.tqfindIndex((HexWordEditor *)sender());
+ int i = _editors.findIndex((HexWordEditor *)sender());
if ( _nbLines>(uint(_scrollbar->maxValue()) - current()) ) i = (_nbLines-1) * _nbCols + (i % _nbCols);
else setIndex(current()+_nbLines);
if ( _editors[i]->offset()==-1 ) _editors[i-_nbCols]->setFocus();
@@ -241,7 +241,7 @@ void Device::MemoryRangeEditor::moveNextPage()
void Device::MemoryRangeEditor::movePrevPage()
{
- int i = _editors.tqfindIndex((HexWordEditor *)sender());
+ int i = _editors.findIndex((HexWordEditor *)sender());
if ( current()<_nbLines ) i = (i % _nbCols);
else setIndex(current()-_nbLines);
_editors[i]->setFocus();
diff --git a/src/devices/gui/register_view.cpp b/src/devices/gui/register_view.cpp
index bf49574..c1fa3a6 100644
--- a/src/devices/gui/register_view.cpp
+++ b/src/devices/gui/register_view.cpp
@@ -102,9 +102,9 @@ TQString Register::ListViewItem::text() const
int Register::ListViewItem::compare(TQListViewItem *item, int, bool) const
{
const TypeData &data = static_cast<ListViewItem *>(item)->data();
- int i1 = list().watched().tqfindIndex(data);
+ int i1 = list().watched().findIndex(data);
Q_ASSERT( i1!=-1 );
- int i2 = list().watched().tqfindIndex(_data);
+ int i2 = list().watched().findIndex(_data);
Q_ASSERT( i2!=-1 );
return ( i1-i2 );
}
diff --git a/src/devices/mem24/xml/mem24_xml_to_data.cpp b/src/devices/mem24/xml/mem24_xml_to_data.cpp
index d38d669..81fd7bb 100644
--- a/src/devices/mem24/xml/mem24_xml_to_data.cpp
+++ b/src/devices/mem24/xml/mem24_xml_to_data.cpp
@@ -45,8 +45,8 @@ virtual void processDevice(TQDomElement device)
virtual void checkPins(const TQMap<TQString, uint> &pinLabels) const
{
- if ( !pinLabels.tqcontains("VCC") ) qFatal("No VDD pin specified");
- if ( !pinLabels.tqcontains("VSS") ) qFatal("No VSS pin specified");
+ if ( !pinLabels.contains("VCC") ) qFatal("No VDD pin specified");
+ if ( !pinLabels.contains("VSS") ) qFatal("No VSS pin specified");
TQMap<TQString, uint>::const_iterator it;
for (it=pinLabels.begin(); it!=pinLabels.end(); ++it)
if ( it.data()!=1 ) qFatal(TQString("Duplicated pin %1").tqarg(it.key()));
diff --git a/src/devices/pic/base/pic.cpp b/src/devices/pic/base/pic.cpp
index fd8622b..e9df77e 100644
--- a/src/devices/pic/base/pic.cpp
+++ b/src/devices/pic/base/pic.cpp
@@ -149,11 +149,11 @@ TQString Pic::Data::fname(Device::Special special) const
break;
case Device::Special::LowVoltage:
// assume name is of form "NNXN..."
- s.tqreplace(2, 1, "LV");
+ s.replace(2, 1, "LV");
break;
case Device::Special::HighVoltage:
// assume name is of form "NNXN..."
- s.tqreplace(2, 1, "HV");
+ s.replace(2, 1, "HV");
break;
case Device::Special::Nb_Types: Q_ASSERT(false); break;
}
@@ -261,21 +261,21 @@ bool Pic::Data::hasFeature(Feature feature, bool *unknown) const
if (unknown) *unknown = !ok;
if (!ok) return false;
switch (feature.type()) {
- case Feature::CCP: return registersData().sfrs.tqcontains("CCP1CON");
- case Feature::ADC: return registersData().sfrs.tqcontains("ADCON0");
- case Feature::SSP: return registersData().sfrs.tqcontains("SSPCON");
- case Feature::LVD: return registersData().sfrs.tqcontains("LVDCON");
- case Feature::USB: return registersData().sfrs.tqcontains("UCON");
+ case Feature::CCP: return registersData().sfrs.contains("CCP1CON");
+ case Feature::ADC: return registersData().sfrs.contains("ADCON0");
+ case Feature::SSP: return registersData().sfrs.contains("SSPCON");
+ case Feature::LVD: return registersData().sfrs.contains("LVDCON");
+ case Feature::USB: return registersData().sfrs.contains("UCON");
case Feature::USART:
- return ( registersData().sfrs.tqcontains("TXSTA") // 16F
- || registersData().sfrs.tqcontains("TXSTA1") // 18F
- || registersData().sfrs.tqcontains("U1MODE") ); // 30F
- case Feature::CAN: return registersData().sfrs.tqcontains("CANCON") && !registersData().sfrs.tqcontains("ECANCON");
- case Feature::ECAN: return registersData().sfrs.tqcontains("ECANCON");
- case Feature::Ethernet: return registersData().sfrs.tqcontains("ETHCON1");
- case Feature::LCD: return registersData().sfrs.tqcontains("LCDCON");
- case Feature::MotorControl: return registersData().sfrs.tqcontains("PWMCON0");
- case Feature::MotionFeedback: return registersData().sfrs.tqcontains("CAP1CON");
+ return ( registersData().sfrs.contains("TXSTA") // 16F
+ || registersData().sfrs.contains("TXSTA1") // 18F
+ || registersData().sfrs.contains("U1MODE") ); // 30F
+ case Feature::CAN: return registersData().sfrs.contains("CANCON") && !registersData().sfrs.contains("ECANCON");
+ case Feature::ECAN: return registersData().sfrs.contains("ECANCON");
+ case Feature::Ethernet: return registersData().sfrs.contains("ETHCON1");
+ case Feature::LCD: return registersData().sfrs.contains("LCDCON");
+ case Feature::MotorControl: return registersData().sfrs.contains("PWMCON0");
+ case Feature::MotionFeedback: return registersData().sfrs.contains("CAP1CON");
case Feature::SelfWrite: return _selfWrite==SelfWrite::Yes;
case Feature::Nb_Types: Q_ASSERT(false); break;
}
diff --git a/src/devices/pic/base/pic_config.cpp b/src/devices/pic/base/pic_config.cpp
index 6e59d90..ac472e9 100644
--- a/src/devices/pic/base/pic_config.cpp
+++ b/src/devices/pic/base/pic_config.cpp
@@ -298,7 +298,7 @@ TQMap<TQString, Pic::Config::MapData> &Pic::Config::masks()
bool Pic::Config::hasMaskName(const TQString &tqmask)
{
- return masks().tqcontains(tqmask);
+ return masks().contains(tqmask);
}
TQString Pic::Config::maskLabel(const TQString &tqmask)
diff --git a/src/devices/pic/base/pic_register.cpp b/src/devices/pic/base/pic_register.cpp
index b5dc616..8316805 100644
--- a/src/devices/pic/base/pic_register.cpp
+++ b/src/devices/pic/base/pic_register.cpp
@@ -84,8 +84,8 @@ TQString Pic::RegistersData::label(Address address) const
bool Pic::RegistersData::hasPort(uint index) const
{
Q_ASSERT( index<Device::MAX_NB_PORTS );
- if ( sfrs.tqcontains("GPIO") ) return ( index==0 );
- if ( !sfrs.tqcontains(portName(index)) ) return false;
+ if ( sfrs.contains("GPIO") ) return ( index==0 );
+ if ( !sfrs.contains(portName(index)) ) return false;
return true;
}
@@ -109,7 +109,7 @@ bool Pic::RegistersData::hasPortBit(uint index, uint bit) const
TQString Pic::RegistersData::portName(uint index) const
{
- if ( sfrs.tqcontains("GPIO") ) {
+ if ( sfrs.contains("GPIO") ) {
if ( index!=0 ) return TQString();
return "GPIO";
}
@@ -118,7 +118,7 @@ TQString Pic::RegistersData::portName(uint index) const
TQString Pic::RegistersData::trisName(uint index) const
{
- if ( sfrs.tqcontains("GPIO") ) {
+ if ( sfrs.contains("GPIO") ) {
if ( index!=0 ) return TQString();
return "TRISIO";
}
@@ -133,7 +133,7 @@ bool Pic::RegistersData::hasTris(uint index) const
{
TQString name = trisName(index);
if ( name.isEmpty() ) return false;
- return sfrs.tqcontains(name);
+ return sfrs.contains(name);
}
TQString Pic::RegistersData::latchName(uint index) const
@@ -147,12 +147,12 @@ bool Pic::RegistersData::hasLatch(uint index) const
{
TQString name = latchName(index);
if ( name.isEmpty() ) return false;
- return sfrs.tqcontains(name);
+ return sfrs.contains(name);
}
TQString Pic::RegistersData::portBitName(uint index, uint bit) const
{
- if ( sfrs.tqcontains("GPIO") ) return TQString("GP") + TQString::number(bit);
+ if ( sfrs.contains("GPIO") ) return TQString("GP") + TQString::number(bit);
return TQString("R") + char('A' + index) + TQString::number(bit);
}
diff --git a/src/devices/pic/gui/pic_memory_editor.cpp b/src/devices/pic/gui/pic_memory_editor.cpp
index 50f686a..bb06f3d 100644
--- a/src/devices/pic/gui/pic_memory_editor.cpp
+++ b/src/devices/pic/gui/pic_memory_editor.cpp
@@ -220,14 +220,14 @@ void Pic::MemoryRangeEditor::updateDisplay()
void Pic::MemoryRangeEditor::updateAddressColor(uint i, Address address)
{
- if ( _codeProtected.tqcontains(address) )
+ if ( _codeProtected.contains(address) )
_addresses[i]->setPaletteBackgroundColor(MemoryEditorLegend::protectedColor());
else _addresses[i]->unsetPalette();
_blocks[i]->unsetPalette();
if ( type()==MemoryRangeType::Code ) {
- if ( _bootRange.tqcontains(address) ) _blocks[i]->setPaletteBackgroundColor(MemoryEditorLegend::bootColor());
+ if ( _bootRange.contains(address) ) _blocks[i]->setPaletteBackgroundColor(MemoryEditorLegend::bootColor());
else for (uint k=0; k<_blockRanges.count(); k++) {
- if ( !_blockRanges[k].tqcontains(address) ) continue;
+ if ( !_blockRanges[k].contains(address) ) continue;
_blocks[i]->setPaletteBackgroundColor(MemoryEditorLegend::blockColor(k));
break;
}
diff --git a/src/devices/pic/pic/pic_memory.cpp b/src/devices/pic/pic/pic_memory.cpp
index cff538d..1a90efe 100644
--- a/src/devices/pic/pic/pic_memory.cpp
+++ b/src/devices/pic/pic/pic_memory.cpp
@@ -348,7 +348,7 @@ BitValue Pic::Memory::checksum() const
TQString maskName = protection.maskName(Protection::ProgramProtected, MemoryRangeType::Code);
TQString valueName = findValue(maskName);
const TQMap<TQString, Checksum::Data> &checksums = device().checksums();
- if ( checksums.tqcontains(valueName) ) { // #### REMOVE ME !!
+ if ( checksums.contains(valueName) ) { // #### REMOVE ME !!
algorithm = checksums[valueName].algorithm;
cs = checksums[valueName].constant;
}
@@ -356,14 +356,14 @@ BitValue Pic::Memory::checksum() const
//qDebug("constant: %s", toHexLabelAbs(cs).data());
//qDebug("algo: %s", Checksum::ALGORITHM_DATA[algorithm].name);
for (uint i=0; i<device().nbWords(MemoryRangeType::Code); i++) {
- if ( algorithm==Checksum::Algorithm::Normal && rv.tqcontains(inc*i) ) continue;
+ if ( algorithm==Checksum::Algorithm::Normal && rv.contains(inc*i) ) continue;
BitValue v = word(MemoryRangeType::Code, i).maskWith(tqmask);
//if ( i==0 || i==device().nbWords(MemoryRangeType::Code)-1 ) qDebug("%s %s", toHexLabel(i, 4).latin1(), toHexLabel(v, 4).latin1());
switch (device().architecture().type()) {
case Architecture::P10X:
case Architecture::P16X:
case Architecture::P17C:
- if ( rv.tqcontains(i) ) {
+ if ( rv.contains(i) ) {
switch (algorithm.type()) {
case Checksum::Algorithm::Normal: cs += v; break;
case Checksum::Algorithm::XOR4: cs += v.XORn(4); break;
diff --git a/src/devices/pic/prog/pic_debug.cpp b/src/devices/pic/prog/pic_debug.cpp
index ebdcd75..9434a74 100644
--- a/src/devices/pic/prog/pic_debug.cpp
+++ b/src/devices/pic/prog/pic_debug.cpp
@@ -16,7 +16,7 @@
Register::TypeData Debugger::PicBase::registerTypeData(const TQString &name) const
{
const Pic::RegistersData &rdata = device()->registersData();
- Q_ASSERT(rdata.sfrs.tqcontains(name));
+ Q_ASSERT(rdata.sfrs.contains(name));
return Register::TypeData(rdata.sfrs[name].address, rdata.nbChars());
}
diff --git a/src/devices/pic/prog/pic_prog.cpp b/src/devices/pic/prog/pic_prog.cpp
index da0b1ca..42eeafb 100644
--- a/src/devices/pic/prog/pic_prog.cpp
+++ b/src/devices/pic/prog/pic_prog.cpp
@@ -271,7 +271,7 @@ bool Programmer::PicBase::verifyDeviceId()
TQString message;
if ( ids.count()!=0 ) {
log(Log::LineType::Information, i18n("Read id: %1").tqarg(device()->idNames(ids).join("; ")));
- if ( ids.tqcontains(device()->name()) ) return true;
+ if ( ids.contains(device()->name()) ) return true;
message = i18n("Read id does not match the specified device name \"%1\".").tqarg(device()->name());
} else {
log(Log::LineType::Warning, i18n(" Unknown or incorrect device (Read id is %1).").tqarg(toHexLabel(rawId, nbChars)));
diff --git a/src/devices/pic/prog/pic_prog_specific.cpp b/src/devices/pic/prog/pic_prog_specific.cpp
index bca71b4..ed13adf 100644
--- a/src/devices/pic/prog/pic_prog_specific.cpp
+++ b/src/devices/pic/prog/pic_prog_specific.cpp
@@ -109,7 +109,7 @@ bool Programmer::PicHardware::compareWords(Pic::MemoryRangeType type, uint index
bool Programmer::PicHardware::verifyWord(uint i, BitValue word, Pic::MemoryRangeType type, const VerifyData &vdata)
{
- if ( !(vdata.actions & ::Programmer::IgnoreProtectedVerify) && vdata.protectedRanges.tqcontains(i) ) return true; // protected
+ if ( !(vdata.actions & ::Programmer::IgnoreProtectedVerify) && vdata.protectedRanges.contains(i) ) return true; // protected
BitValue v = static_cast<const Pic::Memory &>(vdata.memory).normalizedWord(type, i);
BitValue d = static_cast<const Pic::Memory &>(vdata.memory).normalizeWord(type, i, word);
if ( type==Pic::MemoryRangeType::Config ) {
diff --git a/src/devices/pic/xml/pic_xml_to_data.cpp b/src/devices/pic/xml/pic_xml_to_data.cpp
index eeb293a..18a5409 100644
--- a/src/devices/pic/xml/pic_xml_to_data.cpp
+++ b/src/devices/pic/xml/pic_xml_to_data.cpp
@@ -154,7 +154,7 @@ Pic::Config::Mask toConfigMask(TQDomElement tqmask, BitValue ptqmask)
if ( value.attribute("value")=="default" ) {
if ( !defName.isEmpty() ) qFatal(TQString("Default value already defined for tqmask %1").tqarg(ctqmask.name));
defName = value.attribute("name");
- //if ( names.tqcontains(defName) ) qFatal(TQString("Value name duplicated in tqmask %1").tqarg(ctqmask.name));
+ //if ( names.contains(defName) ) qFatal(TQString("Value name duplicated in tqmask %1").tqarg(ctqmask.name));
//names.append(defName);
FOR_EACH(Pic::ConfigNameType, type) defConfigNames[type] = TQStringList::split(' ', value.attribute(type.data().key));
continue;
@@ -163,7 +163,7 @@ Pic::Config::Mask toConfigMask(TQDomElement tqmask, BitValue ptqmask)
cvalue.value = fromHexLabel(value.attribute("value"), nbChars, &ok);
if ( !ok || !cvalue.value.isInside(ctqmask.value) ) qFatal(TQString("Malformed value in tqmask %1").tqarg(ctqmask.name));
cvalue.name = value.attribute("name");
- //if ( names.tqcontains(cvalue.name) ) qFatal(TQString("Value name duplicated in tqmask %1").tqarg(ctqmask.name));
+ //if ( names.contains(cvalue.name) ) qFatal(TQString("Value name duplicated in tqmask %1").tqarg(ctqmask.name));
//names.append(cvalue.name);
FOR_EACH(Pic::ConfigNameType, type) cvalue.configNames[type] = TQStringList::split(' ', value.attribute(type.data().key));
processName(ctqmask, ptqmask, cvalue);
@@ -298,7 +298,7 @@ TQString getChecksumData(TQDomElement checksum)
if ( protection.family()==Protection::NoProtection && !valueName.isEmpty() )
qFatal("Checksum protected attribute for device with no code protection");
}
- if ( data()->_checksums.tqcontains(valueName) ) qFatal("Duplicate checksum protected range");
+ if ( data()->_checksums.contains(valueName) ) qFatal("Duplicate checksum protected range");
TQString s = checksum.attribute("constant");
if ( s.isEmpty() ) cdata.constant = 0x0000;
@@ -359,8 +359,8 @@ 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::P18F && data()->_name.tqcontains("C"))
- || (data()->_architecture==Architecture::P18F && data()->_name.tqcontains("J")) ) qFatal("Not matching family");
+ if ( (data()->_architecture==Architecture::P18F && data()->_name.contains("C"))
+ || (data()->_architecture==Architecture::P18F && data()->_name.contains("J")) ) qFatal("Not matching family");
bool ok;
TQString pc = device.attribute("pc");
@@ -449,7 +449,7 @@ virtual void processDevice(TQDomElement device)
const TQStringList &vcnames = tqmask.values[k].configNames[type];
for (uint l=0; l<uint(vcnames.count()); l++) {
if ( vcnames[l].startsWith("0x") ) continue;
- if ( cnames.tqcontains(vcnames[l]) && cnames[vcnames[l]]!=tqmask.name )
+ if ( cnames.contains(vcnames[l]) && cnames[vcnames[l]]!=tqmask.name )
qFatal(TQString("Duplicated config name for %1/%2").tqarg(tqmask.name).tqarg(tqmask.values[k].name));
cnames[vcnames[l]] = word.masks[j].name;
}
@@ -500,7 +500,7 @@ virtual void processDevice(TQDomElement device)
if ( child.nodeName()!="checksum" ) qFatal("Childs of \"checksums\" should \"checksum\"");
TQString valueName = getChecksumData(child.toElement());
if ( protection.family()==Protection::BasicProtection ) {
- if ( !valueNames.tqcontains(valueName) ) qFatal("Unknown protected attribute");
+ if ( !valueNames.contains(valueName) ) qFatal("Unknown protected attribute");
valueNames[valueName] = true;
}
child = child.nextSibling();
@@ -548,7 +548,7 @@ void processSfr(TQDomElement e)
{
TQString name = e.attribute("name");
if ( name.isEmpty() ) qFatal("SFR cannot have empty name");
- if ( data()->registersData().sfrs.tqcontains(name) || data()->registersData().combined.tqcontains(name) )
+ if ( data()->registersData().sfrs.contains(name) || data()->registersData().combined.contains(name) )
qFatal("SFR name is duplicated");
bool ok;
uint address = fromHexLabel(e.attribute("address"), &ok);
@@ -582,7 +582,7 @@ void processCombined(TQDomElement e)
{
TQString name = e.attribute("name");
if ( name.isEmpty() ) qFatal("Combined register cannot have empty name");
- if ( data()->registersData().sfrs.tqcontains(name) || data()->registersData().combined.tqcontains(name) )
+ if ( data()->registersData().sfrs.contains(name) || data()->registersData().combined.contains(name) )
qFatal("Combined register name is duplicated");
bool ok;
CombinedData rdata;
@@ -601,7 +601,7 @@ void processDeviceRegisters(TQDomElement element)
{
TQString s = element.attribute("same_as");
if ( !s.isEmpty() ) {
- if ( !_map.tqcontains(s) ) qFatal(TQString("Registers same as unknown device %1").tqarg(s));
+ if ( !_map.contains(s) ) qFatal(TQString("Registers same as unknown device %1").tqarg(s));
const Pic::Data *d = static_cast<const Pic::Data *>(_map[s]);
data()->_registersData = d->_registersData;
return;
@@ -636,14 +636,14 @@ void processDeviceRegisters(TQDomElement element)
for (uint i=0; i<Device::MAX_NB_PORTS; i++) {
TQString portname = rdata.portName(i);
if ( portname.isEmpty() ) break;
- bool hasPort = rdata.sfrs.tqcontains(portname);
+ bool hasPort = rdata.sfrs.contains(portname);
TQString trisname = rdata.trisName(i);
if ( trisname.isEmpty() ) continue;
- bool hasTris = rdata.sfrs.tqcontains(trisname);
+ bool hasTris = rdata.sfrs.contains(trisname);
if ( !hasPort && hasTris ) qFatal(TQString("%1 needs %2 to be present").tqarg(trisname).tqarg(portname));
TQString latchname = rdata.latchName(i);
if ( latchname.isEmpty() ) continue;
- bool hasLatch = rdata.sfrs.tqcontains(latchname);
+ bool hasLatch = rdata.sfrs.contains(latchname);
if ( !hasPort && hasLatch ) qFatal(TQString("%1 needs %2 to be present").tqarg(latchname).tqarg(portname));
}
}
@@ -660,8 +660,8 @@ 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.tqcontains(name) ) qFatal(TQString("Registers already defined for %1").tqarg(name));
- if ( _map.tqcontains(name) ) {
+ if ( devices.contains(name) ) qFatal(TQString("Registers already defined for %1").tqarg(name));
+ if ( _map.contains(name) ) {
_data = _map[name];
processDeviceRegisters(device);
devices.append(name);
@@ -680,14 +680,14 @@ void processRegisters()
TQMap<TQString, Device::Data *>::const_iterator it = _map.begin();
for (; it!=_map.end(); ++it) {
_data = it.data();
- if ( !devices.tqcontains(it.key()) ) qWarning("Register description not found for %s", it.key().latin1());
+ if ( !devices.contains(it.key()) ) qWarning("Register description not found for %s", it.key().latin1());
}
}
virtual void checkPins(const TQMap<TQString, uint> &pinLabels) const
{
- if ( !pinLabels.tqcontains("VDD") ) qFatal("No VDD pin specified");
- if ( !pinLabels.tqcontains("VSS") ) qFatal("No VSS pin specified");
+ if ( !pinLabels.contains("VDD") ) qFatal("No VDD pin specified");
+ if ( !pinLabels.contains("VSS") ) qFatal("No VSS pin specified");
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;
@@ -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.tqcontains(name) ) qFatal(TQString("Pin \"%1\" not present").tqarg(name));
+ if ( !pinLabels.contains(name) ) qFatal(TQString("Pin \"%1\" not present").tqarg(name));
}
}
}