diff options
Diffstat (limited to 'kalarm/kamail.cpp')
-rw-r--r-- | kalarm/kamail.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/kalarm/kamail.cpp b/kalarm/kamail.cpp index 39403fbff..4020b9886 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; } |