diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-13 08:32:36 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-13 08:32:36 +0000 |
commit | f7e71d47719ab6094cf4a9fafffa5ea351973522 (patch) | |
tree | 30834aa632d442019e14f88685001d94657d060b /kio/misc/ksendbugmail | |
parent | b31cfd9a1ee986fe2ae9a693f3afd7f171dd897c (diff) | |
download | tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.tar.gz tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.zip |
Initial conversion for TQt for Qt4 3.4.0 TP2
This will also compile with TQt for Qt3, and should not cause any problems
with dependent modules such as kdebase. If it does then it needs to be fixed!
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 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 | 26 |
2 files changed, 17 insertions, 17 deletions
diff --git a/kio/misc/ksendbugmail/main.cpp b/kio/misc/ksendbugmail/main.cpp index d84e4c297..b80a23d1b 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.data())); sm->setMessageBody(text); sm->sendMessage(); diff --git a/kio/misc/ksendbugmail/smtp.cpp b/kio/misc/ksendbugmail/smtp.cpp index 36a417b88..ac3e7b74f 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,7 +249,7 @@ 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; @@ -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; |