summaryrefslogtreecommitdiffstats
path: root/libkdepim/kregexp3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkdepim/kregexp3.cpp')
-rw-r--r--libkdepim/kregexp3.cpp32
1 files changed, 16 insertions, 16 deletions
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 <kdebug.h>
#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<int> backRefs;
+ TQStringList literalStrs;
+ TQValueList<int> 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<int>::Iterator iIt;
+ TQStringList::Iterator sIt;
+ TQValueList<int>::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;