From e05894553004a47b1e2f276bedcf5963b57a3932 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/electronics/components/multiinputgate.cpp | 2 +- src/electronics/components/piccomponent.cpp | 6 +++--- src/electronics/components/ram.cpp | 2 +- src/electronics/gpsimprocessor.cpp | 30 +++++++++++++-------------- src/electronics/pin.cpp | 14 ++++++------- src/electronics/simulation/circuit.cpp | 12 +++++------ src/electronics/simulation/circuit.h | 2 +- src/electronics/simulation/elementset.cpp | 2 +- 8 files changed, 35 insertions(+), 35 deletions(-) (limited to 'src/electronics') diff --git a/src/electronics/components/multiinputgate.cpp b/src/electronics/components/multiinputgate.cpp index 7ebd6ce..c06d982 100644 --- a/src/electronics/components/multiinputgate.cpp +++ b/src/electronics/components/multiinputgate.cpp @@ -114,7 +114,7 @@ void MultiInputGate::updateInputs( int newNum ) void MultiInputGate::updateAttachedPositioning() { // Check that our ndoes have been created before we attempt to use them - if ( !m_nodeMap.tqcontains("p1") || !m_nodeMap.tqcontains("in"+TQString::number(m_numInputs-1)) ) + if ( !m_nodeMap.contains("p1") || !m_nodeMap.contains("in"+TQString::number(m_numInputs-1)) ) return; int _x = offsetX()+8; diff --git a/src/electronics/components/piccomponent.cpp b/src/electronics/components/piccomponent.cpp index 5bfda22..3741182 100644 --- a/src/electronics/components/piccomponent.cpp +++ b/src/electronics/components/piccomponent.cpp @@ -205,7 +205,7 @@ void PICComponent::initPackage( MicroInfo * microInfo ) const TQStringList::iterator allPinIDsEnd = allPinIDs.end(); for ( TQStringList::iterator it = allPinIDs.begin(); it != allPinIDsEnd; ++it ) { - if ( !ioPinIDs.tqcontains(*it) ) + if ( !ioPinIDs.contains(*it) ) *it = ""; } //END Get pin IDs @@ -226,7 +226,7 @@ void PICComponent::initPackage( MicroInfo * microInfo ) const NodeMap::iterator nodeMapEnd = nodeMapCopy.end(); for ( NodeMap::iterator it = nodeMapCopy.begin(); it != nodeMapEnd; ++it ) { - if ( !ioPinIDs.tqcontains(it.key()) ) + if ( !ioPinIDs.contains(it.key()) ) removeNode( it.key() ); } @@ -301,7 +301,7 @@ void PICComponent::slotUpdateFileList() for ( TQStringList::iterator it = preFileList.begin(); it != end; ++it ) { TQString file = KURL(*it).path(); - if ( (file.endsWith(".flowcode") || file.endsWith(".asm") || file.endsWith(".cod") || file.endsWith(".basic") || file.endsWith(".microbe") ) && !fileList.tqcontains(file) ) { + if ( (file.endsWith(".flowcode") || file.endsWith(".asm") || file.endsWith(".cod") || file.endsWith(".basic") || file.endsWith(".microbe") ) && !fileList.contains(file) ) { fileList.append(file); } } diff --git a/src/electronics/components/ram.cpp b/src/electronics/components/ram.cpp index 8c20736..a8b259e 100644 --- a/src/electronics/components/ram.cpp +++ b/src/electronics/components/ram.cpp @@ -37,7 +37,7 @@ RAM::RAM( ICNDocument *icnDocument, bool newItem, const char *id ) : Component( icnDocument, newItem, id ? id : "ram" ) { m_name = i18n("RAM"); - m_desc = i18n("This RAM stores data as a collection of words; each of which tqcontains word size bits of data.

To read data, set the CS (chip select) and the OE (output enable) pins high, and select the word using the address pins A*. The word is outputted on the data-out pins: DO*.

To write data, set the CS (chip select) and the WE (write enable) pins high, and select the address to write to with the A* pins. Write to the selected word using the data-in pins: DI*.

The Address Size is the number of bits that determine an address; so the total number of words stored will be 2^Address Size."); + m_desc = i18n("This RAM stores data as a collection of words; each of which contains word size bits of data.

To read data, set the CS (chip select) and the OE (output enable) pins high, and select the word using the address pins A*. The word is outputted on the data-out pins: DO*.

To write data, set the CS (chip select) and the WE (write enable) pins high, and select the address to write to with the A* pins. Write to the selected word using the data-in pins: DI*.

The Address Size is the number of bits that determine an address; so the total number of words stored will be 2^Address Size."); m_data = 0l; m_pCS = 0l; diff --git a/src/electronics/gpsimprocessor.cpp b/src/electronics/gpsimprocessor.cpp index efa3d88..704aacf 100644 --- a/src/electronics/gpsimprocessor.cpp +++ b/src/electronics/gpsimprocessor.cpp @@ -62,7 +62,7 @@ function will remove the duplicated directory path (by searching for a "//"). */ TQString sanitizeGpsimFile( TQString file ) { - int pos = file.tqfind("//"); + int pos = file.find("//"); if ( pos != -1 ) { file.remove( 0, pos + 1 ); @@ -304,7 +304,7 @@ GpsimProcessor::ProgramFileValidity GpsimProcessor::isValidProgramFile( const TQ if ( !KStandardDirs::exists(programFile) ) return DoesntExist; - TQString extension = programFile.right( programFile.length() - programFile.tqfindRev('.') - 1 ).lower(); + TQString extension = programFile.right( programFile.length() - programFile.findRev('.') - 1 ).lower(); if ( extension == "flowcode" || extension == "asm" || @@ -313,7 +313,7 @@ GpsimProcessor::ProgramFileValidity GpsimProcessor::isValidProgramFile( const TQ extension == "c" ) return Valid; - if ( extension == "hex" && TQFile::exists( TQString(programFile).tqreplace(".hex",".cod") ) ) + if ( extension == "hex" && TQFile::exists( TQString(programFile).replace(".hex",".cod") ) ) return Valid; return IncorrectType; @@ -325,7 +325,7 @@ TQString GpsimProcessor::generateSymbolFile( const TQString &fileName, TQObject if ( !isValidProgramFile(fileName) ) return TQString(); - TQString extension = fileName.right( fileName.length() - fileName.tqfindRev('.') - 1 ).lower(); + TQString extension = fileName.right( fileName.length() - fileName.findRev('.') - 1 ).lower(); if ( extension == "cod" ) { @@ -336,13 +336,13 @@ TQString GpsimProcessor::generateSymbolFile( const TQString &fileName, TQObject { TQTimer::singleShot( 0, receiver, successMember ); // We've already checked for the existance of the ".cod" file in GpsimProcessor::isValidProgramFile - return TQString(fileName).tqreplace(".hex",".cod"); + return TQString(fileName).replace(".hex",".cod"); } else if ( extension == "basic" || extension == "microbe" ) { compileMicrobe( fileName, receiver, successMember, failMember ); - return TQString(fileName).tqreplace( "."+extension, ".cod" ); + return TQString(fileName).replace( "."+extension, ".cod" ); } else if ( extension == "flowcode" ) { @@ -364,13 +364,13 @@ TQString GpsimProcessor::generateSymbolFile( const TQString &fileName, TQObject connect( pc, TQT_SIGNAL(failed()), receiver, failMember ); } - return TQString(hexFile).tqreplace( ".hex", ".cod" ); + return TQString(hexFile).replace( ".hex", ".cod" ); } else if ( extension == "asm" ) { ProcessOptions o; o.b_addToProject = false; - o.setTargetFile( TQString(fileName).tqreplace(".asm",".hex")); + o.setTargetFile( TQString(fileName).replace(".asm",".hex")); o.setInputFiles(fileName); o.setMethod( ProcessOptions::Method::Forget ); o.setProcessPath( ProcessOptions::ProcessPath::path( ProcessOptions::guessMediaType(fileName), ProcessOptions::ProcessPath::Program ) ); @@ -384,13 +384,13 @@ TQString GpsimProcessor::generateSymbolFile( const TQString &fileName, TQObject connect( pc, TQT_SIGNAL(failed()), receiver, failMember ); } - return TQString(fileName).tqreplace(".asm",".cod"); + return TQString(fileName).replace(".asm",".cod"); } else if ( extension == "c" ) { ProcessOptions o; o.b_addToProject = false; - o.setTargetFile( TQString(fileName).tqreplace(".c",".hex")); + o.setTargetFile( TQString(fileName).replace(".c",".hex")); o.setInputFiles(fileName); o.setMethod( ProcessOptions::Method::Forget ); o.setProcessPath( ProcessOptions::ProcessPath::C_Program ); @@ -404,7 +404,7 @@ TQString GpsimProcessor::generateSymbolFile( const TQString &fileName, TQObject connect( pc, TQT_SIGNAL(failed()), receiver, failMember ); } - return TQString(fileName).tqreplace(".c",".cod"); + return TQString(fileName).replace(".c",".cod"); } if ( failMember ) @@ -417,7 +417,7 @@ void GpsimProcessor::compileMicrobe( const TQString &filename, TQObject *receive { ProcessOptions o; o.b_addToProject = false; - o.setTargetFile( TQString(filename).tqreplace(".microbe",".hex") ); + o.setTargetFile( TQString(filename).replace(".microbe",".hex") ); o.setInputFiles(filename); o.setMethod( ProcessOptions::Method::Forget ); o.setProcessPath( ProcessOptions::ProcessPath::Microbe_Program ); @@ -506,7 +506,7 @@ void GpsimDebugger::associateLine( const TQString & sourceFile, int sourceLine, SourceLine hllSource = SourceLine( sourceFile, sourceLine ); SourceLine asmSource = SourceLine( assemblyFile, assemblyLine ); - if ( m_sourceLineMap.tqcontains(asmSource) ) + if ( m_sourceLineMap.contains(asmSource) ) { kdWarning() << k_funcinfo << "Already have an association for assembly (\""<fileName() != path ) continue; - dl->setBreakpoint( lines.tqcontains( dl->line() ) ); + dl->setBreakpoint( lines.contains( dl->line() ) ); } } @@ -758,7 +758,7 @@ RegisterInfo * RegisterSet::fromAddress( unsigned address ) RegisterInfo * RegisterSet::fromName( const TQString & name ) { // First try the name as case sensitive, then as case insensitive. - if ( m_nameToRegisterMap.tqcontains( name ) ) + if ( m_nameToRegisterMap.contains( name ) ) return m_nameToRegisterMap[ name ]; TQString nameLower = name.lower(); diff --git a/src/electronics/pin.cpp b/src/electronics/pin.cpp index f9a08d8..f3cdc0c 100644 --- a/src/electronics/pin.cpp +++ b/src/electronics/pin.cpp @@ -70,7 +70,7 @@ void Pin::setSwitchConnected( Pin * pin, bool isConnected ) if (isConnected) { - if ( !m_switchConnectedPins.tqcontains(pin) ) + if ( !m_switchConnectedPins.contains(pin) ) m_switchConnectedPins.append(pin); } else @@ -80,14 +80,14 @@ void Pin::setSwitchConnected( Pin * pin, bool isConnected ) void Pin::addCircuitDependentPin( Pin * pin ) { - if ( pin && !m_circuitDependentPins.tqcontains(pin) ) + if ( pin && !m_circuitDependentPins.contains(pin) ) m_circuitDependentPins.append(pin); } void Pin::addGroundDependentPin( Pin * pin ) { - if ( pin && !m_groundDependentPins.tqcontains(pin) ) + if ( pin && !m_groundDependentPins.contains(pin) ) m_groundDependentPins.append(pin); } @@ -101,7 +101,7 @@ void Pin::removeDependentPins() void Pin::addElement( Element * e ) { - if ( !e || m_elementList.tqcontains(e) ) + if ( !e || m_elementList.contains(e) ) return; m_elementList.append(e); } @@ -115,7 +115,7 @@ void Pin::removeElement( Element * e ) void Pin::addSwitch( Switch * sw ) { - if ( !sw || m_switchList.tqcontains( sw ) ) + if ( !sw || m_switchList.contains( sw ) ) return; m_switchList << sw; } @@ -129,14 +129,14 @@ void Pin::removeSwitch( Switch * sw ) void Pin::addInputWire( Wire * wire ) { - if ( wire && !m_inputWireList.tqcontains(wire) ) + if ( wire && !m_inputWireList.contains(wire) ) m_inputWireList << wire; } void Pin::addOutputWire( Wire * wire ) { - if ( wire && !m_outputWireList.tqcontains(wire) ) + if ( wire && !m_outputWireList.contains(wire) ) m_outputWireList << wire; } diff --git a/src/electronics/simulation/circuit.cpp b/src/electronics/simulation/circuit.cpp index c138a7a..c152756 100644 --- a/src/electronics/simulation/circuit.cpp +++ b/src/electronics/simulation/circuit.cpp @@ -50,19 +50,19 @@ Circuit::~Circuit() void Circuit::addPin( Pin *node ) { - if ( m_pinList.tqcontains(node) ) return; + if ( m_pinList.contains(node) ) return; m_pinList.append(node); } void Circuit::addElement( Element *element ) { - if ( m_elementList.tqcontains(element) ) return; + if ( m_elementList.contains(element) ) return; m_elementList.append(element); } -bool Circuit::tqcontains( Pin *node ) +bool Circuit::contains( Pin *node ) { - return m_pinList.tqcontains(node); + return m_pinList.contains(node); } @@ -427,7 +427,7 @@ void Circuit::createMatrixMap() bool Circuit::recursivePinAdd( Pin *node, PinList *unassignedNodes, PinList *associated, PinList *nodes ) { - if ( !unassignedNodes->tqcontains(node) ) + if ( !unassignedNodes->contains(node) ) return false; unassignedNodes->remove(node); @@ -437,7 +437,7 @@ bool Circuit::recursivePinAdd( Pin *node, PinList *unassignedNodes, PinList *ass const PinList::const_iterator dEnd = circuitDependentPins.end(); for ( PinList::const_iterator it = circuitDependentPins.begin(); it != dEnd; ++it ) { - if ( !associated->tqcontains(*it) ) + if ( !associated->contains(*it) ) associated->append(*it); } diff --git a/src/electronics/simulation/circuit.h b/src/electronics/simulation/circuit.h index 82c1f34..8c275a5 100644 --- a/src/electronics/simulation/circuit.h +++ b/src/electronics/simulation/circuit.h @@ -60,7 +60,7 @@ class Circuit void addPin( Pin *node ); void addElement( Element *element ); - bool tqcontains( Pin *node ); + bool contains( Pin *node ); bool containsNonLinear() const { return m_elementSet->containsNonLinear(); } void init(); diff --git a/src/electronics/simulation/elementset.cpp b/src/electronics/simulation/elementset.cpp index 8a0adc9..25057c2 100644 --- a/src/electronics/simulation/elementset.cpp +++ b/src/electronics/simulation/elementset.cpp @@ -87,7 +87,7 @@ void ElementSet::setCacheInvalidated() void ElementSet::addElement( Element *e ) { - if ( !e || m_elementList.tqcontains(e) ) return; + if ( !e || m_elementList.contains(e) ) return; e->setElementSet(this); m_elementList.append(e); if ( e->isNonLinear() ) -- cgit v1.2.3