From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libkdepim/kregexp3.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'libkdepim/kregexp3.cpp') diff --git a/libkdepim/kregexp3.cpp b/libkdepim/kregexp3.cpp index a14b446f6..6bb519e56 100644 --- a/libkdepim/kregexp3.cpp +++ b/libkdepim/kregexp3.cpp @@ -37,22 +37,22 @@ #include #endif -QString KRegExp3::replace( const QString & str, - const QString & replacementStr, +TQString KRegExp3::replace( const TQString & str, + const TQString & replacementStr, int start, bool global ) { int oldpos, pos; //-------- parsing the replacementStr into //-------- literal parts and backreferences: - QStringList literalStrs; - QValueList backRefs; + TQStringList literalStrs; + TQValueList backRefs; // Due to LTS: The regexp in unquoted form and with spaces: // \\ (\d) | \$ (\d) | \$ \{ (\d+) \} - QRegExp rx( "\\\\(\\d)|\\$(\\d)|\\$\\{(\\d+)\\}" ); - QRegExp bbrx("\\\\"); - QRegExp brx("\\"); + TQRegExp rx( "\\\\(\\d)|\\$(\\d)|\\$\\{(\\d+)\\}" ); + TQRegExp bbrx("\\\\"); + TQRegExp brx("\\"); #ifdef DEBUG_KREGEXP3 kdDebug() << "Analyzing replacementStr: \"" + replacementStr + "\"" << endl; @@ -64,7 +64,7 @@ QString KRegExp3::replace( const QString & str, pos = rx.search( replacementStr, pos ); #ifdef DEBUG_KREGEXP3 - kdDebug() << QString(" Found match at pos %1").arg(pos) << endl; + kdDebug() << TQString(" Found match at pos %1").arg(pos) << endl; #endif if ( pos < 0 ) { @@ -80,21 +80,21 @@ QString KRegExp3::replace( const QString & str, .replace( bbrx, "\\" ) .replace( brx, "" ); #ifdef DEBUG_KREGEXP3 - kdDebug() << QString(" Inserting \"") + literalStrs.last() + "\" as literal." << endl; + kdDebug() << TQString(" Inserting \"") + literalStrs.last() + "\" as literal." << endl; kdDebug() << " Searching for corresponding digit(s):" << endl; #endif for ( int i = 1 ; i < 4 ; i++ ) if ( !rx.cap(i).isEmpty() ) { backRefs << rx.cap(i).toInt(); #ifdef DEBUG_KREGEXP3 - kdDebug() << QString(" Found %1 at position %2 in the capturedTexts.") + kdDebug() << TQString(" Found %1 at position %2 in the capturedTexts.") .arg(backRefs.last()).arg(i) << endl; #endif break; } pos += rx.matchedLength(); #ifdef DEBUG_KREGEXP3 - kdDebug() << QString(" Setting new pos to %1.").arg(pos) << endl; + kdDebug() << TQString(" Setting new pos to %1.").arg(pos) << endl; #endif oldpos = pos; } @@ -107,12 +107,12 @@ QString KRegExp3::replace( const QString & str, //-------- actual construction of the //-------- resulting QString - QString result = ""; + TQString result = ""; oldpos = 0; pos = start; - QStringList::Iterator sIt; - QValueList::Iterator iIt; + TQStringList::Iterator sIt; + TQValueList::Iterator iIt; if ( start < 0 ) start += str.length(); @@ -125,7 +125,7 @@ QString KRegExp3::replace( const QString & str, pos = search( str, pos ); #ifdef DEBUG_KREGEXP3 - kdDebug() << QString(" Found match at pos %1").arg(pos) << endl; + kdDebug() << TQString(" Found match at pos %1").arg(pos) << endl; #endif if ( pos < 0 ) { @@ -168,7 +168,7 @@ QString KRegExp3::replace( const QString & str, } pos += matchedLength(); #ifdef DEBUG_KREGEXP3 - kdDebug() << QString(" Setting new pos to %1.").arg(pos) << endl; + kdDebug() << TQString(" Setting new pos to %1.").arg(pos) << endl; #endif oldpos = pos; -- cgit v1.2.1