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 | e05894553004a47b1e2f276bedcf5963b57a3932 (patch) | |
tree | 2c12af14a609c053131e3a463068fa7589e6ac6a /src/languages | |
parent | 60cba8acf96454af45641d6190a3f2ac9f9ff9b0 (diff) | |
download | ktechlab-e05894553004a47b1e2f276bedcf5963b57a3932.tar.gz ktechlab-e05894553004a47b1e2f276bedcf5963b57a3932.zip |
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
Diffstat (limited to 'src/languages')
-rw-r--r-- | src/languages/asmparser.cpp | 8 | ||||
-rw-r--r-- | src/languages/externallanguage.cpp | 2 | ||||
-rw-r--r-- | src/languages/flowcode.cpp | 12 | ||||
-rw-r--r-- | src/languages/gpasm.cpp | 4 | ||||
-rw-r--r-- | src/languages/gpdasm.cpp | 10 | ||||
-rw-r--r-- | src/languages/gplib.cpp | 10 | ||||
-rw-r--r-- | src/languages/gplink.cpp | 10 | ||||
-rw-r--r-- | src/languages/language.cpp | 8 | ||||
-rw-r--r-- | src/languages/microbe.cpp | 8 | ||||
-rw-r--r-- | src/languages/picprogrammer.cpp | 12 |
10 files changed, 42 insertions, 42 deletions
diff --git a/src/languages/asmparser.cpp b/src/languages/asmparser.cpp index 94b01c0..90c26d7 100644 --- a/src/languages/asmparser.cpp +++ b/src/languages/asmparser.cpp @@ -52,12 +52,12 @@ bool AsmParser::parse( GpsimDebugger * debugger ) { TQString col0 = line.section( TQRegExp("[; ]"), 0, 0 ); col0 = col0.stripWhiteSpace(); - if ( nonAbsoluteOps.tqcontains(col0) ) + if ( nonAbsoluteOps.contains(col0) ) m_type = Relocatable; } if ( !m_bContainsRadix ) { - if ( line.tqcontains( TQRegExp("^RADIX[\\s]*") ) || line.tqcontains( TQRegExp("^radix[\\s]*") ) ) + if ( line.contains( TQRegExp("^RADIX[\\s]*") ) || line.contains( TQRegExp("^radix[\\s]*") ) ) m_bContainsRadix = true; } if ( m_picID.isEmpty() ) @@ -81,7 +81,7 @@ bool AsmParser::parse( GpsimDebugger * debugger ) // Assembly file produced (by sdcc) from C, line is in format: // ;#CSRC\t[file-name] [file-line] // The filename can contain spaces. - int fileLineAt = line.tqfindRev(" "); + int fileLineAt = line.findRev(" "); if ( fileLineAt == -1 ) kdWarning() << k_funcinfo << "Syntax error in line \"" << line << "\" while looking for file-line" << endl; @@ -117,7 +117,7 @@ bool AsmParser::parse( GpsimDebugger * debugger ) else { const TQString lineAndFile = lineParts[1]; - int lineFileSplit = lineAndFile.tqfind("; "); + int lineFileSplit = lineAndFile.find("; "); if ( lineFileSplit == -1 ) kdDebug() << k_funcinfo << "Could not find file / line split in \""<<lineAndFile<<"\""<<endl; else diff --git a/src/languages/externallanguage.cpp b/src/languages/externallanguage.cpp index 233c639..784bf0f 100644 --- a/src/languages/externallanguage.cpp +++ b/src/languages/externallanguage.cpp @@ -151,7 +151,7 @@ void ExternalLanguage::displayProcessCommand() for ( TQValueList<TQCString>::const_iterator it = arguments.begin(); it != end; ++it ) { - if ( (*it).isEmpty() || (*it).tqcontains( TQRegExp("[\\s]") ) ) + if ( (*it).isEmpty() || (*it).contains( TQRegExp("[\\s]") ) ) quotedArguments << KProcess::quote( *it ); else quotedArguments << *it; diff --git a/src/languages/flowcode.cpp b/src/languages/flowcode.cpp index b557c59..a1c664d 100644 --- a/src/languages/flowcode.cpp +++ b/src/languages/flowcode.cpp @@ -96,7 +96,7 @@ void FlowCode::addCode( const TQString& code ) bool FlowCode::isValidBranch( FlowPart *flowPart ) { - return flowPart && (flowPart->level() >= m_curLevel) && !m_stopParts.tqcontains(flowPart); + return flowPart && (flowPart->level() >= m_curLevel) && !m_stopParts.contains(flowPart); } void FlowCode::addCodeBranch( FlowPart * flowPart ) @@ -107,7 +107,7 @@ void FlowCode::addCodeBranch( FlowPart * flowPart ) if ( !isValidBranch(flowPart) ) return; - if ( m_addedParts.tqcontains(flowPart) ) + if ( m_addedParts.contains(flowPart) ) { const TQString labelName = genLabel(flowPart->id()); addCode( "goto "+labelName ); @@ -145,7 +145,7 @@ void FlowCode::removeStopPart( FlowPart *part ) // We only want to remove one instance of the FlowPart, in case it has been // used as a StopPart for more than one FlowPart - FlowPartList::iterator it = m_stopParts.tqfind(part); + FlowPartList::iterator it = m_stopParts.find(part); if ( it != m_stopParts.end() ) m_stopParts.remove(it); } @@ -278,7 +278,7 @@ TQString FlowCode::generateMicrobe( const ItemList &itemList, MicroSettings *set if ( portType != (1<<pinCount)-1 ) { TQString name = *it; - name.tqreplace("PORT","TRIS"); + name.replace("PORT","TRIS"); addCode( name+" = "+TQString::number(portType) ); } } @@ -319,7 +319,7 @@ void FlowCode::tidyCode() const TQStringList::iterator end = m_labels.end(); for ( TQStringList::iterator it = m_labels.begin(); it != end; ++it ) { - if ( !m_gotos.tqcontains(*it) ) m_code.remove(*it+':'); + if ( !m_gotos.contains(*it) ) m_code.remove(*it+':'); } @@ -444,7 +444,7 @@ void FlowCode::tidyCode() void FlowCode::addSubroutine( FlowPart *part ) { - if ( !part || m_subroutines.tqcontains(part) || part->parentItem() || !dynamic_cast<FlowContainer*>(part) ) return; + if ( !part || m_subroutines.contains(part) || part->parentItem() || !dynamic_cast<FlowContainer*>(part) ) return; m_subroutines.append(part); } diff --git a/src/languages/gpasm.cpp b/src/languages/gpasm.cpp index 33cb892..4020b60 100644 --- a/src/languages/gpasm.cpp +++ b/src/languages/gpasm.cpp @@ -126,13 +126,13 @@ void Gpasm::processInput( ProcessOptions options ) bool Gpasm::isError( const TQString &message ) const { - return message.tqcontains( "Error", false ); + return message.contains( "Error", false ); } bool Gpasm::isWarning( const TQString &message ) const { - return message.tqcontains( "Warning", false ); + return message.contains( "Warning", false ); } diff --git a/src/languages/gpdasm.cpp b/src/languages/gpdasm.cpp index ea98221..e0a7b9e 100644 --- a/src/languages/gpdasm.cpp +++ b/src/languages/gpdasm.cpp @@ -77,13 +77,13 @@ bool Gpdasm::processExited( bool successfully ) bool Gpdasm::isError( const TQString &message ) const { - return (message.tqfind( "error", -1, false ) != -1); + return (message.find( "error", -1, false ) != -1); } bool Gpdasm::isWarning( const TQString &message ) const { - return (message.tqfind( "warning", -1, false ) != -1); + return (message.find( "warning", -1, false ) != -1); } @@ -92,18 +92,18 @@ MessageInfo Gpdasm::extractMessageInfo( const TQString &text ) if ( text.length()<5 || !text.startsWith("/") ) return MessageInfo(); - const int index = text.tqfind( ".asm", 0, false )+4; + const int index = text.find( ".asm", 0, false )+4; if ( index == -1+4 ) return MessageInfo(); const TQString fileName = text.left(index); // Extra line number const TQString message = text.right(text.length()-index); - const int linePos = message.tqfind( TQRegExp(":[\\d]+") ); + const int linePos = message.find( TQRegExp(":[\\d]+") ); int line = -1; if ( linePos != -1 ) { - const int linePosEnd = message.tqfind( ':', linePos+1 ); + const int linePosEnd = message.find( ':', linePos+1 ); if ( linePosEnd != -1 ) { const TQString number = message.mid( linePos+1, linePosEnd-linePos-1 ).stripWhiteSpace(); diff --git a/src/languages/gplib.cpp b/src/languages/gplib.cpp index 46e6a76..919efee 100644 --- a/src/languages/gplib.cpp +++ b/src/languages/gplib.cpp @@ -55,13 +55,13 @@ void Gplib::processInput( ProcessOptions options ) bool Gplib::isError( const TQString &message ) const { - return message.tqcontains( "Error", false ); + return message.contains( "Error", false ); } bool Gplib::isWarning( const TQString &message ) const { - return message.tqcontains( "Warning", false ); + return message.contains( "Warning", false ); } @@ -71,18 +71,18 @@ MessageInfo Gplib::extractMessageInfo( const TQString &text ) if ( text.length()<5 || !text.startsWith("/") ) return MessageInfo(); - const int index = text.tqfind( ".asm", 0, false )+4; + const int index = text.find( ".asm", 0, false )+4; if ( index == -1+4 ) return MessageInfo(); const TQString fileName = text.left(index); // Extra line number const TQString message = text.right(text.length()-index); - const int linePos = message.tqfind( TQRegExp(":[\\d]+") ); + const int linePos = message.find( TQRegExp(":[\\d]+") ); int line = -1; if ( linePos != -1 ) { - const int linePosEnd = message.tqfind( ':', linePos+1 ); + const int linePosEnd = message.find( ':', linePos+1 ); if ( linePosEnd != -1 ) { const TQString number = message.mid( linePos+1, linePosEnd-linePos-1 ).stripWhiteSpace(); diff --git a/src/languages/gplink.cpp b/src/languages/gplink.cpp index 9b1859c..7055fa2 100644 --- a/src/languages/gplink.cpp +++ b/src/languages/gplink.cpp @@ -86,13 +86,13 @@ void Gplink::processInput( ProcessOptions options ) bool Gplink::isError( const TQString &message ) const { - return message.tqcontains( "Error", false ); + return message.contains( "Error", false ); } bool Gplink::isWarning( const TQString &message ) const { - return message.tqcontains( "Warning", false ); + return message.contains( "Warning", false ); } @@ -102,18 +102,18 @@ MessageInfo Gplink::extractMessageInfo( const TQString &text ) if ( text.length()<5 || !text.startsWith("/") ) return MessageInfo(); - const int index = text.tqfind( ".asm", 0, false )+4; + const int index = text.find( ".asm", 0, false )+4; if ( index == -1+4 ) return MessageInfo(); const TQString fileName = text.left(index); // Extra line number const TQString message = text.right(text.length()-index); - const int linePos = message.tqfind( TQRegExp(":[\\d]+") ); + const int linePos = message.find( TQRegExp(":[\\d]+") ); int line = -1; if ( linePos != -1 ) { - const int linePosEnd = message.tqfind( ':', linePos+1 ); + const int linePosEnd = message.find( ':', linePos+1 ); if ( linePosEnd != -1 ) { const TQString number = message.mid( linePos+1, linePosEnd-linePos-1 ).stripWhiteSpace(); diff --git a/src/languages/language.cpp b/src/languages/language.cpp index f98d580..e2c4c7a 100644 --- a/src/languages/language.cpp +++ b/src/languages/language.cpp @@ -101,18 +101,18 @@ MessageInfo Language::extractMessageInfo( const TQString &text ) if ( !text.startsWith("/") ) return MessageInfo(); - const int index = text.tqfind( ":", 0, false ); + const int index = text.find( ":", 0, false ); if ( index == -1 ) return MessageInfo(); const TQString fileName = text.left(index); // Extra line number const TQString message = text.right(text.length()-index); - const int linePos = message.tqfind( TQRegExp(":[\\d]+") ); + const int linePos = message.find( TQRegExp(":[\\d]+") ); int line = -1; if ( linePos != -1 ) { - const int linePosEnd = message.tqfind( ':', linePos+1 ); + const int linePosEnd = message.find( ':', linePos+1 ); if ( linePosEnd != -1 ) { const TQString number = message.mid( linePos+1, linePosEnd-linePos-1 ).stripWhiteSpace(); @@ -234,7 +234,7 @@ void ProcessOptions::setTargetFile( const TQString &file ) ProcessOptions::ProcessPath::MediaType ProcessOptions::guessMediaType( const TQString & url ) { - TQString extension = url.right( url.length() - url.tqfindRev('.') - 1 ); + TQString extension = url.right( url.length() - url.findRev('.') - 1 ); extension = extension.lower(); if ( extension == "asm" ) diff --git a/src/languages/microbe.cpp b/src/languages/microbe.cpp index b7c7f8b..00cf1ed 100644 --- a/src/languages/microbe.cpp +++ b/src/languages/microbe.cpp @@ -40,9 +40,9 @@ Microbe::Microbe( ProcessChain *processChain, KTechlab *tqparent ) if ( !line.isEmpty() ) { bool ok; - const int pos = line.left( line.tqfind("#") ).toInt(&ok); + const int pos = line.left( line.find("#") ).toInt(&ok); if (ok) { - m_errorMessages[pos] = line.right(line.length()-line.tqfind("#")); + m_errorMessages[pos] = line.right(line.length()-line.find("#")); } else { kdError() << k_funcinfo << "Error parsing Microbe error-message file"<<endl; } @@ -83,12 +83,12 @@ void Microbe::processInput( ProcessOptions options ) bool Microbe::isError( const TQString &message ) const { - return message.tqcontains( "Error", false ); + return message.contains( "Error", false ); } bool Microbe::isWarning( const TQString &message ) const { - return message.tqcontains( "Warning", false ); + return message.contains( "Warning", false ); } diff --git a/src/languages/picprogrammer.cpp b/src/languages/picprogrammer.cpp index 882622e..3c4e38d 100644 --- a/src/languages/picprogrammer.cpp +++ b/src/languages/picprogrammer.cpp @@ -375,7 +375,7 @@ void PicProgrammer::processInput( ProcessOptions options ) settings.load( kapp->config() ); TQString program = options.m_program; - if ( !settings.configNames( true ).tqcontains( program.lower() ) ) + if ( !settings.configNames( true ).contains( program.lower() ) ) { kdError() << k_funcinfo << "Invalid program" << endl; finish( false ); @@ -385,9 +385,9 @@ void PicProgrammer::processInput( ProcessOptions options ) ProgrammerConfig config = settings.config( program ); TQString command = config.writeCommand; - command.tqreplace( "%port", options.m_port ); - command.tqreplace( "%device", TQString( options.m_picID ).remove("P") ); - command.tqreplace( "%file", KProcess::quote( options.inputFiles().first() ) ); + command.replace( "%port", options.m_port ); + command.replace( "%device", TQString( options.m_picID ).remove("P") ); + command.replace( "%file", KProcess::quote( options.inputFiles().first() ) ); m_languageProcess->setUseShell( true ); *m_languageProcess << command; @@ -403,13 +403,13 @@ void PicProgrammer::processInput( ProcessOptions options ) bool PicProgrammer::isError( const TQString &message ) const { - return message.tqcontains( "Error", false ); + return message.contains( "Error", false ); } bool PicProgrammer::isWarning( const TQString &message ) const { - return message.tqcontains( "Warning", false ); + return message.contains( "Warning", false ); } |