diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:50:21 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:50:21 -0600 |
commit | 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (patch) | |
tree | 89de88213bd261e4ccaade899ab2d6ec34b3a5a7 /kalarm/kamail.cpp | |
parent | 1dad5f662a09dfc5cc041caffe0f674044a4dcec (diff) | |
download | tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.tar.gz tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kalarm/kamail.cpp')
-rw-r--r-- | kalarm/kamail.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/kalarm/kamail.cpp b/kalarm/kamail.cpp index 2b476d811..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; } } @@ -153,30 +153,30 @@ bool KAMail::send(const KAEvent& event, TQStringList& errmsgs, bool allowNotify) { // Use sendmail to send the message TQString textComplete; - TQString command = KStandardDirs::findExe(TQString::tqfromLatin1("sendmail"), - TQString::tqfromLatin1("/sbin:/usr/sbin:/usr/lib")); + TQString command = KStandardDirs::findExe(TQString::fromLatin1("sendmail"), + TQString::fromLatin1("/sbin:/usr/sbin:/usr/lib")); if (!command.isNull()) { - command += TQString::tqfromLatin1(" -f "); + command += TQString::fromLatin1(" -f "); command += KPIM::getEmailAddress(from); - command += TQString::tqfromLatin1(" -oi -t "); + command += TQString::fromLatin1(" -oi -t "); textComplete = initHeaders(data, false); } else { - command = KStandardDirs::findExe(TQString::tqfromLatin1("mail")); + command = KStandardDirs::findExe(TQString::fromLatin1("mail")); if (command.isNull()) { - errmsgs = errors(i18n("%1 not found").tqarg(TQString::tqfromLatin1("sendmail"))); // give up + errmsgs = errors(i18n("%1 not found").arg(TQString::fromLatin1("sendmail"))); // give up return false; } - command += TQString::tqfromLatin1(" -s "); + command += TQString::fromLatin1(" -s "); command += KShellProcess::quote(event.emailSubject()); if (!data.bcc.isEmpty()) { - command += TQString::tqfromLatin1(" -b "); + command += TQString::fromLatin1(" -b "); command += KShellProcess::quote(data.bcc); } @@ -321,7 +321,7 @@ TQString KAMail::addToKMailFolder(const KAMailData& data, const char* folder, bo // Notify KMail of the message in the temporary file TQByteArray callData; TQDataStream arg(callData, IO_WriteOnly); - arg << TQString::tqfromLatin1(folder) << tmpFile.name(); + arg << TQString::fromLatin1(folder) << tmpFile.name(); if (callKMail(callData, "KMailIface", "dcopAddMessage(TQString,TQString)", "int")) return TQString(); err = i18n("Error calling KMail"); @@ -386,15 +386,15 @@ TQString KAMail::initHeaders(const KAMailData& data, bool dateId) strftime(buff, sizeof(buff), "Date: %a, %d %b %Y %H:%M:%S %z", localtime(&timenow)); TQString from = data.from; from.replace(TQRegExp("^.*<"), TQString()).replace(TQRegExp(">.*$"), TQString()); - message = TQString::tqfromLatin1(buff); - message += TQString::tqfromLatin1("\nMessage-Id: <%1.%2.%3>\n").tqarg(timenow).tqarg(tod.tv_usec).tqarg(from); + message = TQString::fromLatin1(buff); + message += TQString::fromLatin1("\nMessage-Id: <%1.%2.%3>\n").arg(timenow).arg(tod.tv_usec).arg(from); } - message += TQString::tqfromLatin1("From: ") + data.from; - message += TQString::tqfromLatin1("\nTo: ") + data.event.emailAddresses(", "); + message += TQString::fromLatin1("From: ") + data.from; + message += TQString::fromLatin1("\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).tqarg(kapp->aboutData()->programName()); + message += TQString::fromLatin1("\nBcc: ") + data.bcc; + message += TQString::fromLatin1("\nSubject: ") + data.event.emailSubject(); + message += TQString::fromLatin1("\nX-Mailer: %1/" KALARM_VERSION).arg(kapp->aboutData()->programName()); return message; } @@ -426,13 +426,13 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event) time(&timenow); 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").tqarg(boundary.data()); + message += TQString::fromLatin1("\nMIME-Version: 1.0"); + 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::tqfromLatin1("\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::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()); + 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]; @@ -504,14 +504,14 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event) atterror = true; } else - message += TQString::tqfromLatin1(base64, base64Size); + message += TQString::fromLatin1(base64, base64Size); delete[] base64; } delete[] contents; if (atterror) - return attachError.tqarg(attachment); + return attachError.arg(attachment); } - message += TQString::tqfromLatin1("\n--%1--\n.\n").tqarg(boundary.data()); + message += TQString::fromLatin1("\n--%1--\n.\n").arg(boundary.data()); } return TQString(); } @@ -523,7 +523,7 @@ TQString KAMail::appendBodyAttachments(TQString& message, const KAEvent& event) void KAMail::notifyQueued(const KAEvent& event) { KMime::Types::Address addr; - TQString localhost = TQString::tqfromLatin1("localhost"); + TQString localhost = TQString::fromLatin1("localhost"); TQString hostname = getHostName(); const EmailAddressList& addresses = event.emailAddresses(); for (TQValueList<KCal::Person>::ConstIterator it = addresses.begin(); it != addresses.end(); ++it) @@ -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::tqfromLatin1("%1:").tqarg(error1)); + TQStringList errs(TQString::fromLatin1("%1:").arg(error1)); errs += err; return errs; } |