summaryrefslogtreecommitdiffstats
path: root/tools/designer/editor/parenmatcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/designer/editor/parenmatcher.cpp')
-rw-r--r--tools/designer/editor/parenmatcher.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/tools/designer/editor/parenmatcher.cpp b/tools/designer/editor/parenmatcher.cpp
index ddc4b8838..efb6a215a 100644
--- a/tools/designer/editor/parenmatcher.cpp
+++ b/tools/designer/editor/parenmatcher.cpp
@@ -40,18 +40,18 @@
ParenMatcher::ParenMatcher()
{
- enabled = TRUE;
+ enabled = true;
}
bool ParenMatcher::match( TQTextCursor *cursor )
{
if ( !enabled )
- return FALSE;
- bool ret = FALSE;
+ return false;
+ bool ret = false;
TQChar c( cursor->paragraph()->at( cursor->index() )->c );
- bool ok1 = FALSE;
- bool ok2 = FALSE;
+ bool ok1 = false;
+ bool ok2 = false;
if ( c == '{' || c == '(' || c == '[' ) {
ok1 = checkOpenParen( cursor );
ret = ok1 || ret;
@@ -69,7 +69,7 @@ bool ParenMatcher::match( TQTextCursor *cursor )
bool ParenMatcher::checkOpenParen( TQTextCursor *cursor )
{
if ( !cursor->paragraph()->extraData() )
- return FALSE;
+ return false;
ParenList parenList = ( (ParagData*)cursor->paragraph()->extraData() )->parenList;
Paren openParen, closedParen;
@@ -77,7 +77,7 @@ bool ParenMatcher::checkOpenParen( TQTextCursor *cursor )
int i = 0;
int ignore = 0;
- bool foundOpen = FALSE;
+ bool foundOpen = false;
TQChar c = cursor->paragraph()->at( cursor->index() )->c;
for (;;) {
if ( !foundOpen ) {
@@ -88,7 +88,7 @@ bool ParenMatcher::checkOpenParen( TQTextCursor *cursor )
++i;
continue;
} else {
- foundOpen = TRUE;
+ foundOpen = true;
++i;
}
}
@@ -132,18 +132,18 @@ bool ParenMatcher::checkOpenParen( TQTextCursor *cursor )
cursor->document()->setSelectionEnd( id, *cursor );
cursor->setParagraph( tstring );
cursor->setIndex( tidx );
- return TRUE;
+ return true;
}
}
bye:
- return FALSE;
+ return false;
}
bool ParenMatcher::checkClosedParen( TQTextCursor *cursor )
{
if ( !cursor->paragraph()->extraData() )
- return FALSE;
+ return false;
ParenList parenList = ( (ParagData*)cursor->paragraph()->extraData() )->parenList;
Paren openParen, closedParen;
@@ -151,7 +151,7 @@ bool ParenMatcher::checkClosedParen( TQTextCursor *cursor )
int i = (int)parenList.count() - 1;
int ignore = 0;
- bool foundClosed = FALSE;
+ bool foundClosed = false;
TQChar c = cursor->paragraph()->at( cursor->index() - 1 )->c;
for (;;) {
if ( !foundClosed ) {
@@ -162,7 +162,7 @@ bool ParenMatcher::checkClosedParen( TQTextCursor *cursor )
--i;
continue;
} else {
- foundClosed = TRUE;
+ foundClosed = true;
--i;
}
}
@@ -206,10 +206,10 @@ bool ParenMatcher::checkClosedParen( TQTextCursor *cursor )
cursor->document()->setSelectionEnd( id, *cursor );
cursor->setParagraph( tstring );
cursor->setIndex( tidx );
- return TRUE;
+ return true;
}
}
bye:
- return FALSE;
+ return false;
}