summaryrefslogtreecommitdiffstats
path: root/kbugbuster/backend/mailsender.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kbugbuster/backend/mailsender.cpp')
-rw-r--r--kbugbuster/backend/mailsender.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kbugbuster/backend/mailsender.cpp b/kbugbuster/backend/mailsender.cpp
index 59f73db2..58ed6c93 100644
--- a/kbugbuster/backend/mailsender.cpp
+++ b/kbugbuster/backend/mailsender.cpp
@@ -1,5 +1,5 @@
-#ifndef QT_NO_ASCII_CAST
-#define QT_NO_ASCII_CAST
+#ifndef TQT_NO_ASCII_CAST
+#define TQT_NO_ASCII_CAST
#endif
#include <unistd.h>
@@ -39,7 +39,7 @@ bool MailSender::send(const TQString &fromName,const TQString &fromEmail,const T
{
TQString from( fromName );
if ( !fromEmail.isEmpty() )
- from += TQString::fromLatin1( " <%2>" ).arg( fromEmail );
+ from += TQString::tqfromLatin1( " <%2>" ).tqarg( fromEmail );
kdDebug() << "MailSender::sendMail():\nFrom: " << from << "\nTo: " << to
<< "\nbccflag:" << bcc
<< "\nRecipient:" << recipient
@@ -53,18 +53,18 @@ bool MailSender::send(const TQString &fromName,const TQString &fromEmail,const T
bool needHeaders = true;
- TQString command = KStandardDirs::findExe(TQString::fromLatin1("sendmail"),
- TQString::fromLatin1("/sbin:/usr/sbin:/usr/lib"));
- if (!command.isNull()) command += TQString::fromLatin1(" -oi -t");
+ TQString command = KStandardDirs::findExe(TQString::tqfromLatin1("sendmail"),
+ TQString::tqfromLatin1("/sbin:/usr/sbin:/usr/lib"));
+ if (!command.isNull()) command += TQString::tqfromLatin1(" -oi -t");
else {
- command = KStandardDirs::findExe(TQString::fromLatin1("mail"));
+ command = KStandardDirs::findExe(TQString::tqfromLatin1("mail"));
if (command.isNull()) return false; // give up
- command.append(TQString::fromLatin1(" -s "));
+ command.append(TQString::tqfromLatin1(" -s "));
command.append(KProcess::quote(subject));
if (bcc) {
- command.append(TQString::fromLatin1(" -b "));
+ command.append(TQString::tqfromLatin1(" -b "));
command.append(KProcess::quote(from));
}
@@ -85,11 +85,11 @@ bool MailSender::send(const TQString &fromName,const TQString &fromEmail,const T
TQString textComplete;
if (needHeaders)
{
- textComplete += TQString::fromLatin1("From: ") + from + '\n';
- textComplete += TQString::fromLatin1("To: ") + to + '\n';
- if (bcc) textComplete += TQString::fromLatin1("Bcc: ") + from + '\n';
- textComplete += TQString::fromLatin1("Subject: ") + subject + '\n';
- textComplete += TQString::fromLatin1("X-Mailer: KBugBuster") + '\n';
+ textComplete += TQString::tqfromLatin1("From: ") + from + '\n';
+ textComplete += TQString::tqfromLatin1("To: ") + to + '\n';
+ if (bcc) textComplete += TQString::tqfromLatin1("Bcc: ") + from + '\n';
+ textComplete += TQString::tqfromLatin1("Subject: ") + subject + '\n';
+ textComplete += TQString::tqfromLatin1("X-Mailer: KBugBuster") + '\n';
}
textComplete += '\n'; // end of headers
textComplete += body;
@@ -121,11 +121,11 @@ bool MailSender::send(const TQString &fromName,const TQString &fromEmail,const T
else
recipients << to;
- TQString message = TQString::fromLatin1( "From: " ) + from +
- TQString::fromLatin1( "\nTo: " ) + to +
- TQString::fromLatin1( "\nSubject: " ) + subject +
- TQString::fromLatin1( "\nX-Mailer: KBugBuster" ) +
- TQString::fromLatin1( "\n\n" ) + body;
+ TQString message = TQString::tqfromLatin1( "From: " ) + from +
+ TQString::tqfromLatin1( "\nTo: " ) + to +
+ TQString::tqfromLatin1( "\nSubject: " ) + subject +
+ TQString::tqfromLatin1( "\nX-Mailer: KBugBuster" ) +
+ TQString::tqfromLatin1( "\n\n" ) + body;
Smtp *smtp = new Smtp( fromEmail, recipients, message, m_smtpServer );
connect( smtp, TQT_SIGNAL( status( const TQString & ) ),
@@ -151,29 +151,29 @@ bool MailSender::send(const TQString &fromName,const TQString &fromEmail,const T
void MailSender::smtpSuccess()
{
- if ( parent() != sender() || !parent()->inherits( "Smtp" ) )
+ if ( tqparent() != sender() || !tqparent()->inherits( "Smtp" ) )
return;
- static_cast<Smtp *>( parent() )->quit();
+ static_cast<Smtp *>( tqparent() )->quit();
emit finished();
}
void MailSender::smtpError(const TQString &_command, const TQString &_response)
{
- if ( parent() != sender() || !parent()->inherits( "Smtp" ) )
+ if ( tqparent() != sender() || !tqparent()->inherits( "Smtp" ) )
return;
TQString command = _command;
TQString response = _response;
- Smtp *smtp = static_cast<Smtp *>( parent() );
+ Smtp *smtp = static_cast<Smtp *>( tqparent() );
smtp->removeChild( this );
delete smtp;
- KMessageBox::error( qApp->activeWindow(),
+ KMessageBox::error( TQT_TQWIDGET(tqApp->activeWindow()),
i18n( "Error during SMTP transfer.\n"
"command: %1\n"
- "response: %2" ).arg( command ).arg( response ) );
+ "response: %2" ).tqarg( command ).tqarg( response ) );
emit finished();
TQTimer::singleShot( 0, this, TQT_SLOT( deleteLater() ) );