summaryrefslogtreecommitdiffstats
path: root/libemailfunctions
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-02-16 20:17:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-02-16 20:17:18 +0000
commitf4fae92b6768541e2952173c3d4b09040f95bf7e (patch)
treed8c5d93232235cd635f3310b4d95490df181ba2d /libemailfunctions
parent125c0a08265b75a133644d3b55f47e37c919f45d (diff)
downloadtdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.tar.gz
tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.zip
Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libemailfunctions')
-rw-r--r--libemailfunctions/email.cpp20
-rw-r--r--libemailfunctions/email.h4
-rw-r--r--libemailfunctions/idmapper.cpp10
-rw-r--r--libemailfunctions/networkstatus.cpp6
-rw-r--r--libemailfunctions/networkstatus.h2
-rw-r--r--libemailfunctions/tests/testemail.cpp2
6 files changed, 22 insertions, 22 deletions
diff --git a/libemailfunctions/email.cpp b/libemailfunctions/email.cpp
index 0f6b83617..8390431c7 100644
--- a/libemailfunctions/email.cpp
+++ b/libemailfunctions/email.cpp
@@ -300,7 +300,7 @@ KPIM::EmailParseResult KPIM::isValidEmailAddress( const TQString& aStr )
bool tooManyAtsFlag = false;
- int atCount = aStr.contains('@');
+ int atCount = aStr.tqcontains('@');
if ( atCount > 1 ) {
tooManyAtsFlag = true;;
} else if ( atCount == 0 ) {
@@ -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 "
- "contains more than one @. "
+ "tqcontains 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 "
- "contains unclosed comments/brackets.");
+ "tqcontains 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 "
- "contains an unclosed anglebracket.");
+ "tqcontains an unclosed anglebracket.");
case UnopenedAngleAddr :
return i18n("The email address you entered is not valid because it "
- "contains an unopened anglebracket.");
+ "tqcontains an unopened anglebracket.");
case UnexpectedComma :
return i18n("The email address you have entered is not valid because it "
- "contains an unexpected comma.");
+ "tqcontains 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 "
- "contains quoted text which does not end.");
+ "tqcontains 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 "
- "contains an illegal character.");
+ "tqcontains an illegal character.");
case InvalidDisplayName :
return i18n("The email address you have entered is not valid because it "
- "contains an invalid displayname.");
+ "tqcontains an invalid displayname.");
}
return i18n("Unknown problem with email address");
}
@@ -529,7 +529,7 @@ bool KPIM::isValidSimpleEmailAddress( const TQString& aStr )
TQString localPart = aStr.left( atChar );
bool tooManyAtsFlag = false;
bool inQuotedString = false;
- int atCount = localPart.contains( '@' );
+ int atCount = localPart.tqcontains( '@' );
unsigned int strlen = localPart.length();
for ( unsigned int index=0; index < strlen; index++ ) {
diff --git a/libemailfunctions/email.h b/libemailfunctions/email.h
index 5e5e665b9..fd568b971 100644
--- a/libemailfunctions/email.h
+++ b/libemailfunctions/email.h
@@ -192,7 +192,7 @@ KDE_EXPORT TQString getFirstEmailAddress( const TQString & addresses );
* and "Stefan Taferner". "joe@example.com" returns "joe@example.com"
* and "". Note that this only returns the first address.
* Also note that the return value is TRUE if both the name and the
- * mail are not empty: this does NOT tell you if mail contains a
+ * mail are not empty: this does NOT tell you if mail tqcontains a
* valid email address or just some rubbish.
*/
KDE_EXPORT bool getNameAndMail(const TQString& aStr, TQString& name, TQString& mail);
@@ -249,7 +249,7 @@ KDE_EXPORT TQString normalizeAddressesAndDecodeIDNs( const TQString & addresses
*/
KDE_EXPORT TQString normalizeAddressesAndEncodeIDNs( const TQString & str );
-/** Add quote characters around the given string if it contains a
+/** Add quote characters around the given string if it tqcontains a
* character that makes that necessary, in an email name, such as ",".
*/
KDE_EXPORT TQString quoteNameIfNecessary( const TQString& str );
diff --git a/libemailfunctions/idmapper.cpp b/libemailfunctions/idmapper.cpp
index 6250d41c0..089aa9221 100644
--- a/libemailfunctions/idmapper.cpp
+++ b/libemailfunctions/idmapper.cpp
@@ -98,12 +98,12 @@ bool IdMapper::save()
TQMap<TQString, TQVariant>::Iterator it;
for ( it = mIdMap.begin(); it != mIdMap.end(); ++it ) {
TQString fingerprint( "" );
- if ( mFingerprintMap.contains( it.key() ) )
+ if ( mFingerprintMap.tqcontains( it.key() ) )
fingerprint = mFingerprintMap[ it.key() ];
content += it.key() + "\x02\x02" + it.data().toString() + "\x02\x02" + fingerprint + "\r\n";
}
- file.writeBlock( content.latin1(), qstrlen( content.latin1() ) );
+ file.writeBlock( content.latin1(), tqstrlen( content.latin1() ) );
file.close();
return true;
@@ -117,7 +117,7 @@ void IdMapper::clear()
void IdMapper::setRemoteId( const TQString &localId, const TQString &remoteId )
{
- mIdMap.replace( localId, remoteId );
+ mIdMap.tqreplace( localId, remoteId );
}
void IdMapper::removeRemoteId( const TQString &remoteId )
@@ -159,7 +159,7 @@ TQString IdMapper::asString() const
TQMap<TQString, TQVariant>::ConstIterator it;
for ( it = mIdMap.begin(); it != mIdMap.end(); ++it ) {
TQString fp;
- if ( mFingerprintMap.contains( it.key() ) )
+ if ( mFingerprintMap.tqcontains( it.key() ) )
fp = mFingerprintMap[ it.key() ];
content += it.key() + "\t" + it.data().toString() + "\t" + fp + "\r\n";
}
@@ -174,7 +174,7 @@ void IdMapper::setFingerprint( const TQString &localId, const TQString &fingerpr
const TQString& IdMapper::fingerprint( const TQString &localId ) const
{
- if ( mFingerprintMap.contains( localId ) )
+ if ( mFingerprintMap.tqcontains( localId ) )
return mFingerprintMap[ localId ];
else
return TQString::null;
diff --git a/libemailfunctions/networkstatus.cpp b/libemailfunctions/networkstatus.cpp
index ce6fd2eb5..07ea1e83f 100644
--- a/libemailfunctions/networkstatus.cpp
+++ b/libemailfunctions/networkstatus.cpp
@@ -50,7 +50,7 @@ NetworkStatus::~NetworkStatus()
group.writeEntry( "Online", mStatus == Online );
}
-void NetworkStatus::setStatus( Status status )
+void NetworkStatus::seStatus( Status status )
{
mStatus = status;
@@ -69,10 +69,10 @@ void NetworkStatus::onlineStatusChanged()
if ( reply.isValid() ) {
int status = reply;
if ( status == 3 )
- setStatus( Online );
+ seStatus( Online );
else {
if ( mStatus != Offline )
- setStatus( Offline );
+ seStatus( Offline );
}
}
}
diff --git a/libemailfunctions/networkstatus.h b/libemailfunctions/networkstatus.h
index 42ff0f922..7b29431f8 100644
--- a/libemailfunctions/networkstatus.h
+++ b/libemailfunctions/networkstatus.h
@@ -60,7 +60,7 @@ class NetworkStatus : public TQObject, public DCOPObject
*
* @param status The new status.
*/
- void setStatus( Status status );
+ void seStatus( Status status );
/**
* Returns the current status.
diff --git a/libemailfunctions/tests/testemail.cpp b/libemailfunctions/tests/testemail.cpp
index 30908d83e..319151c43 100644
--- a/libemailfunctions/tests/testemail.cpp
+++ b/libemailfunctions/tests/testemail.cpp
@@ -57,7 +57,7 @@ static bool checkGetNameAndEmail(const TQString& input, const TQString& expName,
{
TQString name, email;
bool retVal = KPIM::getNameAndMail(input, name, email);
- check( "getNameAndMail " + input + " retVal", retVal?TQString::fromLatin1( "true" ):TQString::fromLatin1( "false" ), expRetVal?TQString::fromLatin1( "true" ):TQString::fromLatin1( "false" ) );
+ check( "getNameAndMail " + input + " retVal", retVal?TQString::tqfromLatin1( "true" ):TQString::tqfromLatin1( "false" ), expRetVal?TQString::tqfromLatin1( "true" ):TQString::tqfromLatin1( "false" ) );
check( "getNameAndMail " + input + " name", name, expName );
check( "getNameAndMail " + input + " email", email, expEmail );
return true;