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 98647d93b..558406626 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.").arg(event.emailFromId())); + errmsgs = errors(i18n("Invalid 'From' email address.\nKMail identity '%1' not found.").tqarg(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").arg(identity.identityName())); + errmsgs = errors(i18n("Invalid 'From' email address.\nEmail identity '%1' has no email address").tqarg(identity.identityName())); return false; } } @@ -167,7 +167,7 @@ bool KAMail::send(const KAEvent& event, TQStringList& errmsgs, bool allowNotify) command = KStandardDirs::findExe(TQString::tqfromLatin1("mail")); if (command.isNull()) { - errmsgs = errors(i18n("%1 not found").arg(TQString::tqfromLatin1("sendmail"))); // give up + errmsgs = errors(i18n("%1 not found").tqarg(TQString::tqfromLatin1("sendmail"))); // give up return false; } @@ -387,14 +387,14 @@ TQString KAMail::initHeaders(const KAMailData& data, bool dateId) TQString from = data.from; 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); + message += TQString::tqfromLatin1("\nMessage-Id: <%1.%2.%3>\n").tqarg(timenow).tqarg(tod.tv_usec).tqarg(from); } message += TQString::tqfromLatin1("From: ") + data.from; message += TQString::tqfromLatin1("\nTo: ") + data.event.emailAddresses(", "); if (!data.bcc.isEmpty()) message += TQString::tqfromLatin1("\nBcc: ") + data.bcc; message += TQString::tqfromLatin1("\nSubject: ") + data.event.emailSubject(); - message += TQString::tqfromLatin1("\nX-Mailer: %1/" KALARM_VERSION).arg(kapp->aboutData()->programName()); + message += TQString::tqfromLatin1("\nX-Mailer: %1/" KALARM_VERSION).tqarg(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::tqfromLatin1("\nMIME-Version: 1.0"); - message += TQString::tqfromLatin1("\nContent-Type: multipart/mixed;\n boundary=\"%1\"\n").arg(boundary); + message += TQString::tqfromLatin1("\nContent-Type: multipart/mixed;\n boundary=\"%1\"\n").tqarg(boundary.data()); if (!event.message().isEmpty()) { // There is a message body - message += TQString::tqfromLatin1("\n--%1\nContent-Type: text/plain\nContent-Transfer-Encoding: 8bit\n\n").arg(boundary); + message += TQString::tqfromLatin1("\n--%1\nContent-Type: text/plain\nContent-Transfer-Encoding: 8bit\n\n").tqarg(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").arg(attachment); + return i18n("Attachment not found:\n%1").tqarg(attachment); } KFileItem fi(uds, url); if (fi.isDir() || !fi.isReadable()) { kdError(5950) << "KAMail::appendBodyAttachments(): not file/not readable: " << attachment << endl; - return attachError.arg(attachment); + return attachError.tqarg(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::tqfromLatin1("\n--%1").arg(boundary); - message += TQString::tqfromLatin1("\nContent-Type: %2; name=\"%3\"").arg(mimeType).arg(fi.text()); - message += TQString::tqfromLatin1("\nContent-Transfer-Encoding: %1").arg(TQString::tqfromLatin1(text ? "8bit" : "BASE64")); - message += TQString::tqfromLatin1("\nContent-Disposition: attachment; filename=\"%4\"\n\n").arg(fi.text()); + message += TQString::tqfromLatin1("\n--%1").tqarg(boundary.data()); + message += TQString::tqfromLatin1("\nContent-Type: %2; name=\"%3\"").tqarg(mimeType).tqarg(fi.text()); + message += TQString::tqfromLatin1("\nContent-Transfer-Encoding: %1").tqarg(TQString::tqfromLatin1(text ? "8bit" : "BASE64")); + message += TQString::tqfromLatin1("\nContent-Disposition: attachment; filename=\"%4\"\n\n").tqarg(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.arg(attachment); + return attachError.tqarg(attachment); } TQFile file(tmpFile); if (!file.open(IO_ReadOnly) ) { kdDebug(5950) << "KAMail::appendBodyAttachments() tmp load error: " << attachment << endl; - return attachError.arg(attachment); + return attachError.tqarg(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.arg(attachment); + return attachError.tqarg(attachment); } - message += TQString::tqfromLatin1("\n--%1--\n.\n").arg(boundary); + message += TQString::tqfromLatin1("\n--%1--\n.\n").tqarg(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").arg(i18n_sent_mail()); + : i18n("Error copying sent email to KMail %1 folder").tqarg(i18n_sent_mail()); if (err.isEmpty()) return TQStringList(error1); - TQStringList errs(TQString::tqfromLatin1("%1:").arg(error1)); + TQStringList errs(TQString::tqfromLatin1("%1:").tqarg(error1)); errs += err; return errs; } |