summaryrefslogtreecommitdiffstats
path: root/languages/cpp/includepathresolver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'languages/cpp/includepathresolver.cpp')
-rw-r--r--languages/cpp/includepathresolver.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/languages/cpp/includepathresolver.cpp b/languages/cpp/includepathresolver.cpp
index ebd536ec..fee9832e 100644
--- a/languages/cpp/includepathresolver.cpp
+++ b/languages/cpp/includepathresolver.cpp
@@ -18,7 +18,7 @@
*
*
* unsermake:
- * unsermake is detected by reading the first line of the makefile. If it contains "generated by unsermake" the following things are respected:
+ * unsermake is detected by reading the first line of the makefile. If it tqcontains "generated by unsermake" the following things are respected:
* 1. Since unsermake does not have the -W command(which should tell it to recompile the given file no matter whether it has been changed or not), the file-modification-time of the file is changed temporarily and the --no-real-compare option is used to force recompilation.
* 2. The targets seem to be called *.lo instead of *.o when using unsermake, so *.lo names are used.
* example-(test)command: unsermake --no-real-compare -n myfile.lo
@@ -181,7 +181,7 @@ namespace CppTools {
if( f.open( IO_ReadOnly ) ) {
TQString firstLine;
f.readLine( firstLine, 1000 );
- if( firstLine.find( "generated by unsermake" ) != -1 ) {
+ if( firstLine.tqfind( "generated by unsermake" ) != -1 ) {
ret = true;
}
f.close();
@@ -257,11 +257,11 @@ PathResolutionResult IncludePathResolver::resolveIncludePath( const TQString& fi
dir = TQDir( dir.absPath() );
TQFileInfo makeFile( dir, "Makefile" );
if( !makeFile.exists() )
- return PathResolutionResult(false, i18n("Makefile is missing in folder \"%1\"").arg(dir.absPath()), i18n("problem while trying to resolve include-paths for %1").arg(file) );
+ return PathResolutionResult(false, i18n("Makefile is missing in folder \"%1\"").tqarg(dir.absPath()), i18n("problem while trying to resolve include-paths for %1").tqarg(file) );
TQStringList cachedPath; //If the call doesn't succeed, use the cached not up-to-date version
TQDateTime makeFileModification = makeFile.lastModified();
- Cache::iterator it = m_cache.find( dir.path() );
+ Cache::iterator it = m_cache.tqfind( dir.path() );
if( it != m_cache.end() ) {
cachedPath = (*it).path;
if( makeFileModification == (*it).modificationTime ) {
@@ -272,7 +272,7 @@ PathResolutionResult IncludePathResolver::resolveIncludePath( const TQString& fi
return ret;
} else {
//We have a cached failed result. We should use that for some time but then try again. Return the failed result if: ( there were too many tries within this folder OR this file was already tried ) AND The last tries have not expired yet
- if( /*((*it).failedFiles.size() > 3 || (*it).failedFiles.find( file ) != (*it).failedFiles.end()) &&*/ (*it).failTime.secsTo( TQDateTime::currentDateTime() ) < CACHE_FAIL_FOR_SECONDS ) {
+ if( /*((*it).failedFiles.size() > 3 || (*it).failedFiles.tqfind( file ) != (*it).failedFiles.end()) &&*/ (*it).failTime.secsTo( TQDateTime::tqcurrentDateTime() ) < CACHE_FAIL_FOR_SECONDS ) {
PathResolutionResult ret(false); //Fake that the result is ok
ret.errorMessage = i18n("Cached: ") + (*it).errorMessage;
ret.longErrorMessage = (*it).longErrorMessage;
@@ -297,8 +297,8 @@ PathResolutionResult IncludePathResolver::resolveIncludePath( const TQString& fi
absoluteFile = u.path();
int dot;
- if( (dot = file.findRev( '.' )) == -1 )
- return PathResolutionResult( false, i18n( "Filename %1 seems to be malformed" ).arg(file) );
+ if( (dot = file.tqfindRev( '.' )) == -1 )
+ return PathResolutionResult( false, i18n( "Filename %1 seems to be malformed" ).tqarg(file) );
targetName = file.left( dot );
@@ -365,7 +365,7 @@ PathResolutionResult IncludePathResolver::resolveIncludePath( const TQString& fi
ce.failed = true;
ce.errorMessage = res.errorMessage;
ce.longErrorMessage = res.longErrorMessage;
- ce.failTime = TQDateTime::currentDateTime();
+ ce.failTime = TQDateTime::tqcurrentDateTime();
ce.failedFiles[file] = true;
} else {
ce.failed = false;
@@ -387,12 +387,12 @@ PathResolutionResult IncludePathResolver::getFullOutput( const TQString& command
output = proc.stdOut();
if( proc.exitStatus() != 0 )
- return PathResolutionResult( false, i18n("make-process finished with nonzero exit-status"), i18n("output: %1").arg( output ) );
+ return PathResolutionResult( false, i18n("make-process finished with nonzero exit-status"), i18n("output: %1").tqarg( output ) );
} else {
bool ret = executeCommandPopen(command, workingDirectory, output);
if( !ret )
- return PathResolutionResult( false, i18n("make-process failed"), i18n("output: %1").arg( output ) );
+ return PathResolutionResult( false, i18n("make-process failed"), i18n("output: %1").tqarg( output ) );
}
return PathResolutionResult(true);
}
@@ -413,11 +413,11 @@ PathResolutionResult IncludePathResolver::resolveIncludePathInternal( const TQSt
return res;
TQRegExp newLineRx("\\\\\\n");
- fullOutput.replace( newLineRx, "" );
+ fullOutput.tqreplace( newLineRx, "" );
///@todo collect multiple outputs at the same time for performance-reasons
TQString firstLine = fullOutput;
int lineEnd;
- if( (lineEnd = fullOutput.find('\n')) != -1 )
+ if( (lineEnd = fullOutput.tqfind('\n')) != -1 )
firstLine.truncate( lineEnd ); //Only look at the first line of output
/**
@@ -443,7 +443,7 @@ PathResolutionResult IncludePathResolver::resolveIncludePathInternal( const TQSt
else if( prefix.endsWith( ";" ) )
prefix.truncate( prefix.length() - 1 );
///Now test if what we have as prefix is a simple "cd /foo/bar" call.
- if( prefix.startsWith( "cd ") && !prefix.contains( ";") && !prefix.contains("&&") ) {
+ if( prefix.startsWith( "cd ") && !prefix.tqcontains( ";") && !prefix.tqcontains("&&") ) {
newWorkingDirectory = prefix.right( prefix.length() - 3 ).stripWhiteSpace();
if( !newWorkingDirectory.startsWith("/") )
newWorkingDirectory = workingDirectory + "/" + newWorkingDirectory;
@@ -456,7 +456,7 @@ PathResolutionResult IncludePathResolver::resolveIncludePathInternal( const TQSt
if( d.exists() ) {
///The recursive working-directory exists.
TQString makeParams = firstLine.mid( offset+5 );
- if( !makeParams.contains( ";" ) && !makeParams.contains( "&&" ) ) {
+ if( !makeParams.tqcontains( ";" ) && !makeParams.tqcontains( "&&" ) ) {
///Looks like valid parameters
///Make the file-name absolute, so it can be referenced from any directory
TQString absoluteFile = file;
@@ -471,14 +471,14 @@ PathResolutionResult IncludePathResolver::resolveIncludePathInternal( const TQSt
return res;
return resolveIncludePathInternal( KURL::relativePath(newWorkingDirectory,u.path()), newWorkingDirectory, makeParams , newSource );
}else{
- return PathResolutionResult( false, i18n("Recursive make-call failed"), i18n("The parameter-string \"%1\" does not seem to be valid. Output was: %2").arg(makeParams).arg(fullOutput) );
+ return PathResolutionResult( false, i18n("Recursive make-call failed"), i18n("The parameter-string \"%1\" does not seem to be valid. Output was: %2").tqarg(makeParams).tqarg(fullOutput) );
}
} else {
- return PathResolutionResult( false, i18n("Recursive make-call failed"), i18n("The directory \"%1\" does not exist. Output was: %2").arg(newWorkingDirectory).arg(fullOutput) );
+ return PathResolutionResult( false, i18n("Recursive make-call failed"), i18n("The directory \"%1\" does not exist. Output was: %2").tqarg(newWorkingDirectory).tqarg(fullOutput) );
}
} else {
- return PathResolutionResult( false, i18n("Recursive make-call malformed"), i18n("Output was: %2").arg(fullOutput) );
+ return PathResolutionResult( false, i18n("Recursive make-call malformed"), i18n("Output was: %2").tqarg(fullOutput) );
}
++offset;
@@ -488,7 +488,7 @@ PathResolutionResult IncludePathResolver::resolveIncludePathInternal( const TQSt
///STEP 2: Search the output for include-paths
TQRegExp validRx( "\\b([cg]\\+\\+|gcc)" );
if( validRx.search( fullOutput ) == -1 )
- return PathResolutionResult( false, i18n("Output seems not to be a valid gcc or g++ call"), i18n("Folder: \"%1\" Command: \"%2\" Output: \"%3\"").arg(workingDirectory).arg( source.getCommand(file, makeParameters) ).arg(fullOutput) );
+ return PathResolutionResult( false, i18n("Output seems not to be a valid gcc or g++ call"), i18n("Folder: \"%1\" Command: \"%2\" Output: \"%3\"").tqarg(workingDirectory).tqarg( source.getCommand(file, makeParameters) ).tqarg(fullOutput) );
PathResolutionResult ret( true );
ret.longErrorMessage = fullOutput;
@@ -497,7 +497,7 @@ PathResolutionResult IncludePathResolver::resolveIncludePathInternal( const TQSt
TQString quotedRx( "(\\').*(\\')|(\\\").*(\\\")" ); //Matches "hello", 'hello', 'hello"hallo"', etc.
TQString escapedPathRx( "(([^)(\"'\\s]*)(\\\\\\s)?)*" ); //Matches /usr/I\ am \ a\ strange\ path/include
- TQRegExp includeRx( TQString( "%1(%2|%3)(?=\\s)" ).arg( includeParameterRx ).arg( quotedRx ).arg( escapedPathRx ) );
+ TQRegExp includeRx( TQString( "%1(%2|%3)(?=\\s)" ).tqarg( includeParameterRx ).tqarg( quotedRx ).tqarg( escapedPathRx ) );
includeRx.setMinimal( true );
includeRx.setCaseSensitive( true );
offset = 0;