summaryrefslogtreecommitdiffstats
path: root/kmail/objecttreeparser.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit4c6f8d69e2d1501837affb472c4eb8fec4462240 (patch)
tree766a8ad7939fcf3eec534184c36bd0e0f80489e2 /kmail/objecttreeparser.cpp
parent469cc56a805bd3d6940d54adbef554877c29853c (diff)
downloadtdepim-4c6f8d69e2d1501837affb472c4eb8fec4462240.tar.gz
tdepim-4c6f8d69e2d1501837affb472c4eb8fec4462240.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/objecttreeparser.cpp')
-rw-r--r--kmail/objecttreeparser.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/kmail/objecttreeparser.cpp b/kmail/objecttreeparser.cpp
index 0b79d98c0..db27f7f59 100644
--- a/kmail/objecttreeparser.cpp
+++ b/kmail/objecttreeparser.cpp
@@ -804,9 +804,9 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
TQByteArray ciphertext( data.msgPart().bodyDecodedBinary() );
#ifdef MARCS_DEBUG
TQCString cipherStr( ciphertext.data(), ciphertext.size() + 1 );
- bool cipherIsBinary = (-1 == cipherStr.tqfind("BEGIN ENCRYPTED MESSAGE", 0, false) ) &&
- (-1 == cipherStr.tqfind("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) &&
- (-1 == cipherStr.tqfind("BEGIN PGP MESSAGE", 0, false) );
+ bool cipherIsBinary = (-1 == cipherStr.find("BEGIN ENCRYPTED MESSAGE", 0, false) ) &&
+ (-1 == cipherStr.find("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) &&
+ (-1 == cipherStr.find("BEGIN PGP MESSAGE", 0, false) );
dumpToFile( "dat_04_reader.encrypted", ciphertext.data(), ciphertext.size() );
@@ -916,9 +916,9 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
// ### while pinentry-qt appears)
TQByteArray ciphertext( data.msgPart().bodyDecodedBinary() );
TQCString cipherStr( ciphertext.data(), ciphertext.size() + 1 );
- bool cipherIsBinary = (-1 == cipherStr.tqfind("BEGIN ENCRYPTED MESSAGE", 0, false) ) &&
- (-1 == cipherStr.tqfind("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) &&
- (-1 == cipherStr.tqfind("BEGIN PGP MESSAGE", 0, false) );
+ bool cipherIsBinary = (-1 == cipherStr.find("BEGIN ENCRYPTED MESSAGE", 0, false) ) &&
+ (-1 == cipherStr.find("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) &&
+ (-1 == cipherStr.find("BEGIN PGP MESSAGE", 0, false) );
if ( !cipherIsBinary ) {
decryptedData = cipherStr;
}
@@ -939,12 +939,12 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
bool ObjectTreeParser::containsExternalReferences( const TQCString & str )
{
TQRegExp httpRegExp("(\\\"|\\\'|url\\s*\\(\\s*)http[s]?:");
- int httpPos = str.tqfind( httpRegExp, 0 );
+ int httpPos = str.find( httpRegExp, 0 );
while ( httpPos >= 0 ) {
// look backwards for "href"
if ( httpPos > 5 ) {
- int hrefPos = str.tqfindRev( "href", httpPos - 5, true );
+ int hrefPos = str.findRev( "href", httpPos - 5, true );
// if no 'href' is found or the distance between 'href' and '"http[s]:'
// is larger than 7 (7 is the distance in 'href = "http[s]:') then
// we assume that we have found an external reference
@@ -952,7 +952,7 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
return true;
}
// find next occurrence of "http: or "https:
- httpPos = str.tqfind( httpRegExp, httpPos + 6 );
+ httpPos = str.find( httpRegExp, httpPos + 6 );
}
return false;
}
@@ -979,12 +979,12 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
// We must fo this, or else we will see only 1st inlined html
// attachment. It is IMHO enough to search only for </BODY> and
// put \0 there.
- int i = cstr.tqfindRev("</body>", -1, false); //case insensitive
+ int i = cstr.findRev("</body>", -1, false); //case insensitive
if ( 0 <= i )
cstr.truncate(i);
else // just in case - search for </html>
{
- i = cstr.tqfindRev("</html>", -1, false); //case insensitive
+ i = cstr.findRev("</html>", -1, false); //case insensitive
if ( 0 <= i ) cstr.truncate(i);
}
// ---Sven's strip </BODY> and </HTML> from end of attachment end-
@@ -1031,7 +1031,7 @@ static bool isMailmanMessage( partNode * curNode ) {
return true;
if ( headers.HasField("X-Mailer") &&
0 == TQCString( headers.FieldBody("X-Mailer").AsString().c_str() )
- .tqfind("MAILMAN", 0, false) )
+ .find("MAILMAN", 0, false) )
return true;
return false;
}
@@ -1047,21 +1047,21 @@ namespace KMail {
const TQCString delimZ2("--__--__--\n\n_____________");
const TQCString delimZ1("--__--__--\r\n\r\n_____________");
TQCString partStr, digestHeaderStr;
- int thisDelim = cstr.tqfind(delim1.data(), 0, false);
+ int thisDelim = cstr.find(delim1.data(), 0, false);
if ( thisDelim == -1 )
- thisDelim = cstr.tqfind(delim2.data(), 0, false);
+ thisDelim = cstr.find(delim2.data(), 0, false);
if ( thisDelim == -1 ) {
kdDebug(5006) << " Sorry: Old style Mailman message but no delimiter found." << endl;
return false;
}
- int nextDelim = cstr.tqfind(delim1.data(), thisDelim+1, false);
+ int nextDelim = cstr.find(delim1.data(), thisDelim+1, false);
if ( -1 == nextDelim )
- nextDelim = cstr.tqfind(delim2.data(), thisDelim+1, false);
+ nextDelim = cstr.find(delim2.data(), thisDelim+1, false);
if ( -1 == nextDelim )
- nextDelim = cstr.tqfind(delimZ1.data(), thisDelim+1, false);
+ nextDelim = cstr.find(delimZ1.data(), thisDelim+1, false);
if ( -1 == nextDelim )
- nextDelim = cstr.tqfind(delimZ2.data(), thisDelim+1, false);
+ nextDelim = cstr.find(delimZ2.data(), thisDelim+1, false);
if ( nextDelim < 0)
return false;
@@ -1081,15 +1081,15 @@ namespace KMail {
curNode->setType( DwMime::kTypeMultipart );
curNode->setSubType( DwMime::kSubtypeDigest );
while( -1 < nextDelim ){
- int thisEoL = cstr.tqfind("\nMessage:", thisDelim, false);
+ int thisEoL = cstr.find("\nMessage:", thisDelim, false);
if ( -1 < thisEoL )
thisDelim = thisEoL+1;
else{
- thisEoL = cstr.tqfind("\n_____________", thisDelim, false);
+ thisEoL = cstr.find("\n_____________", thisDelim, false);
if ( -1 < thisEoL )
thisDelim = thisEoL+1;
}
- thisEoL = cstr.tqfind('\n', thisDelim);
+ thisEoL = cstr.find('\n', thisDelim);
if ( -1 < thisEoL )
thisDelim = thisEoL+1;
else
@@ -1101,10 +1101,10 @@ namespace KMail {
partStr += cstr.mid( thisDelim, nextDelim-thisDelim );
TQCString subject("embedded message");
TQCString subSearch("\nSubject:");
- int subPos = partStr.tqfind(subSearch.data(), 0, false);
+ int subPos = partStr.find(subSearch.data(), 0, false);
if ( -1 < subPos ){
subject = partStr.mid(subPos+subSearch.length());
- thisEoL = subject.tqfind('\n');
+ thisEoL = subject.find('\n');
if ( -1 < thisEoL )
subject.truncate( thisEoL );
}
@@ -1114,21 +1114,21 @@ namespace KMail {
subject, true );
//mReader->queueHtml("<br><hr><br>");
thisDelim = nextDelim+1;
- nextDelim = cstr.tqfind(delim1.data(), thisDelim, false);
+ nextDelim = cstr.find(delim1.data(), thisDelim, false);
if ( -1 == nextDelim )
- nextDelim = cstr.tqfind(delim2.data(), thisDelim, false);
+ nextDelim = cstr.find(delim2.data(), thisDelim, false);
if ( -1 == nextDelim )
- nextDelim = cstr.tqfind(delimZ1.data(), thisDelim, false);
+ nextDelim = cstr.find(delimZ1.data(), thisDelim, false);
if ( -1 == nextDelim )
- nextDelim = cstr.tqfind(delimZ2.data(), thisDelim, false);
+ nextDelim = cstr.find(delimZ2.data(), thisDelim, false);
}
// reset curent node's Content-Type
curNode->setType( DwMime::kTypeText );
curNode->setSubType( DwMime::kSubtypePlain );
- int thisEoL = cstr.tqfind("_____________", thisDelim);
+ int thisEoL = cstr.find("_____________", thisDelim);
if ( -1 < thisEoL ){
thisDelim = thisEoL;
- thisEoL = cstr.tqfind('\n', thisDelim);
+ thisEoL = cstr.find('\n', thisDelim);
if ( -1 < thisEoL )
thisDelim = thisEoL+1;
}
@@ -1720,7 +1720,7 @@ namespace KMail {
bool isSigned = smimeType == "signed-data";
bool isEncrypted = smimeType == "enveloped-data";
- // Analyze "signTestNode" node to tqfind/verify a signature.
+ // Analyze "signTestNode" node to find/verify a signature.
// If zero this verification was successfully done after
// decrypting via recursion by insertAndParseNewChildNode().
partNode* signTestNode = isEncrypted ? 0 : node;
@@ -2252,7 +2252,7 @@ TQString ObjectTreeParser::sigStatusToString( const Kleo::CryptoBackend::Protoco
}
/*
// add i18n support for 3rd party plug-ins here:
- else if (0 <= cryptPlug->libName().tqfind( "yetanotherpluginname", 0, false )) {
+ else if (0 <= cryptPlug->libName().find( "yetanotherpluginname", 0, false )) {
}
*/
@@ -2982,7 +2982,7 @@ TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate )
TQString line;
/* search next occurrence of '\n' */
- pos = s.tqfind('\n', beg, FALSE);
+ pos = s.find('\n', beg, FALSE);
if (pos == (unsigned int)(-1))
pos = length;
@@ -3083,7 +3083,7 @@ TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate )
{
// don't write empty <div ...></div> blocks (they have zero height)
// ignore ^M DOS linebreaks
- if( !line.tqreplace('\015', "").isEmpty() )
+ if( !line.replace('\015', "").isEmpty() )
{
htmlStr +=TQString( "<div dir=\"%1\">" ).tqarg( line.isRightToLeft() ? "rtl":"ltr" );
htmlStr += LinkLocator::convertToHtml( line, convertFlags );