diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
commit | 48d4a26399959121f33d2bc3bfe51c7827b654fc (patch) | |
tree | 5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /languages/cpp/stringhelpers.cpp | |
parent | 7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff) | |
download | tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip |
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/stringhelpers.cpp')
-rw-r--r-- | languages/cpp/stringhelpers.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/languages/cpp/stringhelpers.cpp b/languages/cpp/stringhelpers.cpp index 13a39de2..bc1a8dc7 100644 --- a/languages/cpp/stringhelpers.cpp +++ b/languages/cpp/stringhelpers.cpp @@ -36,9 +36,9 @@ TQString clearComments( TQString str ) { int lastPos = 0; int pos; int len = str.length(); - while( (pos = str.find( "/*", lastPos )) != -1 ) { + while( (pos = str.tqfind( "/*", lastPos )) != -1 ) { if( !s ) return str; - int i = str.find( "*/", pos ); + int i = str.tqfind( "*/", pos ); if( i != -1 && i <= len - 2 ) { clearStr( str, pos, i+2 ); lastPos = i+2; @@ -49,9 +49,9 @@ TQString clearComments( TQString str ) { } lastPos = 0; - while( (pos = str.find( "//", lastPos )) != -1 ) { + while( (pos = str.tqfind( "//", lastPos )) != -1 ) { if( !s ) return str; - int i = str.find( "\n", pos ); + int i = str.tqfind( "\n", pos ); if( i != -1 && i <= len - 1 ) { clearStr( str, pos, i+1 ); lastPos = i+1; @@ -66,17 +66,17 @@ TQString clearComments( TQString str ) { TQString cutTemplateParams( TQString str ) { int p; - if( (p = str.find('<') ) != -1) { + if( (p = str.tqfind('<') ) != -1) { return str.left( p ); } - return str.stripWhiteSpace().replace('*',""); + return str.stripWhiteSpace().tqreplace('*',""); } -QPair<TQString, TQString> splitTemplateParams( TQString str ) { - QPair<TQString, TQString> ret; +TQPair<TQString, TQString> splitTemplateParams( TQString str ) { + TQPair<TQString, TQString> ret; int p; - if( (p = str.find('<') ) != -1) { + if( (p = str.tqfind('<') ) != -1) { ret.first = str.left( p ).stripWhiteSpace(); ret.second = str.mid( p ).stripWhiteSpace(); } else { @@ -238,8 +238,8 @@ int countExtract( TQChar c, const TQString& str ) { TQString templateParamFromString( int num, TQString str ) { if( str.endsWith("::") ) str.truncate( str.length() - 2 ); - int begin = str.find('<'); - int end = str.findRev('>'); + int begin = str.tqfind('<'); + int end = str.tqfindRev('>'); if(begin == -1 || end == -1) return ""; |