diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-23 01:42:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-23 01:42:07 +0000 |
commit | a2277b6bc715464e83882b90c2a058139b8a6b54 (patch) | |
tree | ab09b14014f59b4d8e2ddd12226aa0b22e4dfc5d /kregexpeditor/qtregexphighlighter.cpp | |
parent | d3f79e04b34bd1f70a458b81b28fc8799498c8dc (diff) | |
download | tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.tar.gz tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.zip |
TQt4 port kdeutils
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1238125 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kregexpeditor/qtregexphighlighter.cpp')
-rw-r--r-- | kregexpeditor/qtregexphighlighter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kregexpeditor/qtregexphighlighter.cpp b/kregexpeditor/qtregexphighlighter.cpp index fdf3a81..431797f 100644 --- a/kregexpeditor/qtregexphighlighter.cpp +++ b/kregexpeditor/qtregexphighlighter.cpp @@ -28,14 +28,14 @@ int QtRegexpHighlighter::highlightParagraph( const TQString & text, int endState regexp.setCaseSensitive( _caseSensitive ); regexp.setMinimal( _minimal ); - setFormat( 0, text.length(), _editor->font(), Qt::black ); + setFormat( 0, text.length(), _editor->font(), TQt::black ); if ( !regexp.isValid() || regexp.isEmpty() ) { return 0; } // ------------------------------ Process with the regular expression. - TQColor colors[] = { Qt::red, Qt::blue }; + TQColor colors[] = { TQt::red, TQt::blue }; int color = endStateOfLastPara; if ( color < 0 || color > 1 ) color = 0; @@ -63,7 +63,7 @@ int QtRegexpHighlighter::highlightParagraph( const TQString & text, int endState if ( length + (start-index) != regexp.matchedLength() ) setFormat( start+length, regexp.matchedLength()-length-(start-index), colors[color] ); - index += QMAX( 1, regexp.matchedLength() ); // ensure progress when matching for example ^ or \b + index += TQMAX( 1, regexp.matchedLength() ); // ensure progress when matching for example ^ or \b color = (color+1)%2; } return color; |