summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/groupwise/gwaccount.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/groupwise/gwaccount.cpp')
-rw-r--r--kopete/protocols/groupwise/gwaccount.cpp262
1 files changed, 131 insertions, 131 deletions
diff --git a/kopete/protocols/groupwise/gwaccount.cpp b/kopete/protocols/groupwise/gwaccount.cpp
index 48ef3833..b2951233 100644
--- a/kopete/protocols/groupwise/gwaccount.cpp
+++ b/kopete/protocols/groupwise/gwaccount.cpp
@@ -20,7 +20,7 @@
#include <sys/utsname.h>
-#include <qvalidator.h>
+#include <tqvalidator.h>
#include <kaboutdata.h>
#include <kapplication.h>
@@ -65,7 +65,7 @@
#include "gwaccount.h"
-GroupWiseAccount::GroupWiseAccount( GroupWiseProtocol *parent, const QString& accountID, const char *name )
+GroupWiseAccount::GroupWiseAccount( GroupWiseProtocol *parent, const TQString& accountID, const char *name )
: Kopete::ManagedConnectionAccount ( parent, accountID, 0, "groupwiseaccount" )
{
Q_UNUSED( name );
@@ -74,17 +74,17 @@ GroupWiseAccount::GroupWiseAccount( GroupWiseProtocol *parent, const QString& ac
myself()->setOnlineStatus( GroupWiseProtocol::protocol()->groupwiseOffline );
// Contact list management
- QObject::connect( Kopete::ContactList::self(), SIGNAL( groupRenamed( Kopete::Group *, const QString & ) ),
- SLOT( slotKopeteGroupRenamed( Kopete::Group * ) ) );
- QObject::connect( Kopete::ContactList::self(), SIGNAL( groupRemoved( Kopete::Group * ) ),
- SLOT( slotKopeteGroupRemoved( Kopete::Group * ) ) );
-
- m_actionAutoReply = new KAction ( i18n( "&Set Auto-Reply..." ), QString::null, 0, this,
- SLOT( slotSetAutoReply() ), this, "actionSetAutoReply");
- m_actionJoinChatRoom = new KAction ( i18n( "&Join Channel..." ), QString::null, 0, this,
- SLOT( slotJoinChatRoom() ), this, "actionJoinChatRoom");
- m_actionManagePrivacy = new KAction ( i18n( "&Manage Privacy..." ), QString::null, 0, this,
- SLOT( slotPrivacy() ), this, "actionPrivacy");
+ TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( groupRenamed( Kopete::Group *, const TQString & ) ),
+ TQT_SLOT( slotKopeteGroupRenamed( Kopete::Group * ) ) );
+ TQObject::connect( Kopete::ContactList::self(), TQT_SIGNAL( groupRemoved( Kopete::Group * ) ),
+ TQT_SLOT( slotKopeteGroupRemoved( Kopete::Group * ) ) );
+
+ m_actionAutoReply = new KAction ( i18n( "&Set Auto-Reply..." ), TQString::null, 0, this,
+ TQT_SLOT( slotSetAutoReply() ), this, "actionSetAutoReply");
+ m_actionJoinChatRoom = new KAction ( i18n( "&Join Channel..." ), TQString::null, 0, this,
+ TQT_SLOT( slotJoinChatRoom() ), this, "actionJoinChatRoom");
+ m_actionManagePrivacy = new KAction ( i18n( "&Manage Privacy..." ), TQString::null, 0, this,
+ TQT_SLOT( slotPrivacy() ), this, "actionPrivacy");
m_connector = 0;
m_QCATLS = 0;
@@ -112,8 +112,8 @@ KActionMenu* GroupWiseAccount::actionMenu()
m_actionMenu->insert( m_actionJoinChatRoom );
/* Used for debugging */
/*
- theActionMenu->insert( new KAction ( "Test rtfize()", QString::null, 0, this,
- SLOT( slotTestRTFize() ), this,
+ theActionMenu->insert( new KAction ( "Test rtfize()", TQString::null, 0, this,
+ TQT_SLOT( slotTestRTFize() ), this,
"actionTestRTFize") );
*/
return m_actionMenu;
@@ -124,7 +124,7 @@ int GroupWiseAccount::port() const
return configGroup()->readNumEntry( "Port" );
}
-const QString GroupWiseAccount::server() const
+const TQString GroupWiseAccount::server() const
{
return configGroup()->readEntry( "Server" );
}
@@ -178,8 +178,8 @@ GroupWiseChatSession * GroupWiseAccount::chatSession( Kopete::ContactPtrList oth
m_chatSessions.append( chatSession );
// listen for the message manager telling us that the user
//has left the conference so we remove it from our map
- QObject::connect( chatSession, SIGNAL( leavingConference( GroupWiseChatSession * ) ),
- SLOT( slotLeavingConference( GroupWiseChatSession * ) ) );
+ TQObject::connect( chatSession, TQT_SIGNAL( leavingConference( GroupWiseChatSession * ) ),
+ TQT_SLOT( slotLeavingConference( GroupWiseChatSession * ) ) );
break;
}
//kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo <<
@@ -193,7 +193,7 @@ GroupWiseChatSession * GroupWiseAccount::chatSession( Kopete::ContactPtrList oth
GroupWiseChatSession * GroupWiseAccount::findChatSessionByGuid( const GroupWise::ConferenceGuid & guid )
{
GroupWiseChatSession * chatSession = 0;
- QValueList<GroupWiseChatSession *>::ConstIterator it;
+ TQValueList<GroupWiseChatSession *>::ConstIterator it;
for ( it = m_chatSessions.begin(); it != m_chatSessions.end(); ++it )
{
if ( (*it)->guid() == guid )
@@ -205,9 +205,9 @@ GroupWiseChatSession * GroupWiseAccount::findChatSessionByGuid( const GroupWise:
return chatSession;
}
-GroupWiseContact * GroupWiseAccount::contactForDN( const QString & dn )
+GroupWiseContact * GroupWiseAccount::contactForDN( const TQString & dn )
{
- QDictIterator<Kopete::Contact> it( contacts() );
+ TQDictIterator<Kopete::Contact> it( contacts() );
// check if we have a DN for them
for( ; it.current(); ++it )
{
@@ -219,12 +219,12 @@ GroupWiseContact * GroupWiseAccount::contactForDN( const QString & dn )
return static_cast< GroupWiseContact * >( contacts()[ protocol()->dnToDotted( dn ).section( '.', 0, 0 ) ] );
}
-void GroupWiseAccount::setAway( bool away, const QString & reason )
+void GroupWiseAccount::setAway( bool away, const TQString & reason )
{
if ( away )
{
if ( Kopete::Away::getInstance()->idleTime() > 10 ) // don't go AwayIdle unless the user has actually been idle this long
- setOnlineStatus( protocol()->groupwiseAwayIdle, QString::null );
+ setOnlineStatus( protocol()->groupwiseAwayIdle, TQString::null );
else
setOnlineStatus( protocol()->groupwiseAway, reason );
}
@@ -232,7 +232,7 @@ void GroupWiseAccount::setAway( bool away, const QString & reason )
setOnlineStatus( protocol()->groupwiseAvailable );
}
-void GroupWiseAccount::performConnectWithPassword( const QString &password )
+void GroupWiseAccount::performConnectWithPassword( const TQString &password )
{
if ( password.isEmpty() )
{
@@ -268,86 +268,86 @@ void GroupWiseAccount::performConnectWithPassword( const QString &password )
m_tlsHandler = new QCATLSHandler( m_QCATLS );
m_clientStream = new ClientStream( m_connector, m_tlsHandler, 0);
- QObject::connect( m_connector, SIGNAL( error() ), this, SLOT( slotConnError() ) );
- QObject::connect( m_connector, SIGNAL( connected() ), this, SLOT( slotConnConnected() ) );
+ TQObject::connect( m_connector, TQT_SIGNAL( error() ), this, TQT_SLOT( slotConnError() ) );
+ TQObject::connect( m_connector, TQT_SIGNAL( connected() ), this, TQT_SLOT( slotConnConnected() ) );
- QObject::connect (m_clientStream, SIGNAL (connectionClosed()),
- this, SLOT (slotCSDisconnected()));
- QObject::connect (m_clientStream, SIGNAL (delayedCloseFinished()),
- this, SLOT (slotCSDisconnected()));
+ TQObject::connect (m_clientStream, TQT_SIGNAL (connectionClosed()),
+ this, TQT_SLOT (slotCSDisconnected()));
+ TQObject::connect (m_clientStream, TQT_SIGNAL (delayedCloseFinished()),
+ this, TQT_SLOT (slotCSDisconnected()));
// Notify us when the transport layer is connected
- QObject::connect( m_clientStream, SIGNAL( connected() ), SLOT( slotCSConnected() ) );
+ TQObject::connect( m_clientStream, TQT_SIGNAL( connected() ), TQT_SLOT( slotCSConnected() ) );
// it's necessary to catch this signal and tell the TLS handler to proceed
// even if we don't check cert validity
- QObject::connect( m_tlsHandler, SIGNAL(tlsHandshaken()), SLOT( slotTLSHandshaken()) );
+ TQObject::connect( m_tlsHandler, TQT_SIGNAL(tlsHandshaken()), TQT_SLOT( slotTLSHandshaken()) );
// starts the client once the security layer is up, but see below
- QObject::connect( m_clientStream, SIGNAL( securityLayerActivated(int) ), SLOT( slotTLSReady(int) ) );
+ TQObject::connect( m_clientStream, TQT_SIGNAL( securityLayerActivated(int) ), TQT_SLOT( slotTLSReady(int) ) );
// we could handle login etc in start(), in which case we would emit this signal after that
- //QObject::connect (jabberClientStream, SIGNAL (authenticated()),
- // this, SLOT (slotCSAuthenticated ()));
+ //TQObject::connect (jabberClientStream, TQT_SIGNAL (authenticated()),
+ // this, TQT_SLOT (slotCSAuthenticated ()));
// we could also get do the actual login in response to this..
- //QObject::connect (m_clientStream, SIGNAL (needAuthParams(bool, bool, bool)),
- // this, SLOT (slotCSNeedAuthParams (bool, bool, bool)));
+ //TQObject::connect (m_clientStream, TQT_SIGNAL (needAuthParams(bool, bool, bool)),
+ // this, TQT_SLOT (slotCSNeedAuthParams (bool, bool, bool)));
// not implemented: warning
- QObject::connect( m_clientStream, SIGNAL( warning(int) ), SLOT( slotCSWarning(int) ) );
+ TQObject::connect( m_clientStream, TQT_SIGNAL( warning(int) ), TQT_SLOT( slotCSWarning(int) ) );
// not implemented: error
- QObject::connect( m_clientStream, SIGNAL( error(int) ), SLOT( slotCSError(int) ) );
+ TQObject::connect( m_clientStream, TQT_SIGNAL( error(int) ), TQT_SLOT( slotCSError(int) ) );
m_client = new Client( 0, CMSGPRES_GW_6_5 );
- // NB these are prefixed with QObject:: to avoid any chance of a clash with our connect() methods.
+ // NB these are prefixed with TQObject:: to avoid any chance of a clash with our connect() methods.
// we connected successfully
- QObject::connect( m_client, SIGNAL( loggedIn() ), SLOT( slotLoggedIn() ) );
+ TQObject::connect( m_client, TQT_SIGNAL( loggedIn() ), TQT_SLOT( slotLoggedIn() ) );
// or connection failed
- QObject::connect( m_client, SIGNAL( loginFailed() ), SLOT( slotLoginFailed() ) );
+ TQObject::connect( m_client, TQT_SIGNAL( loginFailed() ), TQT_SLOT( slotLoginFailed() ) );
// folder listed
- QObject::connect( m_client, SIGNAL( folderReceived( const FolderItem & ) ), SLOT( receiveFolder( const FolderItem & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( folderReceived( const FolderItem & ) ), TQT_SLOT( receiveFolder( const FolderItem & ) ) );
// contact listed
- QObject::connect( m_client, SIGNAL( contactReceived( const ContactItem & ) ), SLOT( receiveContact( const ContactItem & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( contactReceived( const ContactItem & ) ), TQT_SLOT( receiveContact( const ContactItem & ) ) );
// contact details listed
- QObject::connect( m_client, SIGNAL( contactUserDetailsReceived( const GroupWise::ContactDetails & ) ), SLOT( receiveContactUserDetails( const GroupWise::ContactDetails & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( contactUserDetailsReceived( const GroupWise::ContactDetails & ) ), TQT_SLOT( receiveContactUserDetails( const GroupWise::ContactDetails & ) ) );
// contact status changed
- QObject::connect( m_client, SIGNAL( statusReceived( const QString &, Q_UINT16, const QString & ) ), SLOT( receiveStatus( const QString &, Q_UINT16 , const QString & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( statusReceived( const TQString &, Q_UINT16, const TQString & ) ), TQT_SLOT( receiveStatus( const TQString &, Q_UINT16 , const TQString & ) ) );
// incoming message
- QObject::connect( m_client, SIGNAL( messageReceived( const ConferenceEvent & ) ), SLOT( handleIncomingMessage( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( messageReceived( const ConferenceEvent & ) ), TQT_SLOT( handleIncomingMessage( const ConferenceEvent & ) ) );
// auto reply to one of our messages because the recipient is away
- QObject::connect( m_client, SIGNAL( autoReplyReceived( const ConferenceEvent & ) ), SLOT( handleIncomingMessage( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( autoReplyReceived( const ConferenceEvent & ) ), TQT_SLOT( handleIncomingMessage( const ConferenceEvent & ) ) );
- QObject::connect( m_client, SIGNAL( ourStatusChanged( GroupWise::Status, const QString &, const QString & ) ), SLOT( changeOurStatus( GroupWise::Status, const QString &, const QString & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( ourStatusChanged( GroupWise::Status, const TQString &, const TQString & ) ), TQT_SLOT( changeOurStatus( GroupWise::Status, const TQString &, const TQString & ) ) );
// conference events
- QObject::connect( m_client,
- SIGNAL( conferenceCreated( const int, const GroupWise::ConferenceGuid & ) ),
- SIGNAL( conferenceCreated( const int, const GroupWise::ConferenceGuid & ) ) );
- QObject::connect( m_client, SIGNAL( conferenceCreationFailed( const int, const int ) ), SIGNAL( conferenceCreationFailed( const int, const int ) ) );
- QObject::connect( m_client, SIGNAL( invitationReceived( const ConferenceEvent & ) ), SLOT( receiveInvitation( const ConferenceEvent & ) ) );
- QObject::connect( m_client, SIGNAL( conferenceLeft( const ConferenceEvent & ) ), SLOT( receiveConferenceLeft( const ConferenceEvent & ) ) );
- QObject::connect( m_client, SIGNAL( conferenceJoinNotifyReceived( const ConferenceEvent & ) ), SLOT( receiveConferenceJoinNotify( const ConferenceEvent & ) ) );
- QObject::connect( m_client, SIGNAL( inviteNotifyReceived( const ConferenceEvent & ) ), SLOT( receiveInviteNotify( const ConferenceEvent & ) ) );
- QObject::connect( m_client, SIGNAL( invitationDeclined( const ConferenceEvent & ) ), SLOT( receiveInviteDeclined( const ConferenceEvent & ) ) );
-
- QObject::connect( m_client, SIGNAL( conferenceJoined( const GroupWise::ConferenceGuid &, const QStringList &, const QStringList & ) ), SLOT( receiveConferenceJoin( const GroupWise::ConferenceGuid &, const QStringList & , const QStringList & ) ) );
+ TQObject::connect( m_client,
+ TQT_SIGNAL( conferenceCreated( const int, const GroupWise::ConferenceGuid & ) ),
+ TQT_SIGNAL( conferenceCreated( const int, const GroupWise::ConferenceGuid & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( conferenceCreationFailed( const int, const int ) ), TQT_SIGNAL( conferenceCreationFailed( const int, const int ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( invitationReceived( const ConferenceEvent & ) ), TQT_SLOT( receiveInvitation( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( conferenceLeft( const ConferenceEvent & ) ), TQT_SLOT( receiveConferenceLeft( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( conferenceJoinNotifyReceived( const ConferenceEvent & ) ), TQT_SLOT( receiveConferenceJoinNotify( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( inviteNotifyReceived( const ConferenceEvent & ) ), TQT_SLOT( receiveInviteNotify( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( invitationDeclined( const ConferenceEvent & ) ), TQT_SLOT( receiveInviteDeclined( const ConferenceEvent & ) ) );
+
+ TQObject::connect( m_client, TQT_SIGNAL( conferenceJoined( const GroupWise::ConferenceGuid &, const TQStringList &, const TQStringList & ) ), TQT_SLOT( receiveConferenceJoin( const GroupWise::ConferenceGuid &, const TQStringList & , const TQStringList & ) ) );
// typing events
- QObject::connect( m_client, SIGNAL( contactTyping( const ConferenceEvent & ) ),
- SIGNAL( contactTyping( const ConferenceEvent & ) ) );
- QObject::connect( m_client, SIGNAL( contactNotTyping( const ConferenceEvent & ) ),
- SIGNAL( contactNotTyping( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( contactTyping( const ConferenceEvent & ) ),
+ TQT_SIGNAL( contactTyping( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( contactNotTyping( const ConferenceEvent & ) ),
+ TQT_SIGNAL( contactNotTyping( const ConferenceEvent & ) ) );
// misc
- QObject::connect( m_client, SIGNAL( accountDetailsReceived( const GroupWise::ContactDetails &) ), SLOT( receiveAccountDetails( const GroupWise::ContactDetails & ) ) );
- QObject::connect( m_client, SIGNAL( connectedElsewhere() ), SLOT( slotConnectedElsewhere() ) );
+ TQObject::connect( m_client, TQT_SIGNAL( accountDetailsReceived( const GroupWise::ContactDetails &) ), TQT_SLOT( receiveAccountDetails( const GroupWise::ContactDetails & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( connectedElsewhere() ), TQT_SLOT( slotConnectedElsewhere() ) );
// privacy - contacts can't connect directly to this signal because myself() is initialised before m_client
- QObject::connect( m_client->privacyManager(), SIGNAL( privacyChanged( const QString &, bool ) ), SIGNAL( privacyChanged( const QString &, bool ) ) );
+ TQObject::connect( m_client->privacyManager(), TQT_SIGNAL( privacyChanged( const TQString &, bool ) ), TQT_SIGNAL( privacyChanged( const TQString &, bool ) ) );
// GW7
- QObject::connect( m_client, SIGNAL( broadcastReceived( const ConferenceEvent & ) ), SLOT( handleIncomingMessage( const ConferenceEvent & ) ) );
- QObject::connect( m_client, SIGNAL( systemBroadcastReceived( const ConferenceEvent & ) ), SLOT( handleIncomingMessage( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( broadcastReceived( const ConferenceEvent & ) ), TQT_SLOT( handleIncomingMessage( const ConferenceEvent & ) ) );
+ TQObject::connect( m_client, TQT_SIGNAL( systemBroadcastReceived( const ConferenceEvent & ) ), TQT_SLOT( handleIncomingMessage( const ConferenceEvent & ) ) );
struct utsname utsBuf;
uname (&utsBuf);
m_client->setClientName ("Kopete");
m_client->setClientVersion ( kapp->aboutData ()->version () );
- m_client->setOSName (QString ("%1 %2").arg (utsBuf.sysname, 1).arg (utsBuf.release, 2));
+ m_client->setOSName (TQString ("%1 %2").arg (utsBuf.sysname, 1).arg (utsBuf.release, 2));
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "Connecting to GroupWise server " << server() << ":" << port() << endl;
@@ -358,7 +358,7 @@ void GroupWiseAccount::performConnectWithPassword( const QString &password )
myself()->setOnlineStatus( protocol()->groupwiseConnecting );
m_client->connectToServer( m_clientStream, dn, true );
- QObject::connect( m_client, SIGNAL( messageSendingFailed() ), SLOT( slotMessageSendingFailed() ) );
+ TQObject::connect( m_client, TQT_SIGNAL( messageSendingFailed() ), TQT_SLOT( slotMessageSendingFailed() ) );
}
void GroupWiseAccount::slotMessageSendingFailed()
@@ -367,7 +367,7 @@ void GroupWiseAccount::slotMessageSendingFailed()
i18n("Message Sending Failed", "Kopete was not able to send the last message sent on account '%1'.\nIf possible, please send the console output from Kopete to <[email protected]> for analysis." ).arg( accountId() ) , i18n ("Unable to Send Message on Account '%1'").arg( accountId() ) );
}
-void GroupWiseAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const QString &reason )
+void GroupWiseAccount::setOnlineStatus( const Kopete::OnlineStatus& status, const TQString &reason )
{
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl;
if ( status == protocol()->groupwiseUnknown
@@ -415,7 +415,7 @@ void GroupWiseAccount::disconnect( Kopete::Account::DisconnectReason reason )
if( isConnected () )
{
kdDebug (GROUPWISE_DEBUG_GLOBAL) << k_funcinfo << "Still connected, closing connection..." << endl;
- QValueList<GroupWiseChatSession *>::ConstIterator it;
+ TQValueList<GroupWiseChatSession *>::ConstIterator it;
for ( it = m_chatSessions.begin() ; it != m_chatSessions.end(); ++it )
(*it)->setClosed();
@@ -448,7 +448,7 @@ void GroupWiseAccount::cleanup()
m_client = 0;
}
-void GroupWiseAccount::createConference( const int clientId, const QStringList& invitees )
+void GroupWiseAccount::createConference( const int clientId, const TQStringList& invitees )
{
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl;
// TODO: remove this it prevents sending a list of participants with the createconf
@@ -456,7 +456,7 @@ void GroupWiseAccount::createConference( const int clientId, const QStringList&
m_client->createConference( clientId , invitees );
}
-void GroupWiseAccount::sendInvitation( const GroupWise::ConferenceGuid & guid, const QString & dn, const QString & message )
+void GroupWiseAccount::sendInvitation( const GroupWise::ConferenceGuid & guid, const TQString & dn, const TQString & message )
{
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl;
if ( isConnected() )
@@ -508,7 +508,7 @@ void GroupWiseAccount::reconcileOfflineChanges()
// // affecting other protocols' contacts
// set flag to warn user that incompatible changes were made on other client
bool conflicts = false;
- QDictIterator<Kopete::Contact> it( contacts() );
+ TQDictIterator<Kopete::Contact> it( contacts() );
for ( ; it.current(); ++it )
{
if ( *it == myself() )
@@ -516,17 +516,17 @@ void GroupWiseAccount::reconcileOfflineChanges()
GroupWiseContact * c = static_cast< GroupWiseContact *>( *it );
GWContactInstanceList instances = m_serverListModel->instancesWithDn( c->dn() );
- QPtrList<Kopete::Group> groups = c->metaContact()->groups();
- QPtrListIterator<Kopete::Group> grpIt( groups );
+ TQPtrList<Kopete::Group> groups = c->metaContact()->groups();
+ TQPtrListIterator<Kopete::Group> grpIt( groups );
while ( *grpIt )
{
- QPtrListIterator<Kopete::Group> candidate = grpIt;
+ TQPtrListIterator<Kopete::Group> candidate = grpIt;
++grpIt;
bool found = false;
GWContactInstanceList::Iterator instIt = instances.begin();
for ( ; instIt != instances.end(); ++instIt )
{
- QString groupId = ( *candidate )->pluginData( protocol(), accountId() + " objectId" );
+ TQString groupId = ( *candidate )->pluginData( protocol(), accountId() + " objectId" );
if ( groupId.isEmpty() )
if ( *candidate == Kopete::Group::topLevel() )
groupId = "0"; // hack the top level's objectId to 0
@@ -590,7 +590,7 @@ void GroupWiseAccount::slotKopeteGroupRenamed( Kopete::Group * renamedGroup )
{
if ( isConnected() )
{
- QString objectIdString = renamedGroup->pluginData( protocol(), accountId() + " objectId" );
+ TQString objectIdString = renamedGroup->pluginData( protocol(), accountId() + " objectId" );
// if this group exists on the server
if ( !objectIdString.isEmpty() )
{
@@ -623,7 +623,7 @@ void GroupWiseAccount::slotKopeteGroupRemoved( Kopete::Group * group )
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << endl;
// the member contacts should be deleted separately, so just delete the folder here
// get the folder object id
- QString objectIdString = group->pluginData( protocol(), accountId() + " objectId" );
+ TQString objectIdString = group->pluginData( protocol(), accountId() + " objectId" );
if ( !objectIdString.isEmpty() )
{
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "deleting folder with objectId: " << objectIdString << endl;
@@ -661,7 +661,7 @@ void GroupWiseAccount::slotCSDisconnected()
{
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "Disconnected from Groupwise server." << endl;
myself()->setOnlineStatus( protocol()->groupwiseOffline );
- QValueList<GroupWiseChatSession *>::ConstIterator it;
+ TQValueList<GroupWiseChatSession *>::ConstIterator it;
for ( it = m_chatSessions.begin() ; it != m_chatSessions.end(); ++it )
(*it)->setClosed();
setAllContactsStatus( protocol()->groupwiseOffline );
@@ -710,9 +710,9 @@ void GroupWiseAccount::slotTLSHandshaken()
}
}
-int GroupWiseAccount::handleTLSWarning (int warning, QString server, QString accountId)
+int GroupWiseAccount::handleTLSWarning (int warning, TQString server, TQString accountId)
{
- QString validityString, code;
+ TQString validityString, code;
switch(warning)
{
@@ -776,7 +776,7 @@ int GroupWiseAccount::handleTLSWarning (int warning, QString server, QString acc
arg(validityString),
i18n("GroupWise Connection Certificate Problem"),
KStdGuiItem::cont(),
- QString("KopeteTLSWarning") + server + code);
+ TQString("KopeteTLSWarning") + server + code);
}
void GroupWiseAccount::slotTLSReady( int secLayerCode )
@@ -789,7 +789,7 @@ void GroupWiseAccount::slotTLSReady( int secLayerCode )
void GroupWiseAccount::handleIncomingMessage( const ConferenceEvent & message )
{
- QString typeName = "UNKNOWN";
+ TQString typeName = "UNKNOWN";
if ( message.type == ReceiveMessage )
typeName = "message";
else if ( message.type == ReceiveAutoReply )
@@ -818,23 +818,23 @@ void GroupWiseAccount::handleIncomingMessage( const ConferenceEvent & message )
GroupWiseChatSession *sess = chatSession( contactList, message.guid, Kopete::Contact::CanCreate );
// add an auto-reply indicator if needed
- QString messageMunged = message.message;
+ TQString messageMunged = message.message;
if ( message.type == ReceiveAutoReply )
{
- QString prefix = i18n("Prefix used for automatically generated auto-reply"
+ TQString prefix = i18n("Prefix used for automatically generated auto-reply"
" messages when the contact is Away, contains contact's name",
"Auto reply from %1: " ).arg( sender->metaContact()->displayName() );
messageMunged = prefix + message.message;
}
if ( message.type == GroupWise::ReceivedBroadcast )
{
- QString prefix = i18n("Prefix used for broadcast messages",
+ TQString prefix = i18n("Prefix used for broadcast messages",
"Broadcast message from %1: " ).arg( sender->metaContact()->displayName() );
messageMunged = prefix + message.message;
}
if ( message.type == GroupWise::ReceivedSystemBroadcast )
{
- QString prefix = i18n("Prefix used for system broadcast messages",
+ TQString prefix = i18n("Prefix used for system broadcast messages",
"System Broadcast message from %1: " ).arg( sender->metaContact()->displayName() );
messageMunged = prefix + message.message;
}
@@ -868,15 +868,15 @@ void GroupWiseAccount::receiveFolder( const FolderItem & folder )
// either find a local group and record these details there, or create a new group to suit
Kopete::Group * found = 0;
- QPtrList<Kopete::Group> groupList = Kopete::ContactList::self()->groups();
+ TQPtrList<Kopete::Group> groupList = Kopete::ContactList::self()->groups();
for ( Kopete::Group *grp = groupList.first(); grp; grp = groupList.next() )
{
// see if there is already a local group that matches this group
- QString groupId = grp->pluginData( protocol(), accountId() + " objectId" );
+ TQString groupId = grp->pluginData( protocol(), accountId() + " objectId" );
if ( groupId.isEmpty() )
if ( folder.name == grp->displayName() ) // no match on id, match on display name instead
{
- grp->setPluginData( protocol(), accountId() + " objectId", QString::number( folder.id ) );
+ grp->setPluginData( protocol(), accountId() + " objectId", TQString::number( folder.id ) );
found = grp;
break;
}
@@ -900,7 +900,7 @@ void GroupWiseAccount::receiveFolder( const FolderItem & folder )
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << " - not found locally, creating Kopete::Group" << endl;
Kopete::Group * grp = new Kopete::Group( folder.name );
grp->setPluginData( protocol(), accountId() + " serverDisplayName", folder.name );
- grp->setPluginData( protocol(), accountId() + " objectId", QString::number( folder.id ) );
+ grp->setPluginData( protocol(), accountId() + " objectId", TQString::number( folder.id ) );
Kopete::ContactList::self()->addGroup( grp );
}
}
@@ -940,7 +940,7 @@ void GroupWiseAccount::receiveContact( const ContactItem & contact )
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << " - ERROR - contact's folder doesn't exist on server" << endl;
DeleteItemTask * dit = new DeleteItemTask( client()->rootTask() );
dit->item( contact.parentId, contact.id );
-// QObject::connect( dit, SIGNAL( gotContactDeleted( const ContactItem & ) ), SLOT( receiveContactDeleted( const ContactItem & ) ) );
+// TQObject::connect( dit, TQT_SIGNAL( gotContactDeleted( const ContactItem & ) ), TQT_SLOT( receiveContactDeleted( const ContactItem & ) ) );
dit->go( true );
return;
}
@@ -1019,7 +1019,7 @@ void GroupWiseAccount::receiveContactUserDetails( const ContactDetails & details
}
}
-GroupWiseContact * GroupWiseAccount::createTemporaryContact( const QString & dn )
+GroupWiseContact * GroupWiseAccount::createTemporaryContact( const TQString & dn )
{
ContactDetails details = client()->userDetailsManager()->details( dn );
GroupWiseContact * c = static_cast<GroupWiseContact *>( contacts()[ details.dn.lower() ] );
@@ -1029,7 +1029,7 @@ GroupWiseContact * GroupWiseAccount::createTemporaryContact( const QString & dn
// the client is telling us about a temporary contact we need to know about so add them
Kopete::MetaContact *metaContact = new Kopete::MetaContact ();
metaContact->setTemporary (true);
- QString displayName = details.fullName;
+ TQString displayName = details.fullName;
if ( displayName.isEmpty() )
displayName = details.givenName + " " + details.surname;
@@ -1047,7 +1047,7 @@ GroupWiseContact * GroupWiseAccount::createTemporaryContact( const QString & dn
return c;
}
-void GroupWiseAccount::receiveStatus( const QString & contactId, Q_UINT16 status, const QString &awayMessage )
+void GroupWiseAccount::receiveStatus( const TQString & contactId, Q_UINT16 status, const TQString &awayMessage )
{
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "got status for: " << contactId << ", status: " << status << ", away message: " << awayMessage << endl;
GroupWiseContact * c = contactForDN( contactId );
@@ -1062,7 +1062,7 @@ void GroupWiseAccount::receiveStatus( const QString & contactId, Q_UINT16 status
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << " couldn't find " << contactId << endl;
}
-void GroupWiseAccount::changeOurStatus( GroupWise::Status status, const QString & awayMessage, const QString & autoReply )
+void GroupWiseAccount::changeOurStatus( GroupWise::Status status, const TQString & awayMessage, const TQString & autoReply )
{
if ( status == GroupWise::Offline )
myself()->setOnlineStatus( protocol()->groupwiseAppearOffline );
@@ -1083,7 +1083,7 @@ void GroupWiseAccount::sendMessage( const GroupWise::ConferenceGuid &guid, const
outMsg.message = message.plainBody();
outMsg.rtfMessage = protocol()->rtfizeText( message.plainBody() );
// make a list of DNs to send to
- QStringList addresseeDNs;
+ TQStringList addresseeDNs;
Kopete::ContactPtrList addressees = message.to();
for ( Kopete::Contact * contact = addressees.first(); contact; contact = addressees.next() )
addresseeDNs.append( static_cast< GroupWiseContact* >( contact )->dn() );
@@ -1092,7 +1092,7 @@ void GroupWiseAccount::sendMessage( const GroupWise::ConferenceGuid &guid, const
}
}
-bool GroupWiseAccount::createContact( const QString& contactId, Kopete::MetaContact* parentContact )
+bool GroupWiseAccount::createContact( const TQString& contactId, Kopete::MetaContact* parentContact )
{
kdDebug ( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << "contactId: " << contactId << endl;
@@ -1100,7 +1100,7 @@ bool GroupWiseAccount::createContact( const QString& contactId, Kopete::MetaCont
// record, in a folderitem, their display names and groupwise object id
// Set object id to 0 if not found - they do not exist on the server
bool topLevel = false;
- QValueList< FolderItem > folders;
+ TQValueList< FolderItem > folders;
Kopete::GroupList groupList = parentContact->groups();
for ( Kopete::Group *group = groupList.first(); group; group = groupList.next() )
{
@@ -1146,7 +1146,7 @@ bool GroupWiseAccount::createContact( const QString& contactId, Kopete::MetaCont
// we have to create the contact optimistically.
GroupWiseContact * gc = new GroupWiseContact( this, contactId, parentContact, 0, 0, 0 );
ContactDetails dt = client()->userDetailsManager()->details( contactId );
- QString displayAs;
+ TQString displayAs;
if ( dt.fullName.isEmpty() )
displayAs = dt.givenName + " " + dt.surname;
else
@@ -1165,7 +1165,7 @@ bool GroupWiseAccount::createContact( const QString& contactId, Kopete::MetaCont
// get the contact's full name to use as the display name of the created contact
CreateContactTask * cct = new CreateContactTask( client()->rootTask() );
cct->contactFromUserId( contactId, parentContact->displayName(), highestFreeSequence, folders, topLevel );
- QObject::connect( cct, SIGNAL( finished() ), SLOT( receiveContactCreated() ) );
+ TQObject::connect( cct, TQT_SIGNAL( finished() ), TQT_SLOT( receiveContactCreated() ) );
cct->go( true );
return true;
}
@@ -1188,7 +1188,7 @@ void GroupWiseAccount::receiveContactCreated()
}
else
{
- client()->requestDetails( QStringList( cct->dn() ) );
+ client()->requestDetails( TQStringList( cct->dn() ) );
client()->requestStatus( cct->dn() );
}
}
@@ -1228,7 +1228,7 @@ void GroupWiseAccount::deleteContact( GroupWiseContact * contact )
{
DeleteItemTask * dit = new DeleteItemTask( client()->rootTask() );
dit->item( ::qt_cast<GWFolder*>( (*it)->parent() )->id, (*it)->id );
- QObject::connect( dit, SIGNAL( gotContactDeleted( const ContactItem & ) ), SLOT( receiveContactDeleted( const ContactItem & ) ) );
+ TQObject::connect( dit, TQT_SIGNAL( gotContactDeleted( const ContactItem & ) ), TQT_SLOT( receiveContactDeleted( const ContactItem & ) ) );
dit->go( true );
}
}
@@ -1279,13 +1279,13 @@ void GroupWiseAccount::receiveInvitation( const ConferenceEvent & event )
}
-void GroupWiseAccount::receiveConferenceJoin( const GroupWise::ConferenceGuid & guid, const QStringList & participants, const QStringList & invitees )
+void GroupWiseAccount::receiveConferenceJoin( const GroupWise::ConferenceGuid & guid, const TQStringList & participants, const TQStringList & invitees )
{
// get a new GWMM
Kopete::ContactPtrList others;
GroupWiseChatSession * sess = chatSession( others, guid, Kopete::Contact::CanCreate);
// find each contact and add them to the GWMM, and tell them they are in the conference
- for ( QValueList<QString>::ConstIterator it = participants.begin(); it != participants.end(); ++it )
+ for ( TQValueList<TQString>::ConstIterator it = participants.begin(); it != participants.end(); ++it )
{
//kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << " adding participant " << *it << endl;
GroupWiseContact * c = contactForDN( *it );
@@ -1294,7 +1294,7 @@ void GroupWiseAccount::receiveConferenceJoin( const GroupWise::ConferenceGuid &
sess->joined( c );
}
// add each invitee too
- for ( QValueList<QString>::ConstIterator it = invitees.begin(); it != invitees.end(); ++it )
+ for ( TQValueList<TQString>::ConstIterator it = invitees.begin(); it != invitees.end(); ++it )
{
//kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << " adding invitee " << *it << endl;
GroupWiseContact * c = contactForDN( *it );
@@ -1388,9 +1388,9 @@ void GroupWiseAccount::slotLeavingConference( GroupWiseChatSession * sess )
void GroupWiseAccount::slotSetAutoReply()
{
bool ok;
- QRegExp rx( ".*" );
- QRegExpValidator validator( rx, this );
- QString newAutoReply = KInputDialog::getText( i18n( "Enter Auto-Reply Message" ),
+ TQRegExp rx( ".*" );
+ TQRegExpValidator validator( rx, this );
+ TQString newAutoReply = KInputDialog::getText( i18n( "Enter Auto-Reply Message" ),
i18n( "Please enter an Auto-Reply message that will be shown to users who message you while Away or Busy" ), configGroup()->readEntry( "AutoReply" ),
&ok, Kopete::UI::Global::mainWidget(), "autoreplymessagedlg", &validator );
if ( ok )
@@ -1400,14 +1400,14 @@ void GroupWiseAccount::slotSetAutoReply()
void GroupWiseAccount::slotTestRTFize()
{
/* bool ok;
- const QString query = QString::fromLatin1("Enter a string to rtfize:");
- QString testText = KLineEditDlg::getText( query, QString::null, &ok, Kopete::UI::Global::mainWidget() );
+ const TQString query = TQString::fromLatin1("Enter a string to rtfize:");
+ TQString testText = KLineEditDlg::getText( query, TQString::null, &ok, Kopete::UI::Global::mainWidget() );
if ( ok )
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "Converted text is: '" << protocol()->rtfizeText( testText ) << "'" << endl;*/
// bool ok;
-// const QString query = i18n("Enter a contactId:");
-// QString testText = KInputDialog::getText( query, i18n("This is a test dialog and will not be in the final product!" ), QString::null, &ok, Kopete::UI::Global::mainWidget() );
+// const TQString query = i18n("Enter a contactId:");
+// TQString testText = KInputDialog::getText( query, i18n("This is a test dialog and will not be in the final product!" ), TQString::null, &ok, Kopete::UI::Global::mainWidget() );
// if ( !ok )
// return;
// kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "Trying to add contact: '" << protocol()->rtfizeText( testText ) << "'" << endl;
@@ -1427,7 +1427,7 @@ void GroupWiseAccount::slotJoinChatRoom()
new GroupWiseChatSearchDialog( this, Kopete::UI::Global::mainWidget(), "gwjoinchatdialog" );
}
-bool GroupWiseAccount::isContactBlocked( const QString & dn )
+bool GroupWiseAccount::isContactBlocked( const TQString & dn )
{
if ( isConnected() )
return client()->privacyManager()->isBlocked( dn );
@@ -1439,7 +1439,7 @@ void GroupWiseAccount::dumpManagers()
{
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << k_funcinfo << " for: " << accountId()
<< " containing: " << m_chatSessions.count() << " managers " << endl;
- QValueList<GroupWiseChatSession *>::ConstIterator it;
+ TQValueList<GroupWiseChatSession *>::ConstIterator it;
for ( it = m_chatSessions.begin() ; it != m_chatSessions.end(); ++it )
kdDebug( GROUPWISE_DEBUG_GLOBAL ) << "guid: " << (*it)->guid() << endl;
}
@@ -1479,16 +1479,16 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact )
int nextFreeSequence = m_serverListModel->maxSequenceNumber() + 1;
// 1)
// make a list of all the groups the metacontact is in
- QPtrList<Kopete::Group> groupList = contact->metaContact()->groups();
+ TQPtrList<Kopete::Group> groupList = contact->metaContact()->groups();
// make a list of all the groups this contact is in, according to the server model
GWContactInstanceList instances = m_serverListModel->instancesWithDn( contact->dn() );
// seek corresponding pairs in both lists and remove
// ( for each group )
- QPtrListIterator< Kopete::Group > grpIt( groupList );
+ TQPtrListIterator< Kopete::Group > grpIt( groupList );
while ( *grpIt )
{
- QPtrListIterator< Kopete::Group > candidateGrp( groupList );
+ TQPtrListIterator< Kopete::Group > candidateGrp( groupList );
candidateGrp = grpIt;
++grpIt;
@@ -1521,7 +1521,7 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact )
// ( take the first pair and carry out a move )
while ( *grpIt && !instances.isEmpty() )
{
- QPtrListIterator< Kopete::Group > candidateGrp( groupList );
+ TQPtrListIterator< Kopete::Group > candidateGrp( groupList );
candidateGrp = grpIt;
++grpIt;
GWContactInstanceList::Iterator instIt = instances.begin();
@@ -1541,21 +1541,21 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact )
{
MoveContactTask * mit = new MoveContactTask( client()->rootTask() );
mit->moveContact( instance, destinationFolder->id );
- QObject::connect( mit, SIGNAL( gotContactDeleted( const ContactItem & ) ), SLOT( receiveContactDeleted( const ContactItem & ) ) );
+ TQObject::connect( mit, TQT_SIGNAL( gotContactDeleted( const ContactItem & ) ), TQT_SLOT( receiveContactDeleted( const ContactItem & ) ) );
mit->go();
}
else if ( *candidateGrp == Kopete::Group::topLevel() )
{
MoveContactTask * mit = new MoveContactTask( client()->rootTask() );
mit->moveContact( instance, 0 );
- QObject::connect( mit, SIGNAL( gotContactDeleted( const ContactItem & ) ), SLOT( receiveContactDeleted( const ContactItem & ) ) );
+ TQObject::connect( mit, TQT_SIGNAL( gotContactDeleted( const ContactItem & ) ), TQT_SLOT( receiveContactDeleted( const ContactItem & ) ) );
mit->go();
}
else
{
MoveContactTask * mit = new MoveContactTask( client()->rootTask() );
- QObject::connect( mit, SIGNAL( gotContactDeleted( const ContactItem & ) ),
- SLOT( receiveContactDeleted( const ContactItem & ) ) );
+ TQObject::connect( mit, TQT_SIGNAL( gotContactDeleted( const ContactItem & ) ),
+ TQT_SLOT( receiveContactDeleted( const ContactItem & ) ) );
// discover the next free sequence number and add the group using that
mit->moveContactToNewFolder( instance, nextFreeSequence++,
( *candidateGrp )->displayName() );
@@ -1569,7 +1569,7 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact )
grpIt.toFirst();
while ( *grpIt )
{
- QPtrListIterator< Kopete::Group > candidateGrp( groupList );
+ TQPtrListIterator< Kopete::Group > candidateGrp( groupList );
candidateGrp = grpIt;
++grpIt;
GWFolder * destinationFolder = m_serverListModel->findFolderByName( ( ( *candidateGrp )->displayName() ) );
@@ -1609,7 +1609,7 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact )
DeleteItemTask * dit = new DeleteItemTask( client()->rootTask() );
dit->item( folder->id, (*candidateInst)->id );
- QObject::connect( dit, SIGNAL( gotContactDeleted( const ContactItem & ) ), SLOT( receiveContactDeleted( const ContactItem & ) ) );
+ TQObject::connect( dit, TQT_SIGNAL( gotContactDeleted( const ContactItem & ) ), TQT_SLOT( receiveContactDeleted( const ContactItem & ) ) );
dit->go( true );
instances.remove( candidateInst );
@@ -1625,7 +1625,7 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact )
const GWContactInstanceList::Iterator end = instances.end();
for ( ; it != end; ++it )
{
- QValueList< ContactItem > instancesToChange;
+ TQValueList< ContactItem > instancesToChange;
ContactItem instance;
instance.id = (*it)->id;
instance.parentId = ::qt_cast<GWFolder *>( (*it)->parent() )->id;
@@ -1636,7 +1636,7 @@ void GroupWiseAccount::syncContact( GroupWiseContact * contact )
UpdateContactTask * uct = new UpdateContactTask( client()->rootTask() );
uct->renameContact( contact->metaContact()->displayName(), instancesToChange );
- QObject::connect ( uct, SIGNAL( finished() ), contact, SLOT( renamedOnServer() ) );
+ TQObject::connect ( uct, TQT_SIGNAL( finished() ), contact, TQT_SLOT( renamedOnServer() ) );
uct->go( true );
}
}