summaryrefslogtreecommitdiffstats
path: root/libkdepim/kregexp3.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /libkdepim/kregexp3.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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;