diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/protocols/jabber/jabberaccount.cpp | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-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 'kopete/protocols/jabber/jabberaccount.cpp')
-rw-r--r-- | kopete/protocols/jabber/jabberaccount.cpp | 190 |
1 files changed, 95 insertions, 95 deletions
diff --git a/kopete/protocols/jabber/jabberaccount.cpp b/kopete/protocols/jabber/jabberaccount.cpp index 785e9c53..bb1c0f2e 100644 --- a/kopete/protocols/jabber/jabberaccount.cpp +++ b/kopete/protocols/jabber/jabberaccount.cpp @@ -33,9 +33,9 @@ #include <time.h> -#include <qstring.h> -#include <qregexp.h> -#include <qtimer.h> +#include <tqstring.h> +#include <tqregexp.h> +#include <tqtimer.h> #include <kconfig.h> #include <kdebug.h> @@ -87,7 +87,7 @@ -JabberAccount::JabberAccount (JabberProtocol * parent, const QString & accountId, const char *name) +JabberAccount::JabberAccount (JabberProtocol * parent, const TQString & accountId, const char *name) :Kopete::PasswordedAccount ( parent, accountId, 0, name ) { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Instantiating new account " << accountId << endl; @@ -109,7 +109,7 @@ JabberAccount::JabberAccount (JabberProtocol * parent, const QString & accountId JabberContact *myContact = contactPool()->addContact ( XMPP::RosterItem ( accountId ), Kopete::ContactList::self()->myself(), false ); setMyself( myContact ); - QObject::connect(Kopete::ContactList::self(), SIGNAL( globalIdentityChanged(const QString&, const QVariant& ) ), SLOT( slotGlobalIdentityChanged(const QString&, const QVariant& ) ) ); + TQObject::connect(Kopete::ContactList::self(), TQT_SIGNAL( globalIdentityChanged(const TQString&, const TQVariant& ) ), TQT_SLOT( slotGlobalIdentityChanged(const TQString&, const TQVariant& ) ) ); m_initialPresence = XMPP::Status ( "", "", 5, true ); @@ -124,8 +124,8 @@ JabberAccount::~JabberAccount () cleanup (); - QMap<QString,JabberTransport*> tranposrts_copy=m_transports; - QMap<QString,JabberTransport*>::Iterator it; + TQMap<TQString,JabberTransport*> tranposrts_copy=m_transports; + TQMap<TQString,JabberTransport*>::Iterator it; for ( it = tranposrts_copy.begin(); it != tranposrts_copy.end(); ++it ) delete it.data(); } @@ -178,7 +178,7 @@ KActionMenu *JabberAccount::actionMenu () KAction *action; - action = new KAction (i18n ("Join Groupchat..."), "jabber_group", 0, this, SLOT (slotJoinNewChat ()), this, "actionJoinChat"); + action = new KAction (i18n ("Join Groupchat..."), "jabber_group", 0, this, TQT_SLOT (slotJoinNewChat ()), this, "actionJoinChat"); m_actionMenu->insert(action); action->setEnabled( isConnected() ); @@ -190,17 +190,17 @@ KActionMenu *JabberAccount::actionMenu () m_actionMenu->popupMenu()->insertSeparator(); action = new KAction ( i18n ("Services..."), "jabber_serv_on", 0, - this, SLOT ( slotGetServices () ), this, "actionJabberServices"); + this, TQT_SLOT ( slotGetServices () ), this, "actionJabberServices"); action->setEnabled( isConnected() ); m_actionMenu->insert ( action ); action = new KAction ( i18n ("Send Raw Packet to Server..."), "mail_new", 0, - this, SLOT ( slotSendRaw () ), this, "actionJabberSendRaw") ; + this, TQT_SLOT ( slotSendRaw () ), this, "actionJabberSendRaw") ; action->setEnabled( isConnected() ); m_actionMenu->insert ( action ); action = new KAction ( i18n ("Edit User Info..."), "identity", 0, - this, SLOT ( slotEditVCard () ), this, "actionEditVCard") ; + this, TQT_SLOT ( slotEditVCard () ), this, "actionEditVCard") ; action->setEnabled( isConnected() ); m_actionMenu->insert ( action ); @@ -229,11 +229,11 @@ JabberContactPool *JabberAccount::contactPool () } -bool JabberAccount::createContact (const QString & contactId, Kopete::MetaContact * metaContact) +bool JabberAccount::createContact (const TQString & contactId, Kopete::MetaContact * metaContact) { // collect all group names - QStringList groupNames; + TQStringList groupNames; Kopete::GroupList groupList = metaContact->groups(); for(Kopete::Group *group = groupList.first(); group; group = groupList.next()) groupNames += group->displayName(); @@ -271,11 +271,11 @@ bool JabberAccount::isConnecting () XMPP::Jid jid ( myself()->contactId () ); // see if we are currently trying to connect - return resourcePool()->bestResource ( jid ).status().show () == QString("connecting"); + return resourcePool()->bestResource ( jid ).status().show () == TQString("connecting"); } -void JabberAccount::connectWithPassword ( const QString &password ) +void JabberAccount::connectWithPassword ( const TQString &password ) { kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "called" << endl; @@ -295,40 +295,40 @@ void JabberAccount::connectWithPassword ( const QString &password ) { m_jabberClient = new JabberClient; - QObject::connect ( m_jabberClient, SIGNAL ( csDisconnected () ), this, SLOT ( slotCSDisconnected () ) ); - QObject::connect ( m_jabberClient, SIGNAL ( csError ( int ) ), this, SLOT ( slotCSError ( int ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( tlsWarning ( int ) ), this, SLOT ( slotHandleTLSWarning ( int ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( connected () ), this, SLOT ( slotConnected () ) ); - QObject::connect ( m_jabberClient, SIGNAL ( error ( JabberClient::ErrorCode ) ), this, SLOT ( slotClientError ( JabberClient::ErrorCode ) ) ); - - QObject::connect ( m_jabberClient, SIGNAL ( subscription ( const XMPP::Jid &, const QString & ) ), - this, SLOT ( slotSubscription ( const XMPP::Jid &, const QString & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( rosterRequestFinished ( bool ) ), - this, SLOT ( slotRosterRequestFinished ( bool ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( newContact ( const XMPP::RosterItem & ) ), - this, SLOT ( slotContactUpdated ( const XMPP::RosterItem & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( contactUpdated ( const XMPP::RosterItem & ) ), - this, SLOT ( slotContactUpdated ( const XMPP::RosterItem & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( contactDeleted ( const XMPP::RosterItem & ) ), - this, SLOT ( slotContactDeleted ( const XMPP::RosterItem & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( resourceAvailable ( const XMPP::Jid &, const XMPP::Resource & ) ), - this, SLOT ( slotResourceAvailable ( const XMPP::Jid &, const XMPP::Resource & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( resourceUnavailable ( const XMPP::Jid &, const XMPP::Resource & ) ), - this, SLOT ( slotResourceUnavailable ( const XMPP::Jid &, const XMPP::Resource & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( messageReceived ( const XMPP::Message & ) ), - this, SLOT ( slotReceivedMessage ( const XMPP::Message & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( incomingFileTransfer () ), - this, SLOT ( slotIncomingFileTransfer () ) ); - QObject::connect ( m_jabberClient, SIGNAL ( groupChatJoined ( const XMPP::Jid & ) ), - this, SLOT ( slotGroupChatJoined ( const XMPP::Jid & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( groupChatLeft ( const XMPP::Jid & ) ), - this, SLOT ( slotGroupChatLeft ( const XMPP::Jid & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( groupChatPresence ( const XMPP::Jid &, const XMPP::Status & ) ), - this, SLOT ( slotGroupChatPresence ( const XMPP::Jid &, const XMPP::Status & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( groupChatError ( const XMPP::Jid &, int, const QString & ) ), - this, SLOT ( slotGroupChatError ( const XMPP::Jid &, int, const QString & ) ) ); - QObject::connect ( m_jabberClient, SIGNAL ( debugMessage ( const QString & ) ), - this, SLOT ( slotClientDebugMessage ( const QString & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( csDisconnected () ), this, TQT_SLOT ( slotCSDisconnected () ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( csError ( int ) ), this, TQT_SLOT ( slotCSError ( int ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( tlsWarning ( int ) ), this, TQT_SLOT ( slotHandleTLSWarning ( int ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( connected () ), this, TQT_SLOT ( slotConnected () ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( error ( JabberClient::ErrorCode ) ), this, TQT_SLOT ( slotClientError ( JabberClient::ErrorCode ) ) ); + + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( subscription ( const XMPP::Jid &, const TQString & ) ), + this, TQT_SLOT ( slotSubscription ( const XMPP::Jid &, const TQString & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( rosterRequestFinished ( bool ) ), + this, TQT_SLOT ( slotRosterRequestFinished ( bool ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( newContact ( const XMPP::RosterItem & ) ), + this, TQT_SLOT ( slotContactUpdated ( const XMPP::RosterItem & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( contactUpdated ( const XMPP::RosterItem & ) ), + this, TQT_SLOT ( slotContactUpdated ( const XMPP::RosterItem & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( contactDeleted ( const XMPP::RosterItem & ) ), + this, TQT_SLOT ( slotContactDeleted ( const XMPP::RosterItem & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( resourceAvailable ( const XMPP::Jid &, const XMPP::Resource & ) ), + this, TQT_SLOT ( slotResourceAvailable ( const XMPP::Jid &, const XMPP::Resource & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( resourceUnavailable ( const XMPP::Jid &, const XMPP::Resource & ) ), + this, TQT_SLOT ( slotResourceUnavailable ( const XMPP::Jid &, const XMPP::Resource & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( messageReceived ( const XMPP::Message & ) ), + this, TQT_SLOT ( slotReceivedMessage ( const XMPP::Message & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( incomingFileTransfer () ), + this, TQT_SLOT ( slotIncomingFileTransfer () ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( groupChatJoined ( const XMPP::Jid & ) ), + this, TQT_SLOT ( slotGroupChatJoined ( const XMPP::Jid & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( groupChatLeft ( const XMPP::Jid & ) ), + this, TQT_SLOT ( slotGroupChatLeft ( const XMPP::Jid & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( groupChatPresence ( const XMPP::Jid &, const XMPP::Status & ) ), + this, TQT_SLOT ( slotGroupChatPresence ( const XMPP::Jid &, const XMPP::Status & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( groupChatError ( const XMPP::Jid &, int, const TQString & ) ), + this, TQT_SLOT ( slotGroupChatError ( const XMPP::Jid &, int, const TQString & ) ) ); + TQObject::connect ( m_jabberClient, TQT_SIGNAL ( debugMessage ( const TQString & ) ), + this, TQT_SLOT ( slotClientDebugMessage ( const TQString & ) ) ); } else { @@ -363,7 +363,7 @@ void JabberAccount::connectWithPassword ( const QString &password ) m_jabberClient->setClientName ("Kopete"); m_jabberClient->setClientVersion (kapp->aboutData ()->version ()); - m_jabberClient->setOSName (QString ("%1 %2").arg (utsBuf.sysname, 1).arg (utsBuf.release, 2)); + m_jabberClient->setOSName (TQString ("%1 %2").arg (utsBuf.sysname, 1).arg (utsBuf.release, 2)); } // Set caps node information @@ -387,14 +387,14 @@ void JabberAccount::connectWithPassword ( const QString &password ) char str[256]; char fmt[32]; int timezoneOffset; - QString timezoneString; + TQString timezoneString; strcpy ( fmt, "%z" ); strftime ( str, 256, fmt, localtime ( &x ) ); if ( strcmp ( fmt, str ) ) { - QString s = str; + TQString s = str; if ( s.at ( 0 ) == '+' ) s.remove ( 0, 1 ); s.truncate ( s.length () - 2 ); @@ -416,7 +416,7 @@ void JabberAccount::connectWithPassword ( const QString &password ) setPresence( XMPP::Status ("connecting", "", 0, true) ); - switch ( m_jabberClient->connect ( XMPP::Jid ( accountId () + QString("/") + resource () ), password ) ) + switch ( m_jabberClient->connect ( XMPP::Jid ( accountId () + TQString("/") + resource () ), password ) ) { case JabberClient::NoTLS: // no SSL support, at the connecting stage this means the problem is client-side @@ -435,7 +435,7 @@ void JabberAccount::connectWithPassword ( const QString &password ) } -void JabberAccount::slotClientDebugMessage ( const QString &msg ) +void JabberAccount::slotClientDebugMessage ( const TQString &msg ) { kdDebug (JABBER_DEBUG_PROTOCOL) << k_funcinfo << msg << endl; @@ -444,10 +444,10 @@ void JabberAccount::slotClientDebugMessage ( const QString &msg ) bool JabberAccount::handleTLSWarning ( JabberClient *jabberClient, int warning ) { - QString validityString, code; + TQString validityString, code; - QString server = jabberClient->jid().domain (); - QString accountId = jabberClient->jid().bare (); + TQString server = jabberClient->jid().domain (); + TQString accountId = jabberClient->jid().bare (); switch ( warning ) { @@ -509,7 +509,7 @@ bool JabberAccount::handleTLSWarning ( JabberClient *jabberClient, int warning ) arg(server, accountId, validityString), i18n("Jabber Connection Certificate Problem"), KStdGuiItem::cont(), - QString("KopeteTLSWarning") + server + code) == KMessageBox::Continue ); + TQString("KopeteTLSWarning") + server + code) == KMessageBox::Continue ); } @@ -556,7 +556,7 @@ void JabberAccount::slotConnected () { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Creating Jingle Voice caller..." << endl; m_voiceCaller = new JingleVoiceCaller( this ); - QObject::connect(m_voiceCaller,SIGNAL(incoming(const Jid&)),this,SLOT(slotIncomingVoiceCall( const Jid& ))); + TQObject::connect(m_voiceCaller,TQT_SIGNAL(incoming(const Jid&)),this,TQT_SLOT(slotIncomingVoiceCall( const Jid& ))); m_voiceCaller->initialize(); } @@ -567,12 +567,12 @@ void JabberAccount::slotConnected () { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Creating Jingle Session Manager..." << endl; m_jingleSessionManager = new JingleSessionManager( this ); - QObject::connect(m_jingleSessionManager, SIGNAL(incomingSession(const QString &, JingleSession *)), this, SLOT(slotIncomingJingleSession(const QString &, JingleSession *))); + TQObject::connect(m_jingleSessionManager, TQT_SIGNAL(incomingSession(const TQString &, JingleSession *)), this, TQT_SLOT(slotIncomingJingleSession(const TQString &, JingleSession *))); } #endif // Set caps extensions - m_jabberClient->client()->addExtension("voice-v1", Features(QString("http://www.google.com/xmpp/protocol/voice/v1"))); + m_jabberClient->client()->addExtension("voice-v1", Features(TQString("http://www.google.com/xmpp/protocol/voice/v1"))); #endif kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Requesting roster..." << endl; @@ -607,7 +607,7 @@ void JabberAccount::slotIncomingFileTransfer () } -void JabberAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason) +void JabberAccount::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason) { XMPP::Status xmppStatus = m_protocol->kosToStatus( status, reason); @@ -725,10 +725,10 @@ void JabberAccount::slotCSDisconnected () } -void JabberAccount::handleStreamError (int streamError, int streamCondition, int connectorCode, const QString &server, Kopete::Account::DisconnectReason &errorClass) +void JabberAccount::handleStreamError (int streamError, int streamCondition, int connectorCode, const TQString &server, Kopete::Account::DisconnectReason &errorClass) { - QString errorText; - QString errorCondition; + TQString errorText; + TQString errorCondition; errorClass = Kopete::Account::InvalidHost; @@ -1046,7 +1046,7 @@ void JabberAccount::setPresence ( const XMPP::Status &status ) /* * Unless we are in the connecting status, send a presence packet to the server */ - if(status.show () != QString("connecting") ) + if(status.show () != TQString("connecting") ) { /* * Make sure we are actually connected before sending out a packet. @@ -1081,7 +1081,7 @@ void JabberAccount::slotSendRaw () } -void JabberAccount::slotSubscription (const XMPP::Jid & jid, const QString & type) +void JabberAccount::slotSubscription (const XMPP::Jid & jid, const TQString & type) { kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << jid.full () << ", " << type << endl; @@ -1103,9 +1103,9 @@ void JabberAccount::slotSubscription (const XMPP::Jid & jid, const QString & typ hideFlags |= Kopete::UI::ContactAddedNotifyDialog::AddCheckBox | Kopete::UI::ContactAddedNotifyDialog::AddGroupBox ; Kopete::UI::ContactAddedNotifyDialog *dialog= - new Kopete::UI::ContactAddedNotifyDialog( jid.full() ,QString::null,this, hideFlags ); - QObject::connect(dialog,SIGNAL(applyClicked(const QString&)), - this,SLOT(slotContactAddedNotifyDialogClosed(const QString& ))); + new Kopete::UI::ContactAddedNotifyDialog( jid.full() ,TQString::null,this, hideFlags ); + TQObject::connect(dialog,TQT_SIGNAL(applyClicked(const TQString&)), + this,TQT_SLOT(slotContactAddedNotifyDialogClosed(const TQString& ))); dialog->show(); } else if (type == "unsubscribed") @@ -1150,7 +1150,7 @@ void JabberAccount::slotSubscription (const XMPP::Jid & jid, const QString & typ } } -void JabberAccount::slotContactAddedNotifyDialogClosed( const QString & contactid ) +void JabberAccount::slotContactAddedNotifyDialogClosed( const TQString & contactid ) { // the dialog that asked the authorisation is closed. (it was shown in slotSubscrition) XMPP::JT_Presence *task; @@ -1187,7 +1187,7 @@ void JabberAccount::slotContactAddedNotifyDialogClosed( const QString & contacti Kopete::MetaContact *parentContact=dialog->addContact(); if(parentContact) { - QStringList groupNames; + TQStringList groupNames; Kopete::GroupList groupList = parentContact->groups(); for(Kopete::Group *group = groupList.first(); group; group = groupList.next()) groupNames += group->displayName(); @@ -1270,10 +1270,10 @@ void JabberAccount::slotContactUpdated (const XMPP::RosterItem & item) * so add a new metacontact to the list. */ metaContact = new Kopete::MetaContact (); - QStringList groups = item.groups (); + TQStringList groups = item.groups (); // add this metacontact to all groups the contact is a member of - for (QStringList::Iterator it = groups.begin (); it != groups.end (); ++it) + for (TQStringList::Iterator it = groups.begin (); it != groups.end (); ++it) metaContact->addToGroup (Kopete::ContactList::self ()->findGroup (*it)); // put it onto contact list @@ -1503,7 +1503,7 @@ void JabberAccount::slotGroupChatPresence (const XMPP::Jid & jid, const XMPP::St } -void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const QString &reason) +void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const TQString &reason) { kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Group chat error - room " << jid.full () << " had error " << error << " (" << reason << ")" << endl; @@ -1511,7 +1511,7 @@ void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const Q { case JabberClient::InvalidPasswordForMUC: { - QCString password; + TQCString password; int result = KPasswordDialog::getPassword(password, i18n("A password is required to join the room %1.").arg(jid.node())); if (result == KPasswordDialog::Accepted) m_jabberClient->joinGroupChat(jid.domain(), jid.node(), jid.resource(), password); @@ -1521,9 +1521,9 @@ void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const Q case JabberClient::NicknameConflict: { bool ok; - QString nickname = KInputDialog::getText(i18n("Error trying to join %1 : nickname %2 is already in use").arg(jid.node(), jid.resource()), + TQString nickname = KInputDialog::getText(i18n("Error trying to join %1 : nickname %2 is already in use").arg(jid.node(), jid.resource()), i18n("Give your nickname"), - QString(), + TQString(), &ok); if (ok) { @@ -1548,11 +1548,11 @@ void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const Q default: { - QString detailedReason = reason.isEmpty () ? i18n ( "No reason given by the server" ) : reason; + TQString detailedReason = reason.isEmpty () ? i18n ( "No reason given by the server" ) : reason; KMessageBox::queuedMessageBox ( Kopete::UI::Global::mainWidget (), KMessageBox::Error, - i18n ("There was an error processing your request for group chat %1. (Reason: %2, Code %3)").arg ( jid.full (), detailedReason, QString::number ( error ) ), + i18n ("There was an error processing your request for group chat %1. (Reason: %2, Code %3)").arg ( jid.full (), detailedReason, TQString::number ( error ) ), i18n ("Jabber Group Chat") ); } } @@ -1581,7 +1581,7 @@ void JabberAccount::slotEditVCard () static_cast<JabberContact *>( myself() )->slotUserInfo (); } -void JabberAccount::slotGlobalIdentityChanged (const QString &key, const QVariant &value) +void JabberAccount::slotGlobalIdentityChanged (const TQString &key, const TQVariant &value) { // Check if this account is excluded from Global Identity. if( !configGroup()->readBoolEntry("ExcludeGlobalIdentity", false) ) @@ -1589,8 +1589,8 @@ void JabberAccount::slotGlobalIdentityChanged (const QString &key, const QVarian JabberContact *jabberMyself = static_cast<JabberContact *>( myself() ); if( key == Kopete::Global::Properties::self()->nickName().key() ) { - QString oldNick = jabberMyself->property( protocol()->propNickName ).value().toString(); - QString newNick = value.toString(); + TQString oldNick = jabberMyself->property( protocol()->propNickName ).value().toString(); + TQString newNick = value.toString(); if( newNick != oldNick && isConnected() ) { @@ -1609,14 +1609,14 @@ void JabberAccount::slotGlobalIdentityChanged (const QString &key, const QVarian } } -const QString JabberAccount::resource () const +const TQString JabberAccount::resource () const { return configGroup()->readEntry ( "Resource", "Kopete" ); } -const QString JabberAccount::server () const +const TQString JabberAccount::server () const { return configGroup()->readEntry ( "Server" ); @@ -1653,13 +1653,13 @@ void JabberAccount::slotIncomingVoiceCall( const Jid &jid ) #endif } -// void JabberAccount::slotIncomingJingleSession( const QString &sessionType, JingleSession *session ) +// void JabberAccount::slotIncomingJingleSession( const TQString &sessionType, JingleSession *session ) // { // #ifdef SUPPORT_JINGLE // if(sessionType == "http://www.google.com/session/phone") // { -// QString from = ((XMPP::Jid)session->peers().first()).full(); -// //KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Information, QString("Received a voice session invitation from %1.").arg(from) ); +// TQString from = ((XMPP::Jid)session->peers().first()).full(); +// //KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Information, TQString("Received a voice session invitation from %1.").arg(from) ); // JingleVoiceSessionDialog *voiceDialog = new JingleVoiceSessionDialog( static_cast<JingleVoiceSession*>(session) ); // voiceDialog->show(); // } @@ -1670,12 +1670,12 @@ void JabberAccount::slotIncomingVoiceCall( const Jid &jid ) // } -void JabberAccount::addTransport( JabberTransport * tr, const QString &jid ) +void JabberAccount::addTransport( JabberTransport * tr, const TQString &jid ) { m_transports.insert(jid,tr); } -void JabberAccount::removeTransport( const QString &jid ) +void JabberAccount::removeTransport( const TQString &jid ) { m_transports.remove(jid); } @@ -1691,7 +1691,7 @@ bool JabberAccount::removeAccount( ) i18n("Unregister"), KGuiItem(i18n( "Remove and Unregister" ), "editdelete"), KGuiItem(i18n( "Remove from kopete only"), "edittrash"), - QString(), KMessageBox::Notify | KMessageBox::Dangerous ); + TQString(), KMessageBox::Notify | KMessageBox::Dangerous ); if(result == KMessageBox::Cancel) { return false; @@ -1705,21 +1705,21 @@ bool JabberAccount::removeAccount( ) } XMPP::JT_Register *task = new XMPP::JT_Register ( client()->rootTask () ); - QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotUnregisterFinished ) ); + TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotUnregisterFinished ) ); task->unreg (); task->go ( true ); m_removing=true; // from my experiment, not all server reply us with a response. it simply dosconnect // so after one seconde, we will force to remove the account - QTimer::singleShot(1111, this, SLOT(slotUnregisterFinished())); + TQTimer::singleShot(1111, this, TQT_SLOT(slotUnregisterFinished())); return false; //the account will be removed when the task will be finished } } //remove transports from config file. - QMap<QString,JabberTransport*> tranposrts_copy=m_transports; - QMap<QString,JabberTransport*>::Iterator it; + TQMap<TQString,JabberTransport*> tranposrts_copy=m_transports; + TQMap<TQString,JabberTransport*>::Iterator it; for ( it = tranposrts_copy.begin(); it != tranposrts_copy.end(); ++it ) { (*it)->jabberAccountRemoved(); |