summaryrefslogtreecommitdiffstats
path: root/ksirc/ioDCC.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /ksirc/ioDCC.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksirc/ioDCC.cpp')
-rw-r--r--ksirc/ioDCC.cpp276
1 files changed, 138 insertions, 138 deletions
diff --git a/ksirc/ioDCC.cpp b/ksirc/ioDCC.cpp
index 7c576904..ff2d5022 100644
--- a/ksirc/ioDCC.cpp
+++ b/ksirc/ioDCC.cpp
@@ -17,12 +17,12 @@
#include <klocale.h>
#include <kpassivepopup.h>
-#include <qregexp.h>
+#include <tqregexp.h>
extern DisplayMgr *displayMgr;
KSircIODCC::KSircIODCC(KSircProcess *_proc) :
- QObject(),
+ TQObject(),
KSircMessageReceiver(_proc)
{
proc = _proc;
@@ -31,11 +31,11 @@ KSircIODCC::KSircIODCC(KSircProcess *_proc) :
displayMgr->newTopLevel(mgr, FALSE);
displayMgr->setCaption(mgr, proc->serverName() + i18n(" DCC Controller"));
- connect(mgr->mgr(), SIGNAL(dccConnectClicked(dccItem *)), this, SLOT(dccConnectClicked(dccItem *)));
- connect(mgr->mgr(), SIGNAL(dccResumeClicked(dccItem *)), this, SLOT(dccResumeClicked(dccItem *)));
- connect(mgr->mgr(), SIGNAL(dccRenameClicked(dccItem *)), this, SLOT(dccRenameClicked(dccItem *)));
- connect(mgr->mgr(), SIGNAL(dccAbortClicked(dccItem *)), this, SLOT(dccAbortClicked(dccItem *)));
- connect(mgr->mgr(), SIGNAL(outputLine(QCString)), this, SIGNAL(outputLine(QCString)));
+ connect(mgr->mgr(), TQT_SIGNAL(dccConnectClicked(dccItem *)), this, TQT_SLOT(dccConnectClicked(dccItem *)));
+ connect(mgr->mgr(), TQT_SIGNAL(dccResumeClicked(dccItem *)), this, TQT_SLOT(dccResumeClicked(dccItem *)));
+ connect(mgr->mgr(), TQT_SIGNAL(dccRenameClicked(dccItem *)), this, TQT_SLOT(dccRenameClicked(dccItem *)));
+ connect(mgr->mgr(), TQT_SIGNAL(dccAbortClicked(dccItem *)), this, TQT_SLOT(dccAbortClicked(dccItem *)));
+ connect(mgr->mgr(), TQT_SIGNAL(outputLine(TQCString)), this, TQT_SIGNAL(outputLine(TQCString)));
}
@@ -46,7 +46,7 @@ KSircIODCC::~KSircIODCC()
delete (dccTopLevel *) mgr;
}
-void KSircIODCC::sirc_receive(QCString str, bool )
+void KSircIODCC::sirc_receive(TQCString str, bool )
{
if(!mgr)
return;
@@ -59,9 +59,9 @@ void KSircIODCC::sirc_receive(QCString str, bool )
// once in a long long time (compared to the byte messages) so if it takes
// a few extra clock cycles to find them, who cares?
if(str.find("DCC GET read:", 0) != -1){ /*fold01*/
- QRegExp rx("read: (.+) who: (.+) bytes: (.*)");
+ TQRegExp rx("read: (.+) who: (.+) bytes: (.*)");
if(rx.search(str)){
- QString key = QString("%1/%2").arg(rx.cap(1)).arg(rx.cap(2));
+ TQString key = TQString("%1/%2").arg(rx.cap(1)).arg(rx.cap(2));
uint bytesXfer = rx.cap(3).toUInt();
//
@@ -74,9 +74,9 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("DCC SEND write:", 0) != -1){ /*fold01*/
- QRegExp rx("write: (.+) who: (.+) bytes: (.*)");
+ TQRegExp rx("write: (.+) who: (.+) bytes: (.*)");
if(rx.search(str)){
- QString key = QString("%1/%2").arg(rx.cap(1)).arg(rx.cap(2));
+ TQString key = TQString("%1/%2").arg(rx.cap(1)).arg(rx.cap(2));
uint bytesXfer = rx.cap(3).toUInt();
if(DCCSendItems[key]){
@@ -85,12 +85,12 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("INBOUND DCC SEND", 0) != -1){ /*FOLD01*/
- QRegExp rx("who: (.+) file: (.+) size: (.*) ip: (.+) port: (.+)");
+ TQRegExp rx("who: (.+) file: (.+) size: (.*) ip: (.+) port: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString size = rx.cap(3);
- QString ip = rx.cap(4);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString size = rx.cap(3);
+ TQString ip = rx.cap(4);
//QSTring port = rx.cap(5);
int fileSize = size.toInt(); // Bytes per step
@@ -99,25 +99,25 @@ void KSircIODCC::sirc_receive(QCString str, bool )
// setup dcc dialog
displayMgr->show(mgr);
dccItem *it = mgr->mgr()->newGetItem(filename, who, dccItem::dccGotOffer, fileSize);
- connect(it, SIGNAL(itemRenamed(dccItem *, QString, QString)),
- this, SLOT(dccRenameDone(dccItem *, QString, QString)));
+ connect(it, TQT_SIGNAL(itemRenamed(dccItem *, TQString, TQString)),
+ this, TQT_SLOT(dccRenameDone(dccItem *, TQString, TQString)));
it->setWhoPostfix("(" + ip + ")");
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCGetItems[key]){
/*
* don't add duplicates, this cuases real headaches
* for both us and the user.
*/
- QString renamed;
+ TQString renamed;
dccItem *old = DCCGetItems.take(key);
int i;
for(i = 0; i <= (int) DCCGetItems.count()+1; i++){
- renamed = QString("%1 (finished %2)/%3").arg(filename).arg(i+1).arg(old->who());
+ renamed = TQString("%1 (finished %2)/%3").arg(filename).arg(i+1).arg(old->who());
if( DCCGetItems[renamed] == 0x0)
break;
}
- old->changeFilename(QString("%1 (finished %2)").arg(filename).arg(i+1));
+ old->changeFilename(TQString("%1 (finished %2)").arg(filename).arg(i+1));
DCCGetItems.insert(renamed, it);
}
@@ -128,18 +128,18 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("Sent DCC SEND", 0) != -1){ /*FOLD01*/
- QRegExp rx("who: (.+) file: (.+) size: (.*)");
+ TQRegExp rx("who: (.+) file: (.+) size: (.*)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString size = rx.cap(3);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString size = rx.cap(3);
int fileSize = size.toInt(); // Bytes per step
fileSize /= 1024;
// setup dcc dialog
displayMgr->show(mgr);
dccItem *it = mgr->mgr()->newSendItem(filename, who, dccItem::dccSentOffer, fileSize);
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCSendItems[key]){
/*
* don't add duplicates, this cuases real headaches
@@ -147,15 +147,15 @@ void KSircIODCC::sirc_receive(QCString str, bool )
* We can get these on repeated sends or old files,
* just renamed them, their finished anyways
*/
- QString renamed;
+ TQString renamed;
dccItem *old = DCCSendItems.take(key);
int i;
for(i = 0; i <= (int) DCCSendItems.count()+1; i++){
- renamed = QString("%1 (sent %2)/%3").arg(filename).arg(i+1).arg(old->who());
+ renamed = TQString("%1 (sent %2)/%3").arg(filename).arg(i+1).arg(old->who());
if( DCCSendItems[renamed] == 0x0)
break;
}
- old->changeFilename(QString("%1 (sent %2)").arg(filename).arg(i+1));
+ old->changeFilename(TQString("%1 (sent %2)").arg(filename).arg(i+1));
DCCSendItems.insert(renamed, it);
}
DCCSendItems.insert(key, it);
@@ -165,16 +165,16 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("DCC CHAT OFFERED", 0) != -1){ /*FOLD01*/
- QRegExp rx("who: (.+) ip: (.+) port: (.+)");
+ TQRegExp rx("who: (.+) ip: (.+) port: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString ip = rx.cap(2);
- QString port = rx.cap(3);
+ TQString who = rx.cap(1);
+ TQString ip = rx.cap(2);
+ TQString port = rx.cap(3);
// setup dcc dialog
displayMgr->show(mgr);
dccItem *it = mgr->mgr()->newChatItem(who, dccItem::dccGotOffer);
- connect(it, SIGNAL(itemRenamed(dccItem *, QString, QString)),
- this, SLOT(dccRenameDone(dccItem *, QString, QString)));
+ connect(it, TQT_SIGNAL(itemRenamed(dccItem *, TQString, TQString)),
+ this, TQT_SLOT(dccRenameDone(dccItem *, TQString, TQString)));
it->setWhoPostfix("(" + ip + ")");
DCCChatItems.insert(who, it);
}
@@ -183,15 +183,15 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("DCC CHAT SEND", 0) != -1){ /*FOLD01*/
- QRegExp rx("who: (.+)");
+ TQRegExp rx("who: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
+ TQString who = rx.cap(1);
// setup dcc dialog
displayMgr->show(mgr);
dccItem *it = mgr->mgr()->newChatItem(who, dccItem::dccSentOffer);
- connect(it, SIGNAL(itemRenamed(dccItem *, QString, QString)),
- this, SLOT(dccRenameDone(dccItem *, QString, QString)));
+ connect(it, TQT_SIGNAL(itemRenamed(dccItem *, TQString, TQString)),
+ this, TQT_SLOT(dccRenameDone(dccItem *, TQString, TQString)));
DCCChatItems.insert(who, it);
}
else {
@@ -199,11 +199,11 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("DCC SEND terminated") != -1){ /*FOLD01*/
- QRegExp rx("who: (.+) file: (.+) reason: (.*)");
+ TQRegExp rx("who: (.+) file: (.+) reason: (.*)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString error = rx.cap(3);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString error = rx.cap(3);
enum dccItem::dccStatus status = dccItem::dccDone;
if(error == "CLOSE"){
@@ -213,7 +213,7 @@ void KSircIODCC::sirc_receive(QCString str, bool )
status = dccItem::dccError;
KPassivePopup::message(i18n("DCC SEND with %1 for %2 failed because of %3").arg(who).arg(filename).arg(error), mgr->mgr());
}
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCSendItems[key]){
kdDebug(5008) << "SendPercent: " << DCCSendItems[key]->getPercent() << endl;
if((status == dccItem::dccDone) && (DCCSendItems[key]->getPercent() < 100))
@@ -224,18 +224,18 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
else if(str.find ("DCC GET terminated") != -1){ /*fold01*/
kdDebug(5008) << "Term: " << str << endl;
- QRegExp rx("who: (.+) file: (.+) reason: (.*)");
+ TQRegExp rx("who: (.+) file: (.+) reason: (.*)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString error = rx.cap(3);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString error = rx.cap(3);
enum dccItem::dccStatus status = dccItem::dccDone;
if(error != "OK"){
status = dccItem::dccError;
KPassivePopup::message(i18n("DCC GET with %1 for %2 failed because of %3").arg(who).arg(filename).arg(error), mgr->mgr());
}
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCGetItems[key]){
kdDebug(5008) << "GetPercent: " << DCCGetItems[key]->getPercent() << endl;
if((status == dccItem::dccDone) && (DCCGetItems[key]->getPercent() < 100))
@@ -248,11 +248,11 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("DCC GET resumed") != -1){ /*fold01*/
- QRegExp rx("who: (.+) file: (.+)");
+ TQRegExp rx("who: (.+) file: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCGetItems[key]){
dccItem *it = DCCGetItems[key];
kdDebug(5008) << "Got DCC GET resumed message..." << it->file() << endl;
@@ -263,34 +263,34 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("DCC SEND resumed") != -1){ /*fold01*/
- QRegExp rx("who: (.+) file: (.+)");
+ TQRegExp rx("who: (.+) file: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCSendItems[key]){
DCCSendItems[key]->changeStatus(dccItem::dccResumed);
}
}
}
else if(str.find("DCC GET established") != -1){ /*fold01*/
- QRegExp rx("who: (.+) file: (.+)");
+ TQRegExp rx("who: (.+) file: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCGetItems[key]){
DCCGetItems[key]->changeStatus(dccItem::dccRecving);
}
}
}
else if(str.find("DCC SEND established") != -1){ /*fold01*/
- QRegExp rx("who: (.+) file: (.+) ip: (\\S+)");
+ TQRegExp rx("who: (.+) file: (.+) ip: (\\S+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString ip = rx.cap(3);
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString ip = rx.cap(3);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCSendItems[key]){
DCCSendItems[key]->setWhoPostfix("(" + ip + ")");
DCCSendItems[key]->changeStatus(dccItem::dccSending);
@@ -298,34 +298,34 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("DCC CHAT established") != -1){ /*FOLD01*/
- QRegExp rx("who: (.+)");
+ TQRegExp rx("who: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
+ TQString who = rx.cap(1);
if(DCCChatItems[who]){
DCCChatItems[who]->changeStatus(dccItem::dccOpen);
- proc->new_toplevel(KSircChannel(proc->serverName(), QString("=") + who.lower()));
+ proc->new_toplevel(KSircChannel(proc->serverName(), TQString("=") + who.lower()));
}
}
}
else if(str.find("DCC CHAT inbound established") != -1){ /*FOLD01*/
- QRegExp rx("who: (.+) ip: (.+)");
+ TQRegExp rx("who: (.+) ip: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString ip = rx.cap(2);
+ TQString who = rx.cap(1);
+ TQString ip = rx.cap(2);
if(DCCChatItems[who]){
DCCChatItems[who]->setWhoPostfix("(" + ip + ")");
DCCChatItems[who]->changeStatus(dccItem::dccOpen);
- proc->new_toplevel(KSircChannel(proc->serverName(), QString("=") + who.lower()));
+ proc->new_toplevel(KSircChannel(proc->serverName(), TQString("=") + who.lower()));
}
}
}
else if(str.find("DCC GET failed") != -1){ /*fold01*/
- QRegExp rx("who: (.+) file: (.+) reason: (.*)");
+ TQRegExp rx("who: (.+) file: (.+) reason: (.*)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString error = rx.cap(3);
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString error = rx.cap(3);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCGetItems[key]){
DCCGetItems[key]->changeStatus(dccItem::dccError);
}
@@ -333,10 +333,10 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("DCC CHAT failed") != -1){ /*FOLD01*/
- QRegExp rx("who: (.+) reason: (.*)");
+ TQRegExp rx("who: (.+) reason: (.*)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString error = rx.cap(2);
+ TQString who = rx.cap(1);
+ TQString error = rx.cap(2);
if(DCCChatItems[who]){
DCCChatItems[who]->changeStatus(dccItem::dccError);
}
@@ -344,59 +344,59 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("DCC CHAT renamed") != -1){ /*FOLD01*/
- QRegExp rx("who: (.+) to: (.+)");
+ TQRegExp rx("who: (.+) to: (.+)");
if(rx.search(str)){
- QString oldwho = rx.cap(1);
- QString newwho = rx.cap(2);
+ TQString oldwho = rx.cap(1);
+ TQString newwho = rx.cap(2);
- QString oldwin = "=" + oldwho;
+ TQString oldwin = "=" + oldwho;
if(proc->getWindowList().find(oldwin)){
- proc->getWindowList().find(oldwin)->control_message(CHANGE_CHANNEL,QString("=" +newwho).lower());
+ proc->getWindowList().find(oldwin)->control_message(CHANGE_CHANNEL,TQString("=" +newwho).lower());
}
}
}
else if(str.find("Closing DCC GET") != -1){ /*fold01*/
- QRegExp rx("who: (.+) file: (.+)");
+ TQRegExp rx("who: (.+) file: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
- QString key = QString("%1/%2").arg(filename).arg(who);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
+ TQString key = TQString("%1/%2").arg(filename).arg(who);
if(DCCGetItems[key]){
DCCGetItems[key]->changeStatus(dccItem::dccCancel);
}
}
}
// else if(str.find("Closing DCC SEND") != -1){ /*FOLD01*/
-// QRegExp rx("who: (.+) file: (.+)");
+// TQRegExp rx("who: (.+) file: (.+)");
// if(rx.search(str)){
-// QString who = rx.cap(1);
-// QString filename = rx.cap(2);
-// QString key = QString("%1/%2").arg(filename).arg(who);
+// TQString who = rx.cap(1);
+// TQString filename = rx.cap(2);
+// TQString key = TQString("%1/%2").arg(filename).arg(who);
// if(DCCSendItems[key]){
// DCCSendItems[key]->changeStatus(dccItem::dccCancel);
// }
// }
// }
else if(str.find("Closing DCC CHAT") != -1){ /*fold01*/
- QRegExp rx("who: (.+)");
+ TQRegExp rx("who: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
+ TQString who = rx.cap(1);
if(DCCChatItems[who]){
DCCChatItems[who]->changeStatus(dccItem::dccDone);
}
}
}
else if(str.find("No DCC SEND") != -1){ /*fold01*/
- QRegExp rx("who: (.+) file: (.+)");
+ TQRegExp rx("who: (.+) file: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
- //QString key = QString("%1/%2").arg(filename).arg(who);
+ //TQString key = TQString("%1/%2").arg(filename).arg(who);
- QPtrList<dccItem> toDel;
- QDict<dccItem> new_list;
- QDictIterator<dccItem> it( DCCSendItems );
+ TQPtrList<dccItem> toDel;
+ TQDict<dccItem> new_list;
+ TQDictIterator<dccItem> it( DCCSendItems );
for(;it.current(); ++it){
if((it.current()->who() == who) &&
(it.current()->file() == filename)
@@ -413,14 +413,14 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("No DCC GET") != -1){ /*fold01*/
- QRegExp rx("who: (.+) file: (.+)");
+ TQRegExp rx("who: (.+) file: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
- QString filename = rx.cap(2);
+ TQString who = rx.cap(1);
+ TQString filename = rx.cap(2);
- QPtrList<dccItem> toDel;
- QDict<dccItem> new_list;
- QDictIterator<dccItem> it( DCCGetItems );
+ TQPtrList<dccItem> toDel;
+ TQDict<dccItem> new_list;
+ TQDictIterator<dccItem> it( DCCGetItems );
for(;it.current(); ++it){
if((it.current()->who() == who) &&
(it.current()->file() == filename)
@@ -437,13 +437,13 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
}
else if(str.find("No DCC CHAT") != -1){ /*fold01*/
- QRegExp rx("who: (.+)");
+ TQRegExp rx("who: (.+)");
if(rx.search(str)){
- QString who = rx.cap(1);
+ TQString who = rx.cap(1);
- QPtrList<dccItem> toDel;
- QDict<dccItem> new_list;
- QDictIterator<dccItem> it( DCCChatItems );
+ TQPtrList<dccItem> toDel;
+ TQDict<dccItem> new_list;
+ TQDictIterator<dccItem> it( DCCChatItems );
for(;it.current(); ++it){
if(it.current()->who() == who){
toDel.append(it.current());
@@ -463,11 +463,11 @@ void KSircIODCC::sirc_receive(QCString str, bool )
}
-void KSircIODCC::control_message(int, QString)
+void KSircIODCC::control_message(int, TQString)
{
}
-void KSircIODCC::cancelTransfer(QString filename)
+void KSircIODCC::cancelTransfer(TQString filename)
{
//if(DlgList[filename]){
//emit outputLine(DCCStatus[filename]->cancelMessage.ascii());
@@ -481,17 +481,17 @@ void KSircIODCC::cancelTransfer(QString filename)
void KSircIODCC::getFile()
{
/*
- QString text = pending->fileListing()->text(pending->fileListing()->currentItem());
+ TQString text = pending->fileListing()->text(pending->fileListing()->currentItem());
int pos = text.find(" ", 0);
- QString nick = text.mid(0, pos);
+ TQString nick = text.mid(0, pos);
pos = text.find(" ", pos+1) + 1;
- QString filename = text.mid(pos, text.length() - pos);
+ TQString filename = text.mid(pos, text.length() - pos);
//if(DlgList[filename]->isVisible() == FALSE)
// DlgList[filename]->show();
- QString command = "/dcc get " + nick + " " + filename + "\n";
+ TQString command = "/dcc get " + nick + " " + filename + "\n";
emit outputLine(command.ascii());
for(uint i = 0; i < pending->fileListing()->count(); i++)
- if(QString(pending->fileListing()->text(i)) == (nick + " offered " + filename))
+ if(TQString(pending->fileListing()->text(i)) == (nick + " offered " + filename))
pending->fileListing()->removeItem(i);
if(pending->fileListing()->count() == 0)
@@ -502,15 +502,15 @@ void KSircIODCC::getFile()
void KSircIODCC::forgetFile()
{
/*
- QString text = pending->fileListing()->text(pending->fileListing()->currentItem());
+ TQString text = pending->fileListing()->text(pending->fileListing()->currentItem());
int pos = text.find(" ", 0);
- QString nick = text.mid(0, pos);
+ TQString nick = text.mid(0, pos);
pos = text.find(" ", pos+1) + 1;
- QString filename = text.mid(pos, text.length() - pos);
- QString command = "/dcc close get " + nick + " " + filename + "\n";
+ TQString filename = text.mid(pos, text.length() - pos);
+ TQString command = "/dcc close get " + nick + " " + filename + "\n";
emit outputLine(command.ascii());
for(uint i = 0; i < pending->fileListing()->count(); i++)
- if(QString(pending->fileListing()->text(i)) == (nick + " offered " + filename))
+ if(TQString(pending->fileListing()->text(i)) == (nick + " offered " + filename))
pending->fileListing()->removeItem(i);
if(pending->fileListing()->count() == 0)
@@ -539,7 +539,7 @@ filterRuleList *KSircIODCC::defaultRules()
void KSircIODCC::dccConnectClicked(dccItem *it)
{
- QString str;
+ TQString str;
kdDebug(5008) << "Got connect click on " << it->who() << " " << it->type() << endl;
switch(it->type()){
case dccItem::dccGet:
@@ -557,7 +557,7 @@ void KSircIODCC::dccConnectClicked(dccItem *it)
}
void KSircIODCC::dccResumeClicked(dccItem *it)
{
- QString str;
+ TQString str;
kdDebug(5008) << "Got resume click on " << it->who() << " " << it->type() << endl;
switch(it->type()){
case dccItem::dccGet:
@@ -576,17 +576,17 @@ void KSircIODCC::dccRenameClicked(dccItem *it)
}
void KSircIODCC::dccAbortClicked(dccItem *it)
{
- QString str;
+ TQString str;
switch(it->status()){
case dccItem::dccDone:
case dccItem::dccCancel:
case dccItem::dccError:
switch(it->type()) {
case dccItem::dccGet:
- DCCGetItems.remove(QString("%1/%2").arg(it->file()).arg(it->who()));
+ DCCGetItems.remove(TQString("%1/%2").arg(it->file()).arg(it->who()));
break;
case dccItem::dccSend:
- DCCSendItems.remove(QString("%1/%2").arg(it->file()).arg(it->who()));
+ DCCSendItems.remove(TQString("%1/%2").arg(it->file()).arg(it->who()));
break;
case dccItem::dccChat:
DCCChatItems.remove(it->who());
@@ -612,14 +612,14 @@ void KSircIODCC::dccAbortClicked(dccItem *it)
}
}
-void KSircIODCC::dccRenameDone(dccItem *it, QString oldWho, QString oldFile)
+void KSircIODCC::dccRenameDone(dccItem *it, TQString oldWho, TQString oldFile)
{
if(it->type() == dccItem::dccGet){
- QString str = QString("/dcc rename %1 %2 %3\n").arg(oldWho).arg(oldFile).arg(it->file());
- QString key = QString("%1/%2").arg(oldFile).arg(oldWho);
+ TQString str = TQString("/dcc rename %1 %2 %3\n").arg(oldWho).arg(oldFile).arg(it->file());
+ TQString key = TQString("%1/%2").arg(oldFile).arg(oldWho);
if(DCCGetItems[key]){
DCCGetItems.take(key);
- QString newkey = QString("%1/%2").arg(it->file()).arg(it->who());
+ TQString newkey = TQString("%1/%2").arg(it->file()).arg(it->who());
DCCGetItems.insert(newkey, it);
}
emit outputLine(str.ascii());
@@ -629,7 +629,7 @@ void KSircIODCC::dccRenameDone(dccItem *it, QString oldWho, QString oldFile)
DCCChatItems.take(oldWho);
DCCChatItems.insert(it->who(), it);
}
- QString str = QString("/dcc rchat %1 %2\n").arg(oldWho).arg(it->who());
+ TQString str = TQString("/dcc rchat %1 %2\n").arg(oldWho).arg(it->who());
emit outputLine(str.ascii());
}