diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
commit | 560378aaca1784ba19806a0414a32b20c744de39 (patch) | |
tree | ce0dfd7c3febf2a1adc7603d1019a8be2083c415 /kio/misc/ksendbugmail | |
parent | d4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff) | |
download | tdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip |
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kio/misc/ksendbugmail')
-rw-r--r-- | kio/misc/ksendbugmail/main.cpp | 8 | ||||
-rw-r--r-- | kio/misc/ksendbugmail/smtp.cpp | 28 | ||||
-rw-r--r-- | kio/misc/ksendbugmail/smtp.h | 16 |
3 files changed, 26 insertions, 26 deletions
diff --git a/kio/misc/ksendbugmail/main.cpp b/kio/misc/ksendbugmail/main.cpp index d84e4c297..4a4449ba2 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::fromLatin1(" <") + fromaddr + TQString::fromLatin1(">"); + fromaddr = name + TQString::tqfromLatin1(" <") + fromaddr + TQString::tqfromLatin1(">"); } else { struct passwd *p; p = getpwuid(getuid()); - fromaddr = TQString::fromLatin1(p->pw_name); + fromaddr = TQString::tqfromLatin1(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::fromLatin1("bugs.kde.org"); + server=TQString::tqfromLatin1("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::fromLatin1("From: %1\r\nTo: %2\r\n").arg(fromaddr).arg(recipient)); + sm->setMessageHeader(TQString::tqfromLatin1("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 36a417b88..4581d01d4 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.find('<'); + int index = senderAddress.tqfind('<'); if (index == -1) return; senderAddress = senderAddress.mid(index + 1); - index = senderAddress.find('>'); + index = senderAddress.tqfind('>'); if (index != -1) senderAddress = senderAddress.left(index); senderAddress = senderAddress.simplifyWhiteSpace(); while (1) { - index = senderAddress.find(' '); + index = senderAddress.tqfind(' '); if (index != -1) senderAddress = senderAddress.mid(index + 1); // take one side else break; } - index = senderAddress.find('@'); + index = senderAddress.tqfind('@'); 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::fromLatin1("helo %1\r\n").arg(domainName); + writeString = TQString::tqfromLatin1("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.find('\n'); + nl = lineBuffer.tqfind('\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->find(' '); + i = line->tqfind(' '); tmpstr = line->left(i); if(i > 3) kdDebug() << "warning: SMTP status code longer then 3 digits: " << tmpstr << endl; stat = tmpstr.toInt(); - serverState = (SMTPServerStatus)stat; + serverState = (SMTPServertqStatus)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::fromLatin1("helo %1\r\n").arg(domainName); + writeString = TQString::tqfromLatin1("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::fromLatin1("mail from: %1\r\n").arg(senderAddress); + writeString = TQString::tqfromLatin1("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::fromLatin1("rcpt to: %1\r\n").arg(recipientAddress); + writeString = TQString::tqfromLatin1("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::fromLatin1("data\r\n"); + writeString = TQString::tqfromLatin1("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::fromLatin1("Subject: %1\r\n").arg(messageSubject); + writeString = TQString::tqfromLatin1("Subject: %1\r\n").arg(messageSubject); writeString += messageHeader; writeString += "\r\n"; writeString += messageBody; - writeString += TQString::fromLatin1(".\r\n"); + writeString += TQString::tqfromLatin1(".\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 707d20ae4..b8e782cb9 100644 --- a/kio/misc/ksendbugmail/smtp.h +++ b/kio/misc/ksendbugmail/smtp.h @@ -7,7 +7,7 @@ #include <tqtimer.h> #include <ksock.h> -/*int SMTPServerStatus[] = { +/*int SMTPServertqStatus[] = { 220, // greeting from server 221, // server acknolages goodbye 250, // command successful @@ -17,7 +17,7 @@ 0 // null }; -int SMTPClientStatus[] = { +int SMTPClienttqStatus[] = { 50, // not logged in yet. 100, // logged in, got 220 150, // sent helo, got 250 @@ -37,7 +37,7 @@ int SMTPClientStatus[] = { #define SMTP_READ_BUFFER_SIZE 256 -class SMTP:public QObject +class SMTP:public TQObject { Q_OBJECT public: @@ -66,7 +66,7 @@ public: READYDATA = 354, // server ready to receive data ERROR = 501, // error UNKNOWN = 550 // user unknown - }SMTPServerStatus; + }SMTPServertqStatus; 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 - }SMTPClientStatus; + }SMTPClienttqStatus; typedef enum { NOERROR = 0, @@ -125,9 +125,9 @@ private: TQString messageSubject; TQString messageBody, messageHeader; - SMTPClientStatus state; - SMTPClientStatus lastState; - SMTPServerStatus serverState; + SMTPClienttqStatus state; + SMTPClienttqStatus lastState; + SMTPServertqStatus serverState; TQString domainName; |