summaryrefslogtreecommitdiffstats
path: root/kalarm/kamail.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-19 11:59:01 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-19 11:59:01 -0600
commit716a5de8870d7c02bb4d0aed72f30291b17b763a (patch)
tree29e58b213ead28151ccf7eb33d12c968ea844120 /kalarm/kamail.cpp
parent0e00c0a86a4c9d7e80c7b66d91940cc7dcb79f78 (diff)
downloadtdepim-716a5de8870d7c02bb4d0aed72f30291b17b763a.tar.gz
tdepim-716a5de8870d7c02bb4d0aed72f30291b17b763a.zip
Remove additional unneeded tq method conversions
Diffstat (limited to 'kalarm/kamail.cpp')
-rw-r--r--kalarm/kamail.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/kalarm/kamail.cpp b/kalarm/kamail.cpp
index b50dcef0b..383d03caf 100644
--- a/kalarm/kamail.cpp
+++ b/kalarm/kamail.cpp
@@ -115,14 +115,14 @@ bool KAMail::send(const KAEvent& event, TQStringList& errmsgs, bool allowNotify)
if (identity.isNull())
{
kdError(5950) << "KAMail::send(): identity" << event.emailFromId() << "not found" << endl;
- errmsgs = errors(i18n("Invalid 'From' email address.\nKMail identity '%1' not found.").tqarg(event.emailFromId()));
+ errmsgs = errors(i18n("Invalid 'From' email address.\nKMail identity '%1' not found.").arg(event.emailFromId()));
return false;
}
from = identity.fullEmailAddr();
if (from.isEmpty())
{
kdError(5950) << "KAMail::send(): identity" << identity.identityName() << "uoid" << identity.uoid() << ": no email address" << endl;
- errmsgs = errors(i18n("Invalid 'From' email address.\nEmail identity '%1' has no email address").tqarg(identity.identityName()));
+ errmsgs = errors(i18n("Invalid 'From' email address.\nEmail identity '%1' has no email address").arg(identity.identityName()));
return false;
}
}
@@ -167,7 +167,7 @@ bool KAMail::send(const KAEvent& event, TQStringList& errmsgs, bool allowNotify)
command = KStandardDirs::findExe(TQString::fromLatin1("mail"));
if (command.isNull())
{
- errmsgs = errors(i18n("%1 not found").tqarg(TQString::fromLatin1("sendmail"))); // give up
+ errmsgs = errors(i18n("%1 not found").arg(TQString::fromLatin1("sendmail"))); // give up
return false;
}
@@ -387,14 +387,14 @@ TQString KAMail::initHeaders(const KAMailData& data, bool dateId)
TQString from = data.from;
from.replace(TQRegExp("^.*<"), TQString()).replace(TQRegExp(">.*$"), TQString());
message = TQString::fromLatin1(buff);
- message += TQString::fromLatin1("\nMessage-Id: <%1.%2.%3>\n").tqarg(timenow).tqarg(tod.tv_usec).tqarg(from);
+ message += TQString::fromLatin1("\nMessage-Id: <%1.%2.%3>\n").arg(timenow).arg(tod.tv_usec).arg(from);
}
message += TQString::fromLatin1("From: ") + data.from;
message += TQString::fromLatin1("\nTo: ") + data.event.emailAddresses(", ");
if (!data.bcc.isEmpty())
message += TQString::fromLatin1("\nBcc: ") + data.bcc;
message += TQString::fromLatin1("\nSubject: ") + data.event.emailSubject();
- message += TQString::fromLatin1("\nX-Mailer: %1/" KALARM_VERSION).tqarg(kapp->aboutData()->programName());
+ message += TQString::fromLatin1("\nX-Mailer: %1/" KALARM_VERSION).arg(kapp->aboutData()->programName());
return message;
}
@@ -427,12 +427,12 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event)
TQCString boundary;
boundary.sprintf("------------_%lu_-%lx=", 2*timenow, timenow);
message += TQString::fromLatin1("\nMIME-Version: 1.0");
- message += TQString::fromLatin1("\nContent-Type: multipart/mixed;\n boundary=\"%1\"\n").tqarg(boundary.data());
+ message += TQString::fromLatin1("\nContent-Type: multipart/mixed;\n boundary=\"%1\"\n").arg(boundary.data());
if (!event.message().isEmpty())
{
// There is a message body
- message += TQString::fromLatin1("\n--%1\nContent-Type: text/plain\nContent-Transfer-Encoding: 8bit\n\n").tqarg(boundary.data());
+ message += TQString::fromLatin1("\n--%1\nContent-Type: text/plain\nContent-Transfer-Encoding: 8bit\n\n").arg(boundary.data());
message += event.message();
}
@@ -446,12 +446,12 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event)
KIO::UDSEntry uds;
if (!KIO::NetAccess::stat(url, uds, MainWindow::mainMainWindow())) {
kdError(5950) << "KAMail::appendBodyAttachments(): not found: " << attachment << endl;
- return i18n("Attachment not found:\n%1").tqarg(attachment);
+ return i18n("Attachment not found:\n%1").arg(attachment);
}
KFileItem fi(uds, url);
if (fi.isDir() || !fi.isReadable()) {
kdError(5950) << "KAMail::appendBodyAttachments(): not file/not readable: " << attachment << endl;
- return attachError.tqarg(attachment);
+ return attachError.arg(attachment);
}
// Check if the attachment is a text file
@@ -463,21 +463,21 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event)
text = (mimeType == textMimeTypes[i]);
}
- message += TQString::fromLatin1("\n--%1").tqarg(boundary.data());
- message += TQString::fromLatin1("\nContent-Type: %2; name=\"%3\"").tqarg(mimeType).tqarg(fi.text());
- message += TQString::fromLatin1("\nContent-Transfer-Encoding: %1").tqarg(TQString::fromLatin1(text ? "8bit" : "BASE64"));
- message += TQString::fromLatin1("\nContent-Disposition: attachment; filename=\"%4\"\n\n").tqarg(fi.text());
+ message += TQString::fromLatin1("\n--%1").arg(boundary.data());
+ message += TQString::fromLatin1("\nContent-Type: %2; name=\"%3\"").arg(mimeType).arg(fi.text());
+ message += TQString::fromLatin1("\nContent-Transfer-Encoding: %1").arg(TQString::fromLatin1(text ? "8bit" : "BASE64"));
+ message += TQString::fromLatin1("\nContent-Disposition: attachment; filename=\"%4\"\n\n").arg(fi.text());
// Read the file contents
TQString tmpFile;
if (!KIO::NetAccess::download(url, tmpFile, MainWindow::mainMainWindow())) {
kdError(5950) << "KAMail::appendBodyAttachments(): load failure: " << attachment << endl;
- return attachError.tqarg(attachment);
+ return attachError.arg(attachment);
}
TQFile file(tmpFile);
if (!file.open(IO_ReadOnly) ) {
kdDebug(5950) << "KAMail::appendBodyAttachments() tmp load error: " << attachment << endl;
- return attachError.tqarg(attachment);
+ return attachError.arg(attachment);
}
TQIODevice::Offset size = file.size();
char* contents = new char [size + 1];
@@ -509,9 +509,9 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event)
}
delete[] contents;
if (atterror)
- return attachError.tqarg(attachment);
+ return attachError.arg(attachment);
}
- message += TQString::fromLatin1("\n--%1--\n.\n").tqarg(boundary.data());
+ message += TQString::fromLatin1("\n--%1--\n.\n").arg(boundary.data());
}
return TQString();
}
@@ -922,10 +922,10 @@ char* KAMail::base64Encode(const char* in, TQIODevice::Offset size, TQIODevice::
TQStringList KAMail::errors(const TQString& err, bool sendfail)
{
TQString error1 = sendfail ? i18n("Failed to send email")
- : i18n("Error copying sent email to KMail %1 folder").tqarg(i18n_sent_mail());
+ : i18n("Error copying sent email to KMail %1 folder").arg(i18n_sent_mail());
if (err.isEmpty())
return TQStringList(error1);
- TQStringList errs(TQString::fromLatin1("%1:").tqarg(error1));
+ TQStringList errs(TQString::fromLatin1("%1:").arg(error1));
errs += err;
return errs;
}