summaryrefslogtreecommitdiffstats
path: root/kalarm/kamail.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 /kalarm/kamail.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 'kalarm/kamail.cpp')
-rw-r--r--kalarm/kamail.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kalarm/kamail.cpp b/kalarm/kamail.cpp
index ab4747e34..98647d93b 100644
--- a/kalarm/kamail.cpp
+++ b/kalarm/kamail.cpp
@@ -100,7 +100,7 @@ KPIM::IdentityManager* KAMail::identityManager()
/******************************************************************************
* Send the email message specified in an event.
* Reply = true if the message was sent - 'errmsgs' may contain copy error messages.
-* = false if the message was not sent - 'errmsgs' tqcontains the error messages.
+* = false if the message was not sent - 'errmsgs' contains the error messages.
*/
bool KAMail::send(const KAEvent& event, TQStringList& errmsgs, bool allowNotify)
{
@@ -144,7 +144,7 @@ bool KAMail::send(const KAEvent& event, TQStringList& errmsgs, bool allowNotify)
return false;
}
KAMailData data(event, from,
- (event.emailBcc() ? Preferences::emailBccAddress() : TQString::null),
+ (event.emailBcc() ? Preferences::emailBccAddress() : TQString()),
allowNotify);
kdDebug(5950) << "KAlarmApp::sendEmail(): To: " << event.emailAddresses(", ")
<< "\nSubject: " << event.emailSubject() << endl;
@@ -281,7 +281,7 @@ TQString KAMail::sendKMail(const KAMailData& data)
}
if (data.allowNotify)
notifyQueued(data.event);
- return TQString::null;
+ return TQString();
}
/******************************************************************************
@@ -323,7 +323,7 @@ TQString KAMail::addToKMailFolder(const KAMailData& data, const char* folder, bo
TQDataStream arg(callData, IO_WriteOnly);
arg << TQString::tqfromLatin1(folder) << tmpFile.name();
if (callKMail(callData, "KMailIface", "dcopAddMessage(TQString,TQString)", "int"))
- return TQString::null;
+ return TQString();
err = i18n("Error calling KMail");
}
kdError(5950) << "KAMail::addToKMailFolder(" << folder << "): " << err << endl;
@@ -385,7 +385,7 @@ TQString KAMail::initHeaders(const KAMailData& data, bool dateId)
char buff[64];
strftime(buff, sizeof(buff), "Date: %a, %d %b %Y %H:%M:%S %z", localtime(&timenow));
TQString from = data.from;
- from.tqreplace(TQRegExp("^.*<"), TQString::null).tqreplace(TQRegExp(">.*$"), TQString::null);
+ from.tqreplace(TQRegExp("^.*<"), TQString()).tqreplace(TQRegExp(">.*$"), TQString());
message = TQString::tqfromLatin1(buff);
message += TQString::tqfromLatin1("\nMessage-Id: <%1.%2.%3>\n").arg(timenow).arg(tod.tv_usec).arg(from);
}
@@ -513,7 +513,7 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event)
}
message += TQString::tqfromLatin1("\n--%1--\n.\n").arg(boundary);
}
- return TQString::null;
+ return TQString();
}
/******************************************************************************
@@ -539,7 +539,7 @@ void KAMail::notifyQueued(const KAEvent& event)
TQString text = (Preferences::emailClient() == Preferences::KMAIL)
? i18n("An email has been queued to be sent by KMail")
: i18n("An email has been queued to be sent");
- KMessageBox::information(0, text, TQString::null, Preferences::EMAIL_QUEUED_NOTIFY);
+ KMessageBox::information(0, text, TQString(), Preferences::EMAIL_TQUEUED_NOTIFY);
return;
}
}
@@ -611,7 +611,7 @@ TQString KAMail::convertAddresses(const TQString& items, EmailAddressList& list)
if (!bad.isEmpty())
return bad;
}
- return TQString::null;
+ return TQString();
}
#if 0
@@ -654,7 +654,7 @@ TQString KAMail::convertAddress(KMime::Types::Address addr, EmailAddressList& li
}
list += KCal::Person((*mb).displayName, addrPart);
}
- return TQString::null;
+ return TQString();
}
/*
@@ -678,7 +678,7 @@ TQString KAMail::convertAddresses(const TQString& items, TQStringList& list)
return item;
}
}
- return TQString::null;
+ return TQString();
}*/
/******************************************************************************
@@ -691,7 +691,7 @@ int KAMail::checkAddress(TQString& address)
{
address = address.stripWhiteSpace();
// Check that there are no list separator characters present
- if (address.find(',') >= 0 || address.find(';') >= 0)
+ if (address.tqfind(',') >= 0 || address.tqfind(';') >= 0)
return -1;
int n = address.length();
if (!n)
@@ -701,16 +701,16 @@ int KAMail::checkAddress(TQString& address)
if (address[end] == '>')
{
// The email address is in <...>
- if ((start = address.find('<')) < 0)
+ if ((start = address.tqfind('<')) < 0)
return -1;
++start;
--end;
}
- int i = address.find('@', start);
+ int i = address.tqfind('@', start);
if (i >= 0)
{
if (i == start || i == end) // check @ isn't the first or last character
-// || address.find('@', i + 1) >= 0) // check for multiple @ characters
+// || address.tqfind('@', i + 1) >= 0) // check for multiple @ characters
return -1;
}
/* else
@@ -744,10 +744,10 @@ TQString KAMail::convertAttachments(const TQString& items, TQStringList& list)
for (int next = 0; next < length; )
{
// Find the first delimiter character (, or ;)
- int i = items.find(',', next);
+ int i = items.tqfind(',', next);
if (i < 0)
i = items.length();
- int sc = items.find(';', next);
+ int sc = items.tqfind(';', next);
if (sc < 0)
sc = items.length();
if (sc < i)
@@ -762,7 +762,7 @@ TQString KAMail::convertAttachments(const TQString& items, TQStringList& list)
}
next = i + 1;
}
- return TQString::null;
+ return TQString();
}
#if 0
@@ -780,10 +780,10 @@ TQString KAMail::convertAttachments(const TQString& items, KURL::List& list)
for (int next = 0; next < length; )
{
// Find the first delimiter character (, or ;)
- int i = items.find(',', next);
+ int i = items.tqfind(',', next);
if (i < 0)
i = items.length();
- int sc = items.find(';', next);
+ int sc = items.tqfind(';', next);
if (sc < 0)
sc = items.length();
if (sc < i)
@@ -798,7 +798,7 @@ TQString KAMail::convertAttachments(const TQString& items, KURL::List& list)
}
next = i + 1;
}
- return TQString::null;
+ return TQString();
}
#endif
@@ -944,7 +944,7 @@ TQString KAMail::getMailBody(TQ_UINT32 serialNumber)
arg << (int)0;
TQString body;
if (kapp->dcopClient()->call("kmail", "KMailIface", "getDecodedBodyPart(TQ_UINT32,int)", data, replyType, replyData)
- && replyType == "TQString")
+ && replyType == TQSTRING_OBJECT_NAME_STRING)
{
TQDataStream reply_stream(replyData, IO_ReadOnly);
reply_stream >> body;
@@ -963,7 +963,7 @@ TQString getHostName()
{
char hname[256];
if (gethostname(hname, sizeof(hname)))
- return TQString::null;
+ return TQString();
return TQString::fromLocal8Bit(hname);
}
}
@@ -1005,7 +1005,7 @@ bool parseUserName( const char* & scursor, const char * const send,
default: // atom
scursor--; // re-set scursor to point to ch again
- tmp = TQString::null;
+ tmp = TQString();
if ( parseAtom( scursor, send, result, false /* no 8bit */ ) ) {
if (getpwnam(result.local8Bit()))
return true;
@@ -1033,7 +1033,7 @@ bool parseAddress( const char* & scursor, const char * const send,
const char * oldscursor = scursor;
if ( parseMailbox( scursor, send, maybeMailbox, isCRLF ) ) {
// yes, it is:
- result.displayName = TQString::null;
+ result.displayName = TQString();
result.mailboxList.append( maybeMailbox );
return true;
}
@@ -1044,10 +1044,10 @@ bool parseAddress( const char* & scursor, const char * const send,
TQString maybeUserName;
if ( parseUserName( scursor, send, maybeUserName, isCRLF ) ) {
// yes, it is:
- maybeMailbox.displayName = TQString::null;
+ maybeMailbox.displayName = TQString();
maybeMailbox.addrSpec.localPart = maybeUserName;
- maybeMailbox.addrSpec.domain = TQString::null;
- result.displayName = TQString::null;
+ maybeMailbox.addrSpec.domain = TQString();
+ result.displayName = TQString();
result.mailboxList.append( maybeMailbox );
return true;
}