summaryrefslogtreecommitdiffstats
path: root/src/devices/pic/base
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/pic/base
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/pic/base')
-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
3 files changed, 24 insertions, 24 deletions
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);
}