summaryrefslogtreecommitdiffstats
path: root/libemailfunctions/email.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /libemailfunctions/email.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libemailfunctions/email.cpp')
-rw-r--r--libemailfunctions/email.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/libemailfunctions/email.cpp b/libemailfunctions/email.cpp
index 8390431c..c97bebaf 100644
--- a/libemailfunctions/email.cpp
+++ b/libemailfunctions/email.cpp
@@ -32,7 +32,7 @@ TQStringList KPIM::splitEmailAddrList(const TQString& aStr)
{
// Features:
// - always ignores quoted characters
- // - ignores everything (including parentheses and commas)
+ // - ignores everything (including tqparentheses and commas)
// inside quoted strings
// - supports nested comments
// - ignores everything (including double quotes and commas)
@@ -463,7 +463,7 @@ TQString KPIM::emailParseResultToString( EmailParseResult errorCode )
switch ( errorCode ) {
case TooManyAts :
return i18n("The email address you entered is not valid because it "
- "tqcontains more than one @. "
+ "contains more than one @. "
"You will not create valid messages if you do not "
"change your address.");
case TooFewAts :
@@ -481,18 +481,18 @@ TQString KPIM::emailParseResultToString( EmailParseResult errorCode )
"does not contain a domain part.");
case UnbalancedParens :
return i18n("The email address you entered is not valid because it "
- "tqcontains unclosed comments/brackets.");
+ "contains unclosed comments/brackets.");
case AddressOk :
return i18n("The email address you entered is valid.");
case UnclosedAngleAddr :
return i18n("The email address you entered is not valid because it "
- "tqcontains an unclosed anglebracket.");
+ "contains an unclosed anglebracket.");
case UnopenedAngleAddr :
return i18n("The email address you entered is not valid because it "
- "tqcontains an unopened anglebracket.");
+ "contains an unopened anglebracket.");
case UnexpectedComma :
return i18n("The email address you have entered is not valid because it "
- "tqcontains an unexpected comma.");
+ "contains an unexpected comma.");
case UnexpectedEnd :
return i18n("The email address you entered is not valid because it ended "
"unexpectedly, this probably means you have used an escaping type "
@@ -500,17 +500,17 @@ TQString KPIM::emailParseResultToString( EmailParseResult errorCode )
"address.");
case UnbalancedQuote :
return i18n("The email address you entered is not valid because it "
- "tqcontains quoted text which does not end.");
+ "contains quoted text which does not end.");
case NoAddressSpec :
return i18n("The email address you entered is not valid because it "
"does not seem to contain an actual email address, i.e. "
"something of the form joe@kde.org.");
case DisallowedChar :
return i18n("The email address you entered is not valid because it "
- "tqcontains an illegal character.");
+ "contains an illegal character.");
case InvalidDisplayName :
return i18n("The email address you have entered is not valid because it "
- "tqcontains an invalid displayname.");
+ "contains an invalid displayname.");
}
return i18n("Unknown problem with email address");
}
@@ -620,8 +620,8 @@ TQString KPIM::getFirstEmailAddress( const TQString & addresses )
//-----------------------------------------------------------------------------
bool KPIM::getNameAndMail(const TQString& aStr, TQString& name, TQString& mail)
{
- name = TQString::null;
- mail = TQString::null;
+ name = TQString();
+ mail = TQString();
const int len=aStr.length();
const char cQuotes = '"';
@@ -729,12 +729,12 @@ bool KPIM::getNameAndMail(const TQString& aStr, TQString& name, TQString& mail)
// and outside of quoted text behind the trailing '>'.
bInComment = false;
bInQuotesOutsideOfEmail = false;
- int parenthesesNesting = 0;
+ int tqparenthesesNesting = 0;
for( i = iAd+1; len > i; ++i ) {
c = aStr[i];
if( bInComment ){
if( ')' == c ){
- if ( --parenthesesNesting == 0 ) {
+ if ( --tqparenthesesNesting == 0 ) {
bInComment = false;
if( !name.isEmpty() )
name.append( ' ' );
@@ -745,7 +745,7 @@ bool KPIM::getNameAndMail(const TQString& aStr, TQString& name, TQString& mail)
} else {
if( '(' == c ) {
// nested "("
- ++parenthesesNesting;
+ ++tqparenthesesNesting;
}
name.append( c ); // all comment stuff is part of the name
}
@@ -772,7 +772,7 @@ bool KPIM::getNameAndMail(const TQString& aStr, TQString& name, TQString& mail)
case '(':
if( !name.isEmpty() )
name.append( ' ' );
- if ( ++parenthesesNesting > 0 )
+ if ( ++tqparenthesesNesting > 0 )
bInComment = true;
break;
default:
@@ -838,7 +838,7 @@ TQString KPIM::decodeIDN( const TQString & addrSpec )
TQString idn = KIDNA::toUnicode( addrSpec.mid( atPos + 1 ) );
if ( idn.isEmpty() )
- return TQString::null;
+ return TQString();
return addrSpec.left( atPos + 1 ) + idn;
}
@@ -979,7 +979,7 @@ TQString KPIM::quoteNameIfNecessary( const TQString &str )
if ( ( quoted[0] == '"' ) && ( quoted[quoted.length() - 1] == '"' ) ) {
quoted = "\"" + escapeQuotes( quoted.mid( 1, quoted.length() - 2 ) ) + "\"";
}
- else if ( quoted.find( needQuotes ) != -1 ) {
+ else if ( quoted.tqfind( needQuotes ) != -1 ) {
quoted = "\"" + escapeQuotes( quoted ) + "\"";
}