diff options
Diffstat (limited to 'kopete/protocols/jabber/jabbercontact.cpp')
-rw-r--r-- | kopete/protocols/jabber/jabbercontact.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/kopete/protocols/jabber/jabbercontact.cpp b/kopete/protocols/jabber/jabbercontact.cpp index 840f9cf3..119a6f6e 100644 --- a/kopete/protocols/jabber/jabbercontact.cpp +++ b/kopete/protocols/jabber/jabbercontact.cpp @@ -107,7 +107,7 @@ JabberContact::JabberContact (const XMPP::RosterItem &rosterItem, Kopete::Accoun * Trigger update once if we're already connected for contacts * that are being added while we are online. */ - if ( account()->myself()->onlineStatus().isDefinitelyOnline() ) + if ( account()->myself()->onlinetqStatus().isDefinitelyOnline() ) { slotGetTimedVCard (); } @@ -170,7 +170,7 @@ TQPtrList<KAction> *JabberContact::customContextMenuActions () // if the contact is online, display the resources we have for it, // otherwise disable the menu - if (onlineStatus ().status () == Kopete::OnlineStatus::Offline) + if (onlinetqStatus ().status () == Kopete::OnlineStatus::Offline) { actionSelectResource->setEnabled ( false ); } @@ -213,7 +213,7 @@ TQPtrList<KAction> *JabberContact::customContextMenuActions () * and the resources' respective status icons for the rest. */ TQIconSet iconSet ( !i ? - protocol()->resourceToKOS ( account()->resourcePool()->bestResource ( mRosterItem.jid(), false ) ).iconFor ( account () ) : protocol()->resourceToKOS ( *availableResources.find(*it) ).iconFor ( account () )); + protocol()->resourceToKOS ( account()->resourcePool()->bestResource ( mRosterItem.jid(), false ) ).iconFor ( account () ) : protocol()->resourceToKOS ( *availableResources.tqfind(*it) ).iconFor ( account () )); actionSelectResource->insert ( new KAction( ( *it ), iconSet, 0, this, TQT_SLOT( slotSelectResource() ), actionSelectResource, TQString::number( i ).latin1() ) ); @@ -263,11 +263,11 @@ void JabberContact::handleIncomingMessage (const XMPP::Message & message) { TQString room=message.invite(); TQString originalBody=message.body().isEmpty() ? TQString() : - i18n( "The original message is : <i>\" %1 \"</i><br>" ).arg(TQStyleSheet::escape(message.body())); + i18n( "The original message is : <i>\" %1 \"</i><br>" ).tqarg(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); + .tqarg(message.from().full(), room , originalBody); bool ok=false; TQString futureNewNickName = KInputDialog::getText( i18n( "Invited to a conference - Jabber Plugin" ), @@ -299,7 +299,7 @@ void JabberContact::handleIncomingMessage (const XMPP::Message & message) if(mManager->view( Kopete::Contact::CannotCreate )) { //show an internal message if the user has not already closed his window Kopete::Message m=Kopete::Message ( this, mManager->members(), - i18n("%1 has ended their participation in the chat session.").arg(metaContact()->displayName()), + i18n("%1 has ended their participation in the chat session.").tqarg(metaContact()->displayName()), Kopete::Message::Internal ); m.setImportance(Kopete::Message::Low); mManager->view()->appendMessage ( m ); //use KopeteView::AppendMessage to bypass notifications @@ -415,7 +415,7 @@ void JabberContact::slotCheckVCard () Kopete::ContactProperty cacheDateString = property ( protocol()->propVCardCacheTimeStamp ); // don't do anything while we are offline - if ( !account()->myself()->onlineStatus().isDefinitelyOnline () ) + if ( !account()->myself()->onlinetqStatus().isDefinitelyOnline () ) { return; } @@ -440,13 +440,13 @@ void JabberContact::slotCheckVCard () // avoid warning if key does not exist in configuration file if ( cacheDateString.isNull () ) - cacheDate = TQDateTime::currentDateTime().addDays ( -2 ); + cacheDate = TQDateTime::tqcurrentDateTime().addDays ( -2 ); else 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 ) < TQDateTime::currentDateTime () ) ) + if ( !mVCardUpdateInProgress && ( cacheDate.addDays ( 1 ) < TQDateTime::tqcurrentDateTime () ) ) { kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Scheduling update." << endl; @@ -463,7 +463,7 @@ void JabberContact::slotGetTimedVCard () mVCardUpdateInProgress = false; // check if we are still connected - eventually we lost our connection in the meantime - if ( !account()->myself()->onlineStatus().isDefinitelyOnline () ) + if ( !account()->myself()->onlinetqStatus().isDefinitelyOnline () ) { // we are not connected, discard this update return; @@ -506,7 +506,7 @@ void JabberContact::slotGotVCard () // update timestamp of last vCard retrieval if ( metaContact() && !metaContact()->isTemporary () ) { - setProperty ( protocol()->propVCardCacheTimeStamp, TQDateTime::currentDateTime().toString ( Qt::ISODate ) ); + setProperty ( protocol()->propVCardCacheTimeStamp, TQDateTime::tqcurrentDateTime().toString ( Qt::ISODate ) ); } mVCardUpdateInProgress = false; @@ -527,7 +527,7 @@ void JabberContact::slotGotVCard () } -void JabberContact::slotCheckLastActivity ( Kopete::Contact *, const Kopete::OnlineStatus &newStatus, const Kopete::OnlineStatus &oldStatus ) +void JabberContact::slotCheckLastActivity ( Kopete::Contact *, const Kopete::OnlineStatus &newtqStatus, const Kopete::OnlineStatus &oldtqStatus ) { /* @@ -541,13 +541,13 @@ void JabberContact::slotCheckLastActivity ( Kopete::Contact *, const Kopete::Onl * to query its activity after we are already connected. */ - if ( onlineStatus().isDefinitelyOnline () ) + if ( onlinetqStatus().isDefinitelyOnline () ) { // Kopete already deals with lastSeen if the contact is online return; } - if ( ( oldStatus.status () == Kopete::OnlineStatus::Connecting ) && newStatus.isDefinitelyOnline () ) + if ( ( oldtqStatus.status () == Kopete::OnlineStatus::Connecting ) && newtqStatus.isDefinitelyOnline () ) { kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Scheduling request for last activity for " << mRosterItem.jid().bare () << endl; @@ -567,13 +567,13 @@ void JabberContact::slotGetTimedLastActivity () * maintained by Kopete) */ - if ( onlineStatus().isDefinitelyOnline () ) + if ( onlinetqStatus().isDefinitelyOnline () ) { // Kopete already deals with setting lastSeen if the contact is online return; } - if ( account()->myself()->onlineStatus().isDefinitelyOnline () ) + if ( account()->myself()->onlinetqStatus().isDefinitelyOnline () ) { kdDebug ( JABBER_DEBUG_GLOBAL ) << k_funcinfo << "Requesting last activity from timer for " << mRosterItem.jid().bare () << endl; @@ -591,7 +591,7 @@ void JabberContact::slotGotLastActivity () if ( task->success () ) { - setProperty ( protocol()->propLastSeen, TQDateTime::currentDateTime().addSecs ( -task->seconds () ) ); + setProperty ( protocol()->propLastSeen, TQDateTime(TQDateTime::tqcurrentDateTime().addSecs ( -task->seconds () ))); if( !task->message().isEmpty() ) { setProperty( protocol()->propAwayMessage, task->message() ); @@ -732,7 +732,7 @@ void JabberContact::setPhoto( const TQString &photoPath ) TQString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) ); // Scale and crop the picture. - contactPhoto = contactPhoto.smoothScale( 96, 96, TQImage::ScaleMin ); + contactPhoto = contactPhoto.smoothScale( 96, 96, TQ_ScaleMin ); // crop image if not square if(contactPhoto.width() < contactPhoto.height()) contactPhoto = contactPhoto.copy((contactPhoto.width()-contactPhoto.height())/2, 0, 96, 96); @@ -741,7 +741,7 @@ void JabberContact::setPhoto( const TQString &photoPath ) // Use the cropped/scaled image now. if(!contactPhoto.save(newLocation, "PNG")) - newPhotoPath = TQString::null; + newPhotoPath = TQString(); else newPhotoPath = newLocation; } @@ -751,7 +751,7 @@ void JabberContact::setPhoto( const TQString &photoPath ) TQString newLocation( locateLocal( "appdata", "jabberphotos/"+ KURL(photoPath).fileName().lower() ) ); // Scale and crop the picture. - contactPhoto = contactPhoto.smoothScale( 32, 32, TQImage::ScaleMin ); + contactPhoto = contactPhoto.smoothScale( 32, 32, TQ_ScaleMin ); // crop image if not square if(contactPhoto.width() < contactPhoto.height()) contactPhoto = contactPhoto.copy((contactPhoto.width()-contactPhoto.height())/2, 0, 32, 32); @@ -760,7 +760,7 @@ void JabberContact::setPhoto( const TQString &photoPath ) // Use the cropped/scaled image now. if(!contactPhoto.save(newLocation, "PNG")) - newPhotoPath = TQString::null; + newPhotoPath = TQString(); else newPhotoPath = newLocation; } @@ -776,7 +776,7 @@ void JabberContact::setPhoto( const TQString &photoPath ) // Use the cropped/scaled image now. if(!contactPhoto.save(newLocation, "PNG")) - newPhotoPath = TQString::null; + newPhotoPath = TQString(); else newPhotoPath = newLocation; } @@ -795,7 +795,7 @@ void JabberContact::slotChatSessionDeleted ( TQObject *sender ) JabberChatSession *manager = static_cast<JabberChatSession *>(sender); - mManagers.remove ( mManagers.find ( manager ) ); + mManagers.remove ( mManagers.tqfind ( manager ) ); } @@ -1015,7 +1015,7 @@ void JabberContact::sendFile ( const KURL &sourceURL, const TQString &/*fileName // if the file location is null, then get it from a file open dialog if ( !sourceURL.isValid () ) - filePath = KFileDialog::getOpenFileName( TQString::null , "*", 0L, i18n ( "Kopete File Transfer" ) ); + filePath = KFileDialog::getOpenFileName( TQString() , "*", 0L, i18n ( "Kopete File Transfer" ) ); else filePath = sourceURL.path(-1); @@ -1110,7 +1110,7 @@ void JabberContact::slotSelectResource () } -void JabberContact::sendPresence ( const XMPP::Status status ) +void JabberContact::sendPresence ( const XMPP::tqStatus status ) { if ( !account()->isConnected () ) @@ -1119,15 +1119,15 @@ void JabberContact::sendPresence ( const XMPP::Status status ) return; } - XMPP::Status newStatus = status; + XMPP::tqStatus newtqStatus = status; // honour our priority - if(newStatus.isAvailable()) - newStatus.setPriority ( account()->configGroup()->readNumEntry ( "Priority", 5 ) ); + if(newtqStatus.isAvailable()) + newtqStatus.setPriority ( account()->configGroup()->readNumEntry ( "Priority", 5 ) ); XMPP::JT_Presence * task = new XMPP::JT_Presence ( account()->client()->rootTask () ); - task->pres ( bestAddress (), newStatus); + task->pres ( bestAddress (), newtqStatus); task->go ( true ); } @@ -1136,7 +1136,7 @@ void JabberContact::sendPresence ( const XMPP::Status status ) void JabberContact::slotStatusOnline () { - XMPP::Status status; + XMPP::tqStatus status; status.setShow(""); sendPresence ( status ); @@ -1146,7 +1146,7 @@ void JabberContact::slotStatusOnline () void JabberContact::slotStatusChatty () { - XMPP::Status status; + XMPP::tqStatus status; status.setShow ("chat"); sendPresence ( status ); @@ -1156,7 +1156,7 @@ void JabberContact::slotStatusChatty () void JabberContact::slotStatusAway () { - XMPP::Status status; + XMPP::tqStatus status; status.setShow ("away"); sendPresence ( status ); @@ -1166,7 +1166,7 @@ void JabberContact::slotStatusAway () void JabberContact::slotStatusXA () { - XMPP::Status status; + XMPP::tqStatus status; status.setShow ("xa"); sendPresence ( status ); @@ -1176,7 +1176,7 @@ void JabberContact::slotStatusXA () void JabberContact::slotStatusDND () { - XMPP::Status status; + XMPP::tqStatus status; status.setShow ("dnd"); sendPresence ( status ); @@ -1187,7 +1187,7 @@ void JabberContact::slotStatusDND () void JabberContact::slotStatusInvisible () { - XMPP::Status status; + XMPP::tqStatus status; status.setIsAvailable( false ); sendPresence ( status ); @@ -1298,8 +1298,8 @@ void JabberContact::slotDiscoFinished( ) XMPP::RosterItem ri = rosterItem(); Kopete::MetaContact *mc=metaContact(); - JabberAccount *parentAccount=account(); - Kopete::OnlineStatus status=onlineStatus(); + JabberAccount *tqparentAccount=account(); + Kopete::OnlineStatus status=onlinetqStatus(); kdDebug(JABBER_DEBUG_GLOBAL) << k_funcinfo << ri.jid().full() << " is not a contact but a gateway - " << this << endl; @@ -1315,7 +1315,7 @@ void JabberContact::slotDiscoFinished( ) Kopete::ContactList::self()->removeMetaContact( mc ); //we need to create the transport when 'this' is already deleted, so transport->myself() will not conflict with it - JabberTransport *transport = new JabberTransport( parentAccount , ri , tr_type ); + JabberTransport *transport = new JabberTransport( tqparentAccount , ri , tr_type ); if(!Kopete::AccountManager::self()->registerAccount( transport )) return; transport->myself()->setOnlineStatus( status ); //push back the online status |