summaryrefslogtreecommitdiffstats
path: root/libemailfunctions
diff options
context:
space:
mode:
Diffstat (limited to 'libemailfunctions')
-rw-r--r--libemailfunctions/email.cpp34
-rw-r--r--libemailfunctions/email.h4
-rw-r--r--libemailfunctions/idmapper.cpp8
-rw-r--r--libemailfunctions/idmapper.h2
-rw-r--r--libemailfunctions/networkstatus.cpp44
-rw-r--r--libemailfunctions/networkstatus.h20
-rw-r--r--libemailfunctions/tests/testemail.cpp16
7 files changed, 64 insertions, 64 deletions
diff --git a/libemailfunctions/email.cpp b/libemailfunctions/email.cpp
index 8390431c7..c97bebaf9 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 ) + "\"";
}
diff --git a/libemailfunctions/email.h b/libemailfunctions/email.h
index fd568b971..5e5e665b9 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 tqcontains a
+ * mail are not empty: this does NOT tell you if mail contains 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 tqcontains a
+/** Add quote characters around the given string if it contains 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 089aa9221..d90ad8171 100644
--- a/libemailfunctions/idmapper.cpp
+++ b/libemailfunctions/idmapper.cpp
@@ -134,12 +134,12 @@ void IdMapper::removeRemoteId( const TQString &remoteId )
TQString IdMapper::remoteId( const TQString &localId ) const
{
TQMap<TQString, TQVariant>::ConstIterator it;
- it = mIdMap.find( localId );
+ it = mIdMap.tqfind( localId );
if ( it != mIdMap.end() )
return it.data().toString();
else
- return TQString::null;
+ return TQString();
}
TQString IdMapper::localId( const TQString &remoteId ) const
@@ -149,7 +149,7 @@ TQString IdMapper::localId( const TQString &remoteId ) const
if ( it.data().toString() == remoteId )
return it.key();
- return TQString::null;
+ return TQString();
}
TQString IdMapper::asString() const
@@ -177,7 +177,7 @@ const TQString& IdMapper::fingerprint( const TQString &localId ) const
if ( mFingerprintMap.tqcontains( localId ) )
return mFingerprintMap[ localId ];
else
- return TQString::null;
+ return TQString();
}
TQMap<TQString, TQString> IdMapper::remoteIdMap() const
diff --git a/libemailfunctions/idmapper.h b/libemailfunctions/idmapper.h
index 999c68ac3..dcb306979 100644
--- a/libemailfunctions/idmapper.h
+++ b/libemailfunctions/idmapper.h
@@ -52,7 +52,7 @@ class KDE_EXPORT IdMapper
The current implementation stores the data at
$(KDEHOME)/share/apps/\<path\>/\<identifier\>.
*/
- IdMapper( const TQString &path, const TQString &identifier = TQString::null );
+ IdMapper( const TQString &path, const TQString &identifier = TQString() );
/** Destructor. */
~IdMapper();
diff --git a/libemailfunctions/networkstatus.cpp b/libemailfunctions/networkstatus.cpp
index 07ea1e83f..5cdae0e98 100644
--- a/libemailfunctions/networkstatus.cpp
+++ b/libemailfunctions/networkstatus.cpp
@@ -29,58 +29,58 @@
using namespace KPIM;
-static KStaticDeleter<NetworkStatus> networkStatusDeleter;
-NetworkStatus *NetworkStatus::mSelf = 0;
+static KStaticDeleter<NetworktqStatus> networkStatusDeleter;
+NetworktqStatus *NetworktqStatus::mSelf = 0;
-NetworkStatus::NetworkStatus()
- : TQObject( 0, "NetworkStatus" ), DCOPObject( "NetworkStatus" )
+NetworktqStatus::NetworktqStatus()
+ : TQObject( 0, "NetworktqStatus" ), DCOPObject( "NetworktqStatus" )
{
- KConfigGroup group( KGlobal::config(), "NetworkStatus" );
+ KConfigGroup group( KGlobal::config(), "NetworktqStatus" );
if ( group.readBoolEntry( "Online", true ) == true )
- mStatus = Online;
+ mtqStatus = Online;
else
- mStatus = Offline;
+ mtqStatus = Offline;
connectDCOPSignal( 0, 0, "onlineStatusChanged()", "onlineStatusChanged()", false );
}
-NetworkStatus::~NetworkStatus()
+NetworktqStatus::~NetworktqStatus()
{
- KConfigGroup group( KGlobal::config(), "NetworkStatus" );
- group.writeEntry( "Online", mStatus == Online );
+ KConfigGroup group( KGlobal::config(), "NetworktqStatus" );
+ group.writeEntry( "Online", mtqStatus == Online );
}
-void NetworkStatus::seStatus( Status status )
+void NetworktqStatus::setqStatus( tqStatus status )
{
- mStatus = status;
+ mtqStatus = status;
- emit statusChanged( mStatus );
+ emit statusChanged( mtqStatus );
}
-NetworkStatus::Status NetworkStatus::status() const
+NetworktqStatus::tqStatus NetworktqStatus::status() const
{
- return mStatus;
+ return mtqStatus;
}
-void NetworkStatus::onlineStatusChanged()
+void NetworktqStatus::onlineStatusChanged()
{
DCOPRef dcopCall( "kded", "networkstatus" );
- DCOPReply reply = dcopCall.call( "onlineStatus()", true );
+ DCOPReply reply = dcopCall.call( "onlinetqStatus()", true );
if ( reply.isValid() ) {
int status = reply;
if ( status == 3 )
- seStatus( Online );
+ setqStatus( Online );
else {
- if ( mStatus != Offline )
- seStatus( Offline );
+ if ( mtqStatus != Offline )
+ setqStatus( Offline );
}
}
}
-NetworkStatus *NetworkStatus::self()
+NetworktqStatus *NetworktqStatus::self()
{
if ( !mSelf )
- networkStatusDeleter.setObject( mSelf, new NetworkStatus );
+ networkStatusDeleter.setObject( mSelf, new NetworktqStatus );
return mSelf;
}
diff --git a/libemailfunctions/networkstatus.h b/libemailfunctions/networkstatus.h
index 7b29431f8..e42e43482 100644
--- a/libemailfunctions/networkstatus.h
+++ b/libemailfunctions/networkstatus.h
@@ -32,7 +32,7 @@ namespace KPIM {
the machine KDE is running on going from "online" mode to
offline. What this means is left as an exercise for the reader.
*/
-class NetworkStatus : public TQObject, public DCOPObject
+class NetworktqStatus : public TQObject, public DCOPObject
{
Q_OBJECT
@@ -40,7 +40,7 @@ class NetworkStatus : public TQObject, public DCOPObject
/**
* The possible states.
*/
- enum Status {
+ enum tqStatus {
Online, //< The machine now has internet connectivity
Offline //< The machine has no internet connectivity
};
@@ -48,24 +48,24 @@ class NetworkStatus : public TQObject, public DCOPObject
/**
* Destructor.
*/
- ~NetworkStatus();
+ ~NetworktqStatus();
/**
* Returns the only instance of this class.
*/
- static NetworkStatus *self();
+ static NetworktqStatus *self();
/**
* Sets a new status.
*
* @param status The new status.
*/
- void seStatus( Status status );
+ void setqStatus( tqStatus status );
/**
* Returns the current status.
*/
- Status status() const;
+ tqStatus status() const;
k_dcop:
/**
@@ -79,18 +79,18 @@ class NetworkStatus : public TQObject, public DCOPObject
*
* @param status The new status.
*/
- void statusChanged( Status status );
+ void statusChanged( tqStatus status );
protected:
/**
* Constructor. This is protected, so you must use self()
* to get the singleton object of this class.
*/
- NetworkStatus();
+ NetworktqStatus();
private:
- Status mStatus;
- static NetworkStatus *mSelf;
+ tqStatus mtqStatus;
+ static NetworktqStatus *mSelf;
};
}
diff --git a/libemailfunctions/tests/testemail.cpp b/libemailfunctions/tests/testemail.cpp
index 319151c43..432334e1b 100644
--- a/libemailfunctions/tests/testemail.cpp
+++ b/libemailfunctions/tests/testemail.cpp
@@ -166,10 +166,10 @@ int main(int argc, char *argv[])
KApplication app( false, false );
// Empty input
- checkGetNameAndEmail( TQString::null, TQString::null, TQString::null, false );
+ checkGetNameAndEmail( TQString(), TQString(), TQString(), false );
// Email only
- checkGetNameAndEmail( "faure@kde.org", TQString::null, "faure@kde.org", false );
+ checkGetNameAndEmail( "faure@kde.org", TQString(), "faure@kde.org", false );
// Normal case
checkGetNameAndEmail( "David Faure <faure@kde.org>", "David Faure", "faure@kde.org", true );
@@ -183,10 +183,10 @@ int main(int argc, char *argv[])
checkGetNameAndEmail( "(David Faure) faure@kde.org", "David Faure", "faure@kde.org", true );
checkGetNameAndEmail( "My Name (me) <me@home.net>", "My Name (me)", "me@home.net", true ); // #93513
- // Nested parenthesis as per https://intevation.de/roundup/kolab/issue858
+ // Nested tqparenthesis as per https://intevation.de/roundup/kolab/issue858
checkGetNameAndEmail( "faure@kde.org (David (The Man) Faure)", "David (The Man) Faure", "faure@kde.org", true );
- // Double-quotes inside parenthesis
+ // Double-quotes inside tqparenthesis
checkGetNameAndEmail( "faure@kde.org (David \"Crazy\" Faure)", "David \"Crazy\" Faure", "faure@kde.org", true );
checkGetNameAndEmail( "(David \"Crazy\" Faure) faure@kde.org", "David \"Crazy\" Faure", "faure@kde.org", true );
@@ -203,8 +203,8 @@ int main(int argc, char *argv[])
//checkGetNameAndEmail( "\"a@b\" <faure@kde.org>", "a@b", "faure@kde.org", true );
// While typing, when there's no '@' yet
- checkGetNameAndEmail( "foo", "foo", TQString::null, false );
- checkGetNameAndEmail( "foo <", "foo", TQString::null, false );
+ checkGetNameAndEmail( "foo", "foo", TQString(), false );
+ checkGetNameAndEmail( "foo <", "foo", TQString(), false );
checkGetNameAndEmail( "foo <b", "foo", "b", true );
// If multiple emails are there, only return the first one
@@ -226,7 +226,7 @@ int main(int argc, char *argv[])
checkIsValidEmailAddress( "mattfruitsalad.org", "TooFewAts" );
// An empty string
- checkIsValidEmailAddress( TQString::null , "AddressEmpty" );
+ checkIsValidEmailAddress( TQString() , "AddressEmpty" );
// email address starting with a @
checkIsValidEmailAddress( "@mattfruitsalad.org", "MissingLocalPart" );
@@ -433,7 +433,7 @@ int main(int argc, char *argv[])
checkIsValidSimpleEmailAddress( "matt@123.123.123.123]", "false" );
checkIsValidSimpleEmailAddress( "\"matt@fruitsalad.org", "false" );
checkIsValidSimpleEmailAddress( "matt\"@fruitsalad.org", "false" );
- checkIsValidSimpleEmailAddress( TQString::null, "false" );
+ checkIsValidSimpleEmailAddress( TQString(), "false" );
// and here some insane but still valid cases
checkIsValidSimpleEmailAddress( "\"m@tt\"@fruitsalad.org", "true" );