summaryrefslogtreecommitdiffstats
path: root/kio/misc/ksendbugmail
diff options
context:
space:
mode:
Diffstat (limited to 'kio/misc/ksendbugmail')
-rw-r--r--kio/misc/ksendbugmail/main.cpp8
-rw-r--r--kio/misc/ksendbugmail/smtp.cpp28
-rw-r--r--kio/misc/ksendbugmail/smtp.h16
3 files changed, 26 insertions, 26 deletions
diff --git a/kio/misc/ksendbugmail/main.cpp b/kio/misc/ksendbugmail/main.cpp
index 4a4449ba2..d84e4c297 100644
--- a/kio/misc/ksendbugmail/main.cpp
+++ b/kio/misc/ksendbugmail/main.cpp
@@ -101,11 +101,11 @@ int main(int argc, char **argv) {
if (!fromaddr.isEmpty()) {
TQString name = emailConfig.getSetting(KEMailSettings::RealName);
if (!name.isEmpty())
- fromaddr = name + TQString::tqfromLatin1(" <") + fromaddr + TQString::tqfromLatin1(">");
+ fromaddr = name + TQString::fromLatin1(" <") + fromaddr + TQString::fromLatin1(">");
} else {
struct passwd *p;
p = getpwuid(getuid());
- fromaddr = TQString::tqfromLatin1(p->pw_name);
+ fromaddr = TQString::fromLatin1(p->pw_name);
fromaddr += "@";
char buffer[256];
buffer[0] = '\0';
@@ -117,7 +117,7 @@ int main(int argc, char **argv) {
TQString server = emailConfig.getSetting(KEMailSettings::OutServer);
if (server.isEmpty())
- server=TQString::tqfromLatin1("bugs.kde.org");
+ server=TQString::fromLatin1("bugs.kde.org");
SMTP *sm = new SMTP;
BugMailer bm(sm);
@@ -129,7 +129,7 @@ int main(int argc, char **argv) {
sm->setSenderAddress(fromaddr);
sm->setRecipientAddress(recipient);
sm->setMessageSubject(subject);
- sm->setMessageHeader(TQString::tqfromLatin1("From: %1\r\nTo: %2\r\n").arg(fromaddr).arg(recipient));
+ sm->setMessageHeader(TQString::fromLatin1("From: %1\r\nTo: %2\r\n").arg(fromaddr).arg(recipient));
sm->setMessageBody(text);
sm->sendMessage();
diff --git a/kio/misc/ksendbugmail/smtp.cpp b/kio/misc/ksendbugmail/smtp.cpp
index 4581d01d4..36a417b88 100644
--- a/kio/misc/ksendbugmail/smtp.cpp
+++ b/kio/misc/ksendbugmail/smtp.cpp
@@ -74,22 +74,22 @@ void SMTP::setTimeOut(int timeout)
void SMTP::setSenderAddress(const TQString& sender)
{
senderAddress = sender;
- int index = senderAddress.tqfind('<');
+ int index = senderAddress.find('<');
if (index == -1)
return;
senderAddress = senderAddress.mid(index + 1);
- index = senderAddress.tqfind('>');
+ index = senderAddress.find('>');
if (index != -1)
senderAddress = senderAddress.left(index);
senderAddress = senderAddress.simplifyWhiteSpace();
while (1) {
- index = senderAddress.tqfind(' ');
+ index = senderAddress.find(' ');
if (index != -1)
senderAddress = senderAddress.mid(index + 1); // take one side
else
break;
}
- index = senderAddress.tqfind('@');
+ index = senderAddress.find('@');
if (index == -1)
senderAddress.append("@localhost"); // won't go through without a local mail system
@@ -134,7 +134,7 @@ void SMTP::sendMessage(void)
kdDebug() << "state was == FINISHED\n" << endl;
finished = false;
state = IN;
- writeString = TQString::tqfromLatin1("helo %1\r\n").arg(domainName);
+ writeString = TQString::fromLatin1("helo %1\r\n").arg(domainName);
write(sock->socket(), writeString.ascii(), writeString.length());
}
if(connected){
@@ -218,7 +218,7 @@ void SMTP::socketRead(KSocket *socket)
readBuffer[n] = '\0';
lineBuffer += readBuffer;
- nl = lineBuffer.tqfind('\n');
+ nl = lineBuffer.find('\n');
if(nl == -1)
return;
lastLine = lineBuffer.left(nl);
@@ -249,12 +249,12 @@ void SMTP::processLine(TQString *line)
int i, stat;
TQString tmpstr;
- i = line->tqfind(' ');
+ i = line->find(' ');
tmpstr = line->left(i);
if(i > 3)
kdDebug() << "warning: SMTP status code longer then 3 digits: " << tmpstr << endl;
stat = tmpstr.toInt();
- serverState = (SMTPServertqStatus)stat;
+ serverState = (SMTPServerStatus)stat;
lastState = state;
kdDebug() << "smtp state: [" << stat << "][" << *line << "]" << endl;
@@ -262,7 +262,7 @@ void SMTP::processLine(TQString *line)
switch(stat){
case GREET: //220
state = IN;
- writeString = TQString::tqfromLatin1("helo %1\r\n").arg(domainName);
+ writeString = TQString::fromLatin1("helo %1\r\n").arg(domainName);
kdDebug() << "out: " << writeString << endl;
write(sock->socket(), writeString.ascii(), writeString.length());
break;
@@ -273,19 +273,19 @@ void SMTP::processLine(TQString *line)
switch(state){
case IN:
state = READY;
- writeString = TQString::tqfromLatin1("mail from: %1\r\n").arg(senderAddress);
+ writeString = TQString::fromLatin1("mail from: %1\r\n").arg(senderAddress);
kdDebug() << "out: " << writeString << endl;
write(sock->socket(), writeString.ascii(), writeString.length());
break;
case READY:
state = SENTFROM;
- writeString = TQString::tqfromLatin1("rcpt to: %1\r\n").arg(recipientAddress);
+ writeString = TQString::fromLatin1("rcpt to: %1\r\n").arg(recipientAddress);
kdDebug() << "out: " << writeString << endl;
write(sock->socket(), writeString.ascii(), writeString.length());
break;
case SENTFROM:
state = SENTTO;
- writeString = TQString::tqfromLatin1("data\r\n");
+ writeString = TQString::fromLatin1("data\r\n");
kdDebug() << "out: " << writeString << endl;
write(sock->socket(), writeString.ascii(), writeString.length());
break;
@@ -305,11 +305,11 @@ void SMTP::processLine(TQString *line)
break;
case READYDATA: //354
state = DATA;
- writeString = TQString::tqfromLatin1("Subject: %1\r\n").arg(messageSubject);
+ writeString = TQString::fromLatin1("Subject: %1\r\n").arg(messageSubject);
writeString += messageHeader;
writeString += "\r\n";
writeString += messageBody;
- writeString += TQString::tqfromLatin1(".\r\n");
+ writeString += TQString::fromLatin1(".\r\n");
kdDebug() << "out: " << writeString;
write(sock->socket(), writeString.ascii(), writeString.length());
break;
diff --git a/kio/misc/ksendbugmail/smtp.h b/kio/misc/ksendbugmail/smtp.h
index b8e782cb9..707d20ae4 100644
--- a/kio/misc/ksendbugmail/smtp.h
+++ b/kio/misc/ksendbugmail/smtp.h
@@ -7,7 +7,7 @@
#include <tqtimer.h>
#include <ksock.h>
-/*int SMTPServertqStatus[] = {
+/*int SMTPServerStatus[] = {
220, // greeting from server
221, // server acknolages goodbye
250, // command successful
@@ -17,7 +17,7 @@
0 // null
};
-int SMTPClienttqStatus[] = {
+int SMTPClientStatus[] = {
50, // not logged in yet.
100, // logged in, got 220
150, // sent helo, got 250
@@ -37,7 +37,7 @@ int SMTPClienttqStatus[] = {
#define SMTP_READ_BUFFER_SIZE 256
-class SMTP:public TQObject
+class SMTP:public QObject
{
Q_OBJECT
public:
@@ -66,7 +66,7 @@ public:
READYDATA = 354, // server ready to receive data
ERROR = 501, // error
UNKNOWN = 550 // user unknown
- }SMTPServertqStatus;
+ }SMTPServerStatus;
typedef enum {
INIT = 50, // not logged in yet
@@ -79,7 +79,7 @@ public:
QUIT = 400, // sent QUIT, got 221
OUT = 450, // finished, logged out
CERROR = 500 // didn't finish, had error or connection drop
- }SMTPClienttqStatus;
+ }SMTPClientStatus;
typedef enum {
NOERROR = 0,
@@ -125,9 +125,9 @@ private:
TQString messageSubject;
TQString messageBody, messageHeader;
- SMTPClienttqStatus state;
- SMTPClienttqStatus lastState;
- SMTPServertqStatus serverState;
+ SMTPClientStatus state;
+ SMTPClientStatus lastState;
+ SMTPServerStatus serverState;
TQString domainName;