From 47c8a359c5276062c4bc17f0e82410f29081b502 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:48:06 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/protocols/meanwhile/meanwhilesession.cpp | 54 ++++++++++++------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'kopete/protocols/meanwhile/meanwhilesession.cpp') diff --git a/kopete/protocols/meanwhile/meanwhilesession.cpp b/kopete/protocols/meanwhile/meanwhilesession.cpp index 974ca4af..c7121875 100644 --- a/kopete/protocols/meanwhile/meanwhilesession.cpp +++ b/kopete/protocols/meanwhile/meanwhilesession.cpp @@ -181,11 +181,11 @@ void MeanwhileSession::getDefaultClientIDParams(int *clientID, } /* external interface called by meanwhileaccount */ -void MeanwhileSession::connect(QString password) +void MeanwhileSession::connect(TQString password) { int port, clientID, versionMajor, versionMinor; bool useCustomID; - QString host; + TQString host; HERE; @@ -207,10 +207,10 @@ void MeanwhileSession::connect(QString password) socket = sock; /* we want to receive signals when there is data to read */ sock->enableRead(true); - QObject::connect(sock, SIGNAL(readyRead()), this, - SLOT(slotSocketDataAvailable())); - QObject::connect(sock, SIGNAL(closed(int)), this, - SLOT(slotSocketClosed(int))); + TQObject::connect(sock, TQT_SIGNAL(readyRead()), this, + TQT_SLOT(slotSocketDataAvailable())); + TQObject::connect(sock, TQT_SIGNAL(closed(int)), this, + TQT_SLOT(slotSocketClosed(int))); /* set login details */ mwSession_setProperty(session, mwSession_AUTH_USER_ID, @@ -266,13 +266,13 @@ static void free_id_block(void *data, void *p) free(id); } -void MeanwhileSession::addContacts(const QDict& contacts) +void MeanwhileSession::addContacts(const TQDict& contacts) { HERE; - QDictIterator it(contacts); + TQDictIterator it(contacts); GList *buddies = 0L; - /** Convert our QDict of kopete contact to a GList of meanwhile buddies */ + /** Convert our TQDict of kopete contact to a GList of meanwhile buddies */ for( ; it.current(); ++it) { MeanwhileContact *contact = static_cast(it.current()); @@ -370,7 +370,7 @@ void MeanwhileSession::sendTyping(MeanwhileContact *contact, bool isTyping) } void MeanwhileSession::setStatus(Kopete::OnlineStatus status, - const QString msg) + const TQString msg) { HERE; mwDebug() << "setStatus: " << status.description() << "(" @@ -404,7 +404,7 @@ void MeanwhileSession::syncContactsToServer() mwSametimeGroup_DYNAMIC, "People"); mwSametimeGroup_setOpen(topstgroup, true); - QDictIterator it(account->contacts()); + TQDictIterator it(account->contacts()); for( ; it.current(); ++it ) { MeanwhileContact *contact = static_cast(it.current()); @@ -498,7 +498,7 @@ void MeanwhileSession::slotSocketClosed(int reason) if (reason & KExtendedSocket::involuntary) emit serverNotification( - QString("Lost connection with Meanwhile server")); + TQString("Lost connection with Meanwhile server")); if (socket) { delete socket; @@ -545,14 +545,14 @@ void MeanwhileSession::resolveContactNickname(MeanwhileContact *contact) _handleResolveLookupResults, contact, NULL); } -QString MeanwhileSession::getNickName(struct mwLoginInfo *logininfo) +TQString MeanwhileSession::getNickName(struct mwLoginInfo *logininfo) { if (logininfo == 0L || logininfo->user_name == 0L) - return QString::null; + return TQString::null; return getNickName(logininfo->user_name); } -QString MeanwhileSession::getNickName(QString name) +TQString MeanwhileSession::getNickName(TQString name) { int index = name.find(" - "); @@ -572,13 +572,13 @@ MeanwhileContact *MeanwhileSession::conversationContact( if (target == 0L || target->user == 0L) { return 0L; } - QString user(target->user); + TQString user(target->user); MeanwhileContact *contact = static_cast(account->contacts()[user]); struct mwLoginInfo *logininfo = mwConversation_getTargetInfo(conv); - QString name = getNickName(logininfo); + TQString name = getNickName(logininfo); if (!contact) { account->addContact(user, name, 0L, Kopete::Account::Temporary); @@ -625,7 +625,7 @@ void MeanwhileSession::handleSessionStateChange( if (info == INCORRECT_LOGIN) account->password().setWrong(); char *reason = mwError(info); - emit serverNotification(QString(reason)); + emit serverNotification(TQString(reason)); free(reason); } } @@ -665,14 +665,14 @@ int MeanwhileSession::handleSessionIOWrite(const guchar *buffer, void MeanwhileSession::handleSessionAdmin(const char *text) { HERE; - emit serverNotification(QString(text)); + emit serverNotification(TQString(text)); } void MeanwhileSession::handleSessionAnnounce(struct mwLoginInfo *from, gboolean /* may_reply */, const char *text) { HERE; - QString message; + TQString message; message.sprintf("Announcement from %s:\n%s", from->user_id, text); emit serverNotification(message); } @@ -694,8 +694,8 @@ void MeanwhileSession::handleSessionIOClose() if (socket == 0L) return; - QObject::disconnect(socket, SIGNAL(closed(int)), - this, SLOT(slotSocketClosed(int))); + TQObject::disconnect(socket, TQT_SIGNAL(closed(int)), + this, TQT_SLOT(slotSocketClosed(int))); socket->flush(); socket->closeNow(); @@ -748,7 +748,7 @@ void MeanwhileSession::handleAwareListAware(struct mwAwareSnapshot *snapshot) 0 : snapshot->status.time; if (idletime != 0) { contact->setStatusDescription(statusDesc + "[" + - QString::number(idletime/60)+" mins]"); + TQString::number(idletime/60)+" mins]"); } } else contact->setStatusDescription(snapshot->status.desc); @@ -775,7 +775,7 @@ struct MeanwhileSession::ConversationData cd->chat = contact->manager(Kopete::Contact::CanCreate); cd->chat->ref(); if (createQueue) - cd->queue = new QValueList(); + cd->queue = new TQValueList(); mwConversation_setClientData(conv, cd, 0L); @@ -800,7 +800,7 @@ void MeanwhileSession::handleImConvOpened(struct mwConversation *conv) } else if (convdata->queue && !convdata->queue->isEmpty()) { /* send any messages that were waiting for the conversation to open */ - QValueList::iterator it; + TQValueList::iterator it; for (it = convdata->queue->begin(); it != convdata->queue->end(); ++it) { mwConversation_send(conv, mwImSend_PLAIN, @@ -853,7 +853,7 @@ void MeanwhileSession::handleImConvReceived(struct mwConversation *conv, case mwImSend_PLAIN: { Kopete::Message message(convdata->contact, account->myself(), - QString((char *)msg), Kopete::Message::Inbound); + TQString((char *)msg), Kopete::Message::Inbound); convdata->chat->appendMessage(message); } break; @@ -948,7 +948,7 @@ MEANWHILE_HOOK_CONFERENCE(conference_invite, (conf, inviter, invite)) { HERE; - QString message; + TQString message; message.sprintf("%s has invited you to a conference called \"%s\"\n" "However, this version of the meanwhile plugin does " -- cgit v1.2.1