diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 4c6f8d69e2d1501837affb472c4eb8fec4462240 (patch) | |
tree | 766a8ad7939fcf3eec534184c36bd0e0f80489e2 /libkdepim/linklocator.cpp | |
parent | 469cc56a805bd3d6940d54adbef554877c29853c (diff) | |
download | tdepim-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 'libkdepim/linklocator.cpp')
-rw-r--r-- | libkdepim/linklocator.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libkdepim/linklocator.cpp b/libkdepim/linklocator.cpp index e0c4c0d24..399c5d3b3 100644 --- a/libkdepim/linklocator.cpp +++ b/libkdepim/linklocator.cpp @@ -92,14 +92,14 @@ TQString LinkLocator::getUrl() // handle cases like this: <link>http://foobar.org/</link> int start = mPos; while(mPos < (int)mText.length() && mText[mPos] > ' ' && mText[mPos] != '"' && - TQString("<>()[]").tqfind(mText[mPos]) == -1) + TQString("<>()[]").find(mText[mPos]) == -1) { ++mPos; } /* some URLs really end with: # / & - _ */ const TQString allowedSpecialChars = TQString("#/&-_"); while(mPos > start && mText[mPos-1].isPunct() && - allowedSpecialChars.tqfind(mText[mPos-1]) == -1 ) + allowedSpecialChars.find(mText[mPos-1]) == -1 ) { --mPos; } @@ -128,7 +128,7 @@ bool LinkLocator::atUrl() const // the character directly before the URL must not be a letter, a number or // any other character allowed in a dot-atom (RFC 2822). if( ( mPos > 0 ) && ( mText[mPos-1].isLetterOrNumber() || - ( allowedSpecialChars.tqfind( mText[mPos-1] ) != -1 ) ) ) + ( allowedSpecialChars.find( mText[mPos-1] ) != -1 ) ) ) return false; TQChar ch = mText[mPos]; @@ -179,9 +179,9 @@ TQString LinkLocator::getEmailAddress() while ( start >= 0 && mText[start].tqunicode() < 128 && ( mText[start].isLetterOrNumber() || mText[start] == '@' || // allow @ to find invalid email addresses - allowedSpecialChars.tqfind( mText[start] ) != -1 ) ) { + allowedSpecialChars.find( mText[start] ) != -1 ) ) { if ( mText[start] == '@' ) - return TQString(); // local part tqcontains '@' -> no email address + return TQString(); // local part contains '@' -> no email address --start; } ++start; @@ -200,7 +200,7 @@ TQString LinkLocator::getEmailAddress() mText[end] == '.' || mText[end] == '-' ) ) { if ( mText[end] == '@' ) - return TQString(); // domain part tqcontains '@' -> no email address + return TQString(); // domain part contains '@' -> no email address if ( mText[end] == '.' ) dotPos = TQMIN( dotPos, end ); // remember index of first dot in domain ++end; @@ -305,7 +305,7 @@ TQString LinkLocator::convertToHtml(const TQString& plainText, int flags, else hyperlink = str; - str = str.tqreplace('&', "&"); + str = str.replace('&', "&"); result += "<a href=\"" + hyperlink + "\">" + str + "</a>"; x += locator.mPos - start; continue; @@ -314,12 +314,12 @@ TQString LinkLocator::convertToHtml(const TQString& plainText, int flags, if(!str.isEmpty()) { // len is the length of the local part - int len = str.tqfind('@'); + int len = str.find('@'); TQString localPart = str.left(len); // remove the local part from the result (as '&'s have been expanded to // & we have to take care of the 4 additional characters per '&') - result.truncate(result.length() - len - (localPart.tqcontains('&')*4)); + result.truncate(result.length() - len - (localPart.contains('&')*4)); x -= len; result += "<a href=\"mailto:" + str + "\">" + str + "</a>"; @@ -390,11 +390,11 @@ TQString LinkLocator::getEmoticon() return TQString(); const TQString smiley = mText.mid( mPos, smileyLen ); - if ( !s_smileyEmoticonNameMap->tqcontains( smiley ) ) + if ( !s_smileyEmoticonNameMap->contains( smiley ) ) return TQString(); // that's not a (known) smiley TQString htmlRep; - if ( s_smileyEmoticonHTMLCache->tqcontains( smiley ) ) { + if ( s_smileyEmoticonHTMLCache->contains( smiley ) ) { htmlRep = (*s_smileyEmoticonHTMLCache)[smiley]; } else { |