summaryrefslogtreecommitdiffstats
path: root/libkdepim/linklocator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkdepim/linklocator.cpp')
-rw-r--r--libkdepim/linklocator.cpp22
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('&', "&amp;");
+ str = str.replace('&', "&amp;");
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
// &amp; 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 {