summaryrefslogtreecommitdiffstats
path: root/tqtinterface/qt4/tools/designer/editor/yyindent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tqtinterface/qt4/tools/designer/editor/yyindent.cpp')
-rw-r--r--tqtinterface/qt4/tools/designer/editor/yyindent.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/tqtinterface/qt4/tools/designer/editor/yyindent.cpp b/tqtinterface/qt4/tools/designer/editor/yyindent.cpp
index 61bd4d6..1942ce8 100644
--- a/tqtinterface/qt4/tools/designer/editor/yyindent.cpp
+++ b/tqtinterface/qt4/tools/designer/editor/yyindent.cpp
@@ -171,7 +171,7 @@ int columnForIndex( const TQString& t, int index )
*/
int indentOfLine( const TQString& t )
{
- return columnForIndex( t, t.tqfind(firstNonWhiteSpace(t)) );
+ return columnForIndex( t, t.find(firstNonWhiteSpace(t)) );
}
/*
@@ -198,12 +198,12 @@ static TQString trimmedCodeLine( const TQString& t )
/*
Replace character and string literals by X's, since they may
contain confusing characters (such as '{' and ';'). "Hello!" is
- tqreplaced by XXXXXXXX. The literals are rigourously of the same
+ replaced by XXXXXXXX. The literals are rigourously of the same
length before and after; otherwise, we would break tqalignment of
continuation lines.
*/
k = 0;
- while ( (k = trimmed.tqfind(*literal, k)) != -1 ) {
+ while ( (k = trimmed.find(*literal, k)) != -1 ) {
for ( int i = 0; i < literal->matchedLength(); i++ )
eraseChar( trimmed, k + i, 'X' );
k += literal->matchedLength();
@@ -214,7 +214,7 @@ static TQString trimmedCodeLine( const TQString& t )
handled elsewhere.
*/
k = 0;
- while ( (k = trimmed.tqfind(*inlineCComment, k)) != -1 ) {
+ while ( (k = trimmed.find(*inlineCComment, k)) != -1 ) {
for ( int i = 0; i < inlineCComment->matchedLength(); i++ )
eraseChar( trimmed, k + i, ' ' );
k += inlineCComment->matchedLength();
@@ -227,7 +227,7 @@ static TQString trimmedCodeLine( const TQString& t )
foo1: bar1;
bar2;
*/
- while ( trimmed.tqfindRev(':') != -1 && trimmed.tqfind(*label) != -1 ) {
+ while ( trimmed.findRev(':') != -1 && trimmed.find(*label) != -1 ) {
TQString cap1 = label->cap( 1 );
int pos1 = label->pos( 1 );
int stop = cap1.length();
@@ -249,7 +249,7 @@ static TQString trimmedCodeLine( const TQString& t )
/*
Remove C++-style comments.
*/
- k = trimmed.tqfind( "//" );
+ k = trimmed.find( "//" );
if ( k != -1 )
trimmed.truncate( k );
@@ -352,7 +352,7 @@ static bool readLine()
if ( yyLinizerState->inCComment ) {
TQString slashAster( "/*" );
- k = yyLinizerState->line.tqfind( slashAster );
+ k = yyLinizerState->line.find( slashAster );
if ( k == -1 ) {
yyLinizerState->line = TQString();
} else {
@@ -364,7 +364,7 @@ static bool readLine()
if ( !yyLinizerState->inCComment ) {
TQString asterSlash( "*/" );
- k = yyLinizerState->line.tqfind( asterSlash );
+ k = yyLinizerState->line.find( asterSlash );
if ( k != -1 ) {
for ( int i = 0; i < k + 2; i++ )
eraseChar( yyLinizerState->line, i, ' ' );
@@ -399,8 +399,8 @@ static bool readLine()
the other way around, as we are parsing backwards.
*/
yyLinizerState->braceDepth +=
- yyLinizerState->line.tqcontains( '}' ) -
- yyLinizerState->line.tqcontains( '{' );
+ yyLinizerState->line.contains( '}' ) -
+ yyLinizerState->line.contains( '{' );
/*
We use a dirty trick for
@@ -416,7 +416,7 @@ static bool readLine()
if ( yyLinizerState->pendingRightBrace )
yyLinizerState->braceDepth++;
yyLinizerState->pendingRightBrace =
- ( yyLinizerState->line.tqfind(*braceX) == 0 );
+ ( yyLinizerState->line.find(*braceX) == 0 );
if ( yyLinizerState->pendingRightBrace )
yyLinizerState->braceDepth--;
} while ( yyLinizerState->line.isEmpty() );
@@ -466,12 +466,12 @@ static bool bottomLineStartsInCComment()
return FALSE;
--p;
- if ( (*p).tqfind(slashAster) != -1 || (*p).tqfind(asterSlash) != -1 ) {
+ if ( (*p).find(slashAster) != -1 || (*p).find(asterSlash) != -1 ) {
TQString trimmed = trimmedCodeLine( *p );
- if ( trimmed.tqfind(slashAster) != -1 ) {
+ if ( trimmed.find(slashAster) != -1 ) {
return TRUE;
- } else if ( trimmed.tqfind(asterSlash) != -1 ) {
+ } else if ( trimmed.find(asterSlash) != -1 ) {
return FALSE;
}
}
@@ -489,7 +489,7 @@ static bool bottomLineStartsInCComment()
*/
static int indentWhenBottomLineStartsInCComment()
{
- int k = yyLine->tqfindRev( "/*" );
+ int k = yyLine->findRev( "/*" );
if ( k == -1 ) {
/*
We found a normal text line in a comment. Align the
@@ -554,7 +554,7 @@ static bool matchBracelessControlStatement()
case '(':
delimDepth--;
if ( delimDepth == 0 ) {
- if ( yyLine->tqfind(*iflikeKeyword) != -1 ) {
+ if ( yyLine->find(*iflikeKeyword) != -1 ) {
/*
We have
@@ -626,12 +626,12 @@ static bool isUnfinishedLine()
return FALSE;
TQChar lastCh = (*yyLine)[(int) yyLine->length() - 1];
- if ( TQString("{};").tqfind(lastCh) == -1 && !yyLine->endsWith("...") ) {
+ if ( TQString("{};").find(lastCh) == -1 && !yyLine->endsWith("...") ) {
/*
It doesn't end with ';' or similar. If it's neither
"TQ_OBJECT" nor "if ( x )", it must be an unfinished line.
*/
- unf = ( yyLine->tqcontains("TQ_OBJECT") == 0 &&
+ unf = ( yyLine->contains("TQ_OBJECT") == 0 &&
!matchBracelessControlStatement() );
} else if ( lastCh == TQChar(';') ) {
if ( lastParen(*yyLine) == TQChar('(') ) {
@@ -755,12 +755,12 @@ static int indentForContinuationLine()
end of the unfinished lines or by unbalanced
parentheses.
*/
- if ( TQString("!=<>").tqfind((*yyLine)[j - 1]) == -1 &&
+ if ( TQString("!=<>").find((*yyLine)[j - 1]) == -1 &&
(*yyLine)[j + 1] != '=' ) {
if ( braceDepth == 0 && delimDepth == 0 &&
j < (int) yyLine->length() - 1 &&
!yyLine->endsWith(",") &&
- (yyLine->tqcontains('(') == yyLine->tqcontains(')')) )
+ (yyLine->contains('(') == yyLine->contains(')')) )
hook = j;
}
}
@@ -932,7 +932,7 @@ static int indentForStandaloneLine()
YY_RESTORE();
}
- if ( yyLine->endsWith(";") || yyLine->tqcontains('{') > 0 ) {
+ if ( yyLine->endsWith(";") || yyLine->contains('{') > 0 ) {
/*
The situation is possibly this, and we want to indent
"z;":