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/jabbercontact.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/jabbercontact.cpp')
-rw-r--r-- | kopete/protocols/jabber/jabbercontact.cpp | 192 |
1 files changed, 96 insertions, 96 deletions
diff --git a/kopete/protocols/jabber/jabbercontact.cpp b/kopete/protocols/jabber/jabbercontact.cpp index c8589e1e..840f9cf3 100644 --- a/kopete/protocols/jabber/jabbercontact.cpp +++ b/kopete/protocols/jabber/jabbercontact.cpp @@ -21,12 +21,12 @@ #include "xmpp_tasks.h" #include "im.h" -#include <qtimer.h> -#include <qdatetime.h> -#include <qstylesheet.h> -#include <qimage.h> -#include <qregexp.h> -#include <qbuffer.h> +#include <tqtimer.h> +#include <tqdatetime.h> +#include <tqstylesheet.h> +#include <tqimage.h> +#include <tqregexp.h> +#include <tqbuffer.h> #include <kdebug.h> #include <klocale.h> @@ -63,7 +63,7 @@ /** * JabberContact constructor */ -JabberContact::JabberContact (const XMPP::RosterItem &rosterItem, Kopete::Account *_account, Kopete::MetaContact * mc, const QString &legacyId) +JabberContact::JabberContact (const XMPP::RosterItem &rosterItem, Kopete::Account *_account, Kopete::MetaContact * mc, const TQString &legacyId) : JabberBaseContact ( rosterItem, _account, mc, legacyId) , mDiscoDone(false), m_syncTimer(0L) { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << contactId() << " is created - " << this << endl; @@ -89,19 +89,19 @@ JabberContact::JabberContact (const XMPP::RosterItem &rosterItem, Kopete::Accoun { // this contact is a regular contact connect ( this, - SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT ( slotCheckVCard () ) ); + TQT_SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT ( slotCheckVCard () ) ); } else { // this contact is the myself instance connect ( account()->myself (), - SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT ( slotCheckVCard () ) ); + TQT_SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT ( slotCheckVCard () ) ); connect ( account()->myself (), - SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), - this, SLOT ( slotCheckLastActivity ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); + TQT_SIGNAL ( onlineStatusChanged ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ), + this, TQT_SLOT ( slotCheckLastActivity ( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) ); /* * Trigger update once if we're already connected for contacts @@ -127,44 +127,44 @@ JabberContact::~JabberContact() kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << contactId() << " is destroyed - " << this << endl; } -QPtrList<KAction> *JabberContact::customContextMenuActions () +TQPtrList<KAction> *JabberContact::customContextMenuActions () { - QPtrList<KAction> *actionCollection = new QPtrList<KAction>(); + TQPtrList<KAction> *actionCollection = new TQPtrList<KAction>(); KActionMenu *actionAuthorization = new KActionMenu ( i18n ("Authorization"), "connect_established", this, "jabber_authorization"); KAction *resendAuthAction, *requestAuthAction, *removeAuthAction; resendAuthAction = new KAction (i18n ("(Re)send Authorization To"), "mail_forward", 0, - this, SLOT (slotSendAuth ()), actionAuthorization, "actionSendAuth"); + this, TQT_SLOT (slotSendAuth ()), actionAuthorization, "actionSendAuth"); resendAuthAction->setEnabled( mRosterItem.subscription().type() == XMPP::Subscription::To || mRosterItem.subscription().type() == XMPP::Subscription::None ); actionAuthorization->insert(resendAuthAction); requestAuthAction = new KAction (i18n ("(Re)request Authorization From"), "mail_reply", 0, - this, SLOT (slotRequestAuth ()), actionAuthorization, "actionRequestAuth"); + this, TQT_SLOT (slotRequestAuth ()), actionAuthorization, "actionRequestAuth"); requestAuthAction->setEnabled( mRosterItem.subscription().type() == XMPP::Subscription::From || mRosterItem.subscription().type() == XMPP::Subscription::None ); actionAuthorization->insert(requestAuthAction); removeAuthAction = new KAction (i18n ("Remove Authorization From"), "mail_delete", 0, - this, SLOT (slotRemoveAuth ()), actionAuthorization, "actionRemoveAuth"); + this, TQT_SLOT (slotRemoveAuth ()), actionAuthorization, "actionRemoveAuth"); removeAuthAction->setEnabled( mRosterItem.subscription().type() == XMPP::Subscription::Both || mRosterItem.subscription().type() == XMPP::Subscription::From ); actionAuthorization->insert(removeAuthAction); KActionMenu *actionSetAvailability = new KActionMenu (i18n ("Set Availability"), "kopeteavailable", this, "jabber_online"); actionSetAvailability->insert(new KAction (i18n ("Online"), protocol()->JabberKOSOnline.iconFor(this), - 0, this, SLOT (slotStatusOnline ()), actionSetAvailability, "actionOnline")); + 0, this, TQT_SLOT (slotStatusOnline ()), actionSetAvailability, "actionOnline")); actionSetAvailability->insert(new KAction (i18n ("Free to Chat"), protocol()->JabberKOSChatty.iconFor(this), - 0, this, SLOT (slotStatusChatty ()), actionSetAvailability, "actionChatty")); + 0, this, TQT_SLOT (slotStatusChatty ()), actionSetAvailability, "actionChatty")); actionSetAvailability->insert(new KAction (i18n ("Away"), protocol()->JabberKOSAway.iconFor(this), - 0, this, SLOT (slotStatusAway ()), actionSetAvailability, "actionAway")); + 0, this, TQT_SLOT (slotStatusAway ()), actionSetAvailability, "actionAway")); actionSetAvailability->insert(new KAction (i18n ("Extended Away"), protocol()->JabberKOSXA.iconFor(this), - 0, this, SLOT (slotStatusXA ()), actionSetAvailability, "actionXA")); + 0, this, TQT_SLOT (slotStatusXA ()), actionSetAvailability, "actionXA")); actionSetAvailability->insert(new KAction (i18n ("Do Not Disturb"), protocol()->JabberKOSDND.iconFor(this), - 0, this, SLOT (slotStatusDND ()), actionSetAvailability, "actionDND")); + 0, this, TQT_SLOT (slotStatusDND ()), actionSetAvailability, "actionDND")); actionSetAvailability->insert(new KAction (i18n ("Invisible"), protocol()->JabberKOSInvisible.iconFor(this), - 0, this, SLOT (slotStatusInvisible ()), actionSetAvailability, "actionInvisible")); + 0, this, TQT_SLOT (slotStatusInvisible ()), actionSetAvailability, "actionInvisible")); KActionMenu *actionSelectResource = new KActionMenu (i18n ("Select Resource"), "connect_no", this, "actionSelectResource"); @@ -176,7 +176,7 @@ QPtrList<KAction> *JabberContact::customContextMenuActions () } else { - QStringList items; + TQStringList items; XMPP::ResourceList availableResources; int activeItem = 0, i = 1; @@ -198,13 +198,13 @@ QPtrList<KAction> *JabberContact::customContextMenuActions () // now go through the string list and add the resources with their icons i = 0; - QStringList::const_iterator itemsEnd = items.end (); - for(QStringList::const_iterator it = items.begin(); it != itemsEnd; ++it) + TQStringList::const_iterator itemsEnd = items.end (); + for(TQStringList::const_iterator it = items.begin(); it != itemsEnd; ++it) { if( i == activeItem ) { - actionSelectResource->insert ( new KAction( ( *it ), "button_ok", 0, this, SLOT( slotSelectResource() ), - actionSelectResource, QString::number( i ).latin1() ) ); + actionSelectResource->insert ( new KAction( ( *it ), "button_ok", 0, this, TQT_SLOT( slotSelectResource() ), + actionSelectResource, TQString::number( i ).latin1() ) ); } else { @@ -212,11 +212,11 @@ QPtrList<KAction> *JabberContact::customContextMenuActions () * Select icon, using bestResource() without lock for the automatic entry * and the resources' respective status icons for the rest. */ - QIconSet iconSet ( !i ? + TQIconSet iconSet ( !i ? protocol()->resourceToKOS ( account()->resourcePool()->bestResource ( mRosterItem.jid(), false ) ).iconFor ( account () ) : protocol()->resourceToKOS ( *availableResources.find(*it) ).iconFor ( account () )); - actionSelectResource->insert ( new KAction( ( *it ), iconSet, 0, this, SLOT( slotSelectResource() ), - actionSelectResource, QString::number( i ).latin1() ) ); + actionSelectResource->insert ( new KAction( ( *it ), iconSet, 0, this, TQT_SLOT( slotSelectResource() ), + actionSelectResource, TQString::number( i ).latin1() ) ); } i++; @@ -230,7 +230,7 @@ QPtrList<KAction> *JabberContact::customContextMenuActions () #ifdef SUPPORT_JINGLE - KAction *actionVoiceCall = new KAction (i18n ("Voice call"), "voicecall", 0, this, SLOT (voiceCall ()), this, "jabber_voicecall"); + KAction *actionVoiceCall = new KAction (i18n ("Voice call"), "voicecall", 0, this, TQT_SLOT (voiceCall ()), this, "jabber_voicecall"); actionVoiceCall->setEnabled( false ); actionCollection->append( actionVoiceCall ); @@ -248,7 +248,7 @@ QPtrList<KAction> *JabberContact::customContextMenuActions () void JabberContact::handleIncomingMessage (const XMPP::Message & message) { - QString viewPlugin; + TQString viewPlugin; Kopete::Message *newMessage = 0L; kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Received Message Type:" << message.type () << endl; @@ -261,17 +261,17 @@ void JabberContact::handleIncomingMessage (const XMPP::Message & message) { if (!message.invite().isEmpty()) { - QString room=message.invite(); - QString originalBody=message.body().isEmpty() ? QString() : - i18n( "The original message is : <i>\" %1 \"</i><br>" ).arg(QStyleSheet::escape(message.body())); - QString mes=i18n("<qt><i>%1</i> invited you to join the conference <b>%2</b><br>%3<br>" + TQString room=message.invite(); + TQString originalBody=message.body().isEmpty() ? TQString() : + i18n( "The original message is : <i>\" %1 \"</i><br>" ).arg(TQStyleSheet::escape(message.body())); + TQString mes=i18n("<qt><i>%1</i> invited you to join the conference <b>%2</b><br>%3<br>" "If you want to accept and join, just <b>enter your nickname</b> and press ok<br>" "If you want to decline, press cancel</qt>") .arg(message.from().full(), room , originalBody); bool ok=false; - QString futureNewNickName = KInputDialog::getText( i18n( "Invited to a conference - Jabber Plugin" ), - mes, QString() , &ok , (mManager ? dynamic_cast<QWidget*>(mManager->view(false)) : 0) ); + TQString futureNewNickName = KInputDialog::getText( i18n( "Invited to a conference - Jabber Plugin" ), + mes, TQString() , &ok , (mManager ? dynamic_cast<TQWidget*>(mManager->view(false)) : 0) ); if ( !ok || !account()->isConnected() || futureNewNickName.isEmpty() ) return; @@ -347,11 +347,11 @@ void JabberContact::handleIncomingMessage (const XMPP::Message & message) mLastReceivedMessageId = message.id (); // retrieve and reformat body - QString body = message.body (); - QString xHTMLBody; + TQString body = message.body (); + TQString xHTMLBody; if( !message.xencrypted().isEmpty () ) { - body = QString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + QString ("\n-----END PGP MESSAGE-----\n"); + body = TQString ("-----BEGIN PGP MESSAGE-----\n\n") + message.xencrypted () + TQString ("\n-----END PGP MESSAGE-----\n"); } else { @@ -393,11 +393,11 @@ void JabberContact::handleIncomingMessage (const XMPP::Message & message) for ( XMPP::UrlList::const_iterator it = urlList.begin (); it != urlList.end (); ++it ) { - QString description = (*it).desc().isEmpty() ? (*it).url() : QStyleSheet::escape ( (*it).desc() ); - QString url = (*it).url (); + TQString description = (*it).desc().isEmpty() ? (*it).url() : TQStyleSheet::escape ( (*it).desc() ); + TQString url = (*it).url (); newMessage = new Kopete::Message ( message.timeStamp (), this, contactList, - QString ( "<a href=\"%1\">%2</a>" ).arg ( url, description ), + TQString ( "<a href=\"%1\">%2</a>" ).arg ( url, description ), message.subject (), Kopete::Message::Inbound, Kopete::Message::RichText, viewPlugin ); @@ -411,7 +411,7 @@ void JabberContact::handleIncomingMessage (const XMPP::Message & message) void JabberContact::slotCheckVCard () { - QDateTime cacheDate; + TQDateTime cacheDate; Kopete::ContactProperty cacheDateString = property ( protocol()->propVCardCacheTimeStamp ); // don't do anything while we are offline @@ -431,8 +431,8 @@ void JabberContact::slotCheckVCard () mDiscoDone = true; //or it will happen twice, we don't want that. //disco to see if it's not a transport XMPP::JT_DiscoInfo *jt = new XMPP::JT_DiscoInfo(account()->client()->rootTask()); - QObject::connect(jt, SIGNAL(finished()),this, SLOT(slotDiscoFinished())); - jt->get(rosterItem().jid(), QString()); + TQObject::connect(jt, TQT_SIGNAL(finished()),this, TQT_SLOT(slotDiscoFinished())); + jt->get(rosterItem().jid(), TQString()); jt->go(true); } } @@ -440,20 +440,20 @@ void JabberContact::slotCheckVCard () // avoid warning if key does not exist in configuration file if ( cacheDateString.isNull () ) - cacheDate = QDateTime::currentDateTime().addDays ( -2 ); + cacheDate = TQDateTime::currentDateTime().addDays ( -2 ); else - cacheDate = QDateTime::fromString ( cacheDateString.value().toString (), Qt::ISODate ); + cacheDate = TQDateTime::fromString ( cacheDateString.value().toString (), Qt::ISODate ); kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Cached vCard data for " << contactId () << " from " << cacheDate.toString () << endl; - if ( !mVCardUpdateInProgress && ( cacheDate.addDays ( 1 ) < QDateTime::currentDateTime () ) ) + if ( !mVCardUpdateInProgress && ( cacheDate.addDays ( 1 ) < TQDateTime::currentDateTime () ) ) { kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Scheduling update." << endl; mVCardUpdateInProgress = true; // current data is older than 24 hours, request a new one - QTimer::singleShot ( account()->client()->getPenaltyTime () * 1000, this, SLOT ( slotGetTimedVCard () ) ); + TQTimer::singleShot ( account()->client()->getPenaltyTime () * 1000, this, TQT_SLOT ( slotGetTimedVCard () ) ); } } @@ -479,8 +479,8 @@ void JabberContact::slotGetTimedVCard () { //disco to see if it's not a transport XMPP::JT_DiscoInfo *jt = new XMPP::JT_DiscoInfo(account()->client()->rootTask()); - QObject::connect(jt, SIGNAL(finished()),this, SLOT(slotDiscoFinished())); - jt->get(rosterItem().jid(), QString()); + TQObject::connect(jt, TQT_SIGNAL(finished()),this, TQT_SLOT(slotDiscoFinished())); + jt->get(rosterItem().jid(), TQString()); jt->go(true); } } @@ -492,7 +492,7 @@ void JabberContact::slotGetTimedVCard () // request vCard XMPP::JT_VCard *task = new XMPP::JT_VCard ( account()->client()->rootTask () ); // signal to ourselves when the vCard data arrived - QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotGotVCard () ) ); + TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotGotVCard () ) ); task->get ( mRosterItem.jid () ); task->go ( true ); @@ -506,7 +506,7 @@ void JabberContact::slotGotVCard () // update timestamp of last vCard retrieval if ( metaContact() && !metaContact()->isTemporary () ) { - setProperty ( protocol()->propVCardCacheTimeStamp, QDateTime::currentDateTime().toString ( Qt::ISODate ) ); + setProperty ( protocol()->propVCardCacheTimeStamp, TQDateTime::currentDateTime().toString ( Qt::ISODate ) ); } mVCardUpdateInProgress = false; @@ -551,7 +551,7 @@ void JabberContact::slotCheckLastActivity ( Kopete::Contact *, const Kopete::Onl { kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Scheduling request for last activity for " << mRosterItem.jid().bare () << endl; - QTimer::singleShot ( account()->client()->getPenaltyTime () * 1000, this, SLOT ( slotGetTimedLastActivity () ) ); + TQTimer::singleShot ( account()->client()->getPenaltyTime () * 1000, this, TQT_SLOT ( slotGetTimedLastActivity () ) ); } } @@ -578,7 +578,7 @@ void JabberContact::slotGetTimedLastActivity () kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Requesting last activity from timer for " << mRosterItem.jid().bare () << endl; XMPP::JT_GetLastActivity *task = new XMPP::JT_GetLastActivity ( account()->client()->rootTask () ); - QObject::connect ( task, SIGNAL ( finished () ), this, SLOT ( slotGotLastActivity () ) ); + TQObject::connect ( task, TQT_SIGNAL ( finished () ), this, TQT_SLOT ( slotGotLastActivity () ) ); task->get ( mRosterItem.jid () ); task->go ( true ); } @@ -591,7 +591,7 @@ void JabberContact::slotGotLastActivity () if ( task->success () ) { - setProperty ( protocol()->propLastSeen, QDateTime::currentDateTime().addSecs ( -task->seconds () ) ); + setProperty ( protocol()->propLastSeen, TQDateTime::currentDateTime().addSecs ( -task->seconds () ) ); if( !task->message().isEmpty() ) { setProperty( protocol()->propAwayMessage, task->message() ); @@ -668,7 +668,7 @@ void JabberContact::slotSendVCard() // work information tab XMPP::VCard::Org org; org.name = property(protocol()->propCompanyName).value().toString(); - org.unit = QStringList::split(",", property(protocol()->propCompanyDepartement).value().toString()); + org.unit = TQStringList::split(",", property(protocol()->propCompanyDepartement).value().toString()); vCard.setOrg(org); vCard.setTitle (property(protocol()->propCompanyPosition).value().toString()); vCard.setRole (property(protocol()->propCompanyRole).value().toString()); @@ -703,10 +703,10 @@ void JabberContact::slotSendVCard() // Set contact photo as a binary value (if he has set a photo) if( hasProperty( protocol()->propPhoto.key() ) ) { - QString photoPath = property( protocol()->propPhoto ).value().toString(); - QImage image( photoPath ); - QByteArray ba; - QBuffer buffer( ba ); + TQString photoPath = property( protocol()->propPhoto ).value().toString(); + TQImage image( photoPath ); + TQByteArray ba; + TQBuffer buffer( ba ); buffer.open( IO_WriteOnly ); image.save( &buffer, "PNG" ); vCard.setPhoto( ba ); @@ -717,22 +717,22 @@ void JabberContact::slotSendVCard() XMPP::JT_VCard *task = new XMPP::JT_VCard (account()->client()->rootTask ()); // signal to ourselves when the vCard data arrived - QObject::connect (task, SIGNAL (finished ()), this, SLOT (slotSentVCard ())); + TQObject::connect (task, TQT_SIGNAL (finished ()), this, TQT_SLOT (slotSentVCard ())); task->set (vCard); task->go (true); } -void JabberContact::setPhoto( const QString &photoPath ) +void JabberContact::setPhoto( const TQString &photoPath ) { - QImage contactPhoto(photoPath); - QString newPhotoPath = photoPath; + TQImage contactPhoto(photoPath); + TQString newPhotoPath = photoPath; if(contactPhoto.width() > 96 || contactPhoto.height() > 96) { // Save image to a new location if the image isn't the correct format. - QString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) ); + TQString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) ); // Scale and crop the picture. - contactPhoto = contactPhoto.smoothScale( 96, 96, QImage::ScaleMin ); + contactPhoto = contactPhoto.smoothScale( 96, 96, TQImage::ScaleMin ); // crop image if not square if(contactPhoto.width() < contactPhoto.height()) contactPhoto = contactPhoto.copy((contactPhoto.width()-contactPhoto.height())/2, 0, 96, 96); @@ -741,17 +741,17 @@ void JabberContact::setPhoto( const QString &photoPath ) // Use the cropped/scaled image now. if(!contactPhoto.save(newLocation, "PNG")) - newPhotoPath = QString::null; + newPhotoPath = TQString::null; else newPhotoPath = newLocation; } else if (contactPhoto.width() < 32 || contactPhoto.height() < 32) { // Save image to a new location if the image isn't the correct format. - QString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) ); + TQString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) ); // Scale and crop the picture. - contactPhoto = contactPhoto.smoothScale( 32, 32, QImage::ScaleMin ); + contactPhoto = contactPhoto.smoothScale( 32, 32, TQImage::ScaleMin ); // crop image if not square if(contactPhoto.width() < contactPhoto.height()) contactPhoto = contactPhoto.copy((contactPhoto.width()-contactPhoto.height())/2, 0, 32, 32); @@ -760,14 +760,14 @@ void JabberContact::setPhoto( const QString &photoPath ) // Use the cropped/scaled image now. if(!contactPhoto.save(newLocation, "PNG")) - newPhotoPath = QString::null; + newPhotoPath = TQString::null; else newPhotoPath = newLocation; } else if (contactPhoto.width() != contactPhoto.height()) { // Save image to a new location if the image isn't the correct format. - QString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) ); + TQString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) ); if(contactPhoto.width() < contactPhoto.height()) contactPhoto = contactPhoto.copy((contactPhoto.width()-contactPhoto.height())/2, 0, contactPhoto.height(), contactPhoto.height()); @@ -776,7 +776,7 @@ void JabberContact::setPhoto( const QString &photoPath ) // Use the cropped/scaled image now. if(!contactPhoto.save(newLocation, "PNG")) - newPhotoPath = QString::null; + newPhotoPath = TQString::null; else newPhotoPath = newLocation; } @@ -789,7 +789,7 @@ void JabberContact::slotSentVCard () } -void JabberContact::slotChatSessionDeleted ( QObject *sender ) +void JabberContact::slotChatSessionDeleted ( TQObject *sender ) { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "Message manager deleted, collecting the pieces..." << endl; @@ -826,7 +826,7 @@ JabberChatSession *JabberContact::manager ( Kopete::ContactPtrList chatMembers, kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "No manager found, creating a new one with resource '" << jid.resource () << "'" << endl; manager = new JabberChatSession ( protocol(), static_cast<JabberBaseContact *>(account()->myself()), chatMembers, jid.resource () ); - connect ( manager, SIGNAL ( destroyed ( QObject * ) ), this, SLOT ( slotChatSessionDeleted ( QObject * ) ) ); + connect ( manager, TQT_SIGNAL ( destroyed ( TQObject * ) ), this, TQT_SLOT ( slotChatSessionDeleted ( TQObject * ) ) ); mManagers.append ( manager ); } @@ -845,7 +845,7 @@ Kopete::ChatSession *JabberContact::manager ( Kopete::Contact::CanCreateFlags ca } -JabberChatSession *JabberContact::manager ( const QString &resource, Kopete::Contact::CanCreateFlags canCreate ) +JabberChatSession *JabberContact::manager ( const TQString &resource, Kopete::Contact::CanCreateFlags canCreate ) { kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << "called, canCreate: " << canCreate << ", Resource: '" << resource << "'" << endl; @@ -880,7 +880,7 @@ JabberChatSession *JabberContact::manager ( const QString &resource, Kopete::Con JabberChatSession *manager = new JabberChatSession ( protocol(), static_cast<JabberBaseContact *>(account()->myself()), chatmembers, resource ); - connect ( manager, SIGNAL ( destroyed ( QObject * ) ), this, SLOT ( slotChatSessionDeleted ( QObject * ) ) ); + connect ( manager, TQT_SIGNAL ( destroyed ( TQObject * ) ), this, TQT_SLOT ( slotChatSessionDeleted ( TQObject * ) ) ); mManagers.append ( manager ); return manager; @@ -938,7 +938,7 @@ void JabberContact::deleteContact () sendSubscription("unsubscribe"); XMPP::JT_Roster * rosterTask = new XMPP::JT_Roster ( account()->client()->rootTask () ); - rosterTask->set ( mRosterItem.jid (), QString() , QStringList() ); + rosterTask->set ( mRosterItem.jid (), TQString() , TQStringList() ); rosterTask->go (true); } @@ -954,8 +954,8 @@ void JabberContact::sync ( unsigned int ) if(!m_syncTimer) { - m_syncTimer=new QTimer(this); - connect(m_syncTimer, SIGNAL(timeout()) , this , SLOT(slotDelayedSync())); + m_syncTimer=new TQTimer(this); + connect(m_syncTimer, TQT_SIGNAL(timeout()) , this , TQT_SLOT(slotDelayedSync())); } m_syncTimer->start(2*1000,true); /* @@ -979,7 +979,7 @@ void JabberContact::slotDelayedSync( ) bool changed=metaContact()->displayName() != mRosterItem.name(); - QStringList groups; + TQStringList groups; Kopete::GroupList groupList = metaContact ()->groups (); kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Synchronizing contact " << contactId () << endl; @@ -1009,17 +1009,17 @@ void JabberContact::slotDelayedSync( ) } -void JabberContact::sendFile ( const KURL &sourceURL, const QString &/*fileName*/, uint /*fileSize*/ ) +void JabberContact::sendFile ( const KURL &sourceURL, const TQString &/*fileName*/, uint /*fileSize*/ ) { - QString filePath; + TQString filePath; // if the file location is null, then get it from a file open dialog if ( !sourceURL.isValid () ) - filePath = KFileDialog::getOpenFileName( QString::null , "*", 0L, i18n ( "Kopete File Transfer" ) ); + filePath = KFileDialog::getOpenFileName( TQString::null , "*", 0L, i18n ( "Kopete File Transfer" ) ); else filePath = sourceURL.path(-1); - QFile file ( filePath ); + TQFile file ( filePath ); if ( file.exists () ) { @@ -1057,7 +1057,7 @@ void JabberContact::slotRemoveAuth () } -void JabberContact::sendSubscription ( const QString& subType ) +void JabberContact::sendSubscription ( const TQString& subType ) { if ( !account()->isConnected () ) @@ -1075,7 +1075,7 @@ void JabberContact::sendSubscription ( const QString& subType ) void JabberContact::slotSelectResource () { - int currentItem = QString ( static_cast<const KAction *>( sender() )->name () ).toUInt (); + int currentItem = TQString ( static_cast<const KAction *>( sender() )->name () ).toUInt (); /* * Warn the user if there is already an active chat window. @@ -1101,7 +1101,7 @@ void JabberContact::slotSelectResource () } else { - QString selectedResource = static_cast<const KAction *>(sender())->text(); + TQString selectedResource = static_cast<const KAction *>(sender())->text(); kdDebug (JABBER_DEBUG_GLOBAL) << k_funcinfo << "Moving to resource " << selectedResource << endl; @@ -1212,7 +1212,7 @@ bool JabberContact::isContactRequestingEvent( XMPP::MsgEvent event ) return false; } -QString JabberContact::lastReceivedMessageId () const +TQString JabberContact::lastReceivedMessageId () const { return mLastReceivedMessageId; } @@ -1263,12 +1263,12 @@ void JabberContact::slotDiscoFinished( ) JT_DiscoInfo *jt = (JT_DiscoInfo *)sender(); bool is_transport=false; - QString tr_type; + TQString tr_type; if ( jt->success() ) { - QValueList<XMPP::DiscoItem::Identity> identities = jt->item().identities(); - QValueList<XMPP::DiscoItem::Identity>::Iterator it; + TQValueList<XMPP::DiscoItem::Identity> identities = jt->item().identities(); + TQValueList<XMPP::DiscoItem::Identity>::Iterator it; for ( it = identities.begin(); it != identities.end(); ++it ) { XMPP::DiscoItem::Identity ident=*it; |