diff options
author | Timothy Pearson <[email protected]> | 2011-12-18 18:33:51 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-18 18:33:51 -0600 |
commit | 089118c18533dfa3e6ce5065dbebdd4db94051f1 (patch) | |
tree | ce014fb2326a80fcfafa2362b7ff88486aa17c96 /kopete/libkopete/kopetecontact.cpp | |
parent | 83677e35509b4dafac63b76995652bdf3b49f209 (diff) | |
download | tdenetwork-089118c18533dfa3e6ce5065dbebdd4db94051f1.tar.gz tdenetwork-089118c18533dfa3e6ce5065dbebdd4db94051f1.zip |
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'kopete/libkopete/kopetecontact.cpp')
-rw-r--r-- | kopete/libkopete/kopetecontact.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/kopete/libkopete/kopetecontact.cpp b/kopete/libkopete/kopetecontact.cpp index 44eb7c4b..89109418 100644 --- a/kopete/libkopete/kopetecontact.cpp +++ b/kopete/libkopete/kopetecontact.cpp @@ -63,7 +63,7 @@ struct Contact::Private public: bool fileCapable; - OnlineStatus onlinetqStatus; + OnlineStatus onlineStatus; Account *account; MetaContact *metaContact; @@ -124,45 +124,45 @@ Contact::~Contact() -OnlineStatus Contact::onlinetqStatus() const +OnlineStatus Contact::onlineStatus() const { if ( this == account()->myself() || account()->isConnected() ) - return d->onlinetqStatus; + return d->onlineStatus; else - return protocol()->accountOfflinetqStatus(); + return protocol()->accountOfflineStatus(); } void Contact::setOnlineStatus( const OnlineStatus &status ) { - if( status == d->onlinetqStatus ) + if( status == d->onlineStatus ) return; - OnlineStatus oldtqStatus = d->onlinetqStatus; - d->onlinetqStatus = status; + OnlineStatus oldStatus = d->onlineStatus; + d->onlineStatus = status; Kopete::Global::Properties *globalProps = Kopete::Global::Properties::self(); // Contact changed from Offline to another status - if( oldtqStatus.status() == OnlineStatus::Offline && + if( oldStatus.status() == OnlineStatus::Offline && status.status() != OnlineStatus::Offline ) { - setProperty( globalProps->onlineSince(), TQDateTime::tqcurrentDateTime() ); + setProperty( globalProps->onlineSince(), TQDateTime::currentDateTime() ); /*kdDebug(14010) << k_funcinfo << "REMOVING lastSeen property for " << d->displayName << endl;*/ removeProperty( globalProps->lastSeen() ); } - else if( oldtqStatus.status() != OnlineStatus::Offline && - oldtqStatus.status() != OnlineStatus::Unknown && + else if( oldStatus.status() != OnlineStatus::Offline && + oldStatus.status() != OnlineStatus::Unknown && status.status() == OnlineStatus::Offline ) // Contact went back offline { removeProperty( globalProps->onlineSince() ); /*kdDebug(14010) << k_funcinfo << "SETTING lastSeen property for " << d->displayName << endl;*/ - setProperty( globalProps->lastSeen(), TQDateTime::tqcurrentDateTime() ); + setProperty( globalProps->lastSeen(), TQDateTime::currentDateTime() ); } if ( this == account()->myself() || account()->isConnected() ) - emit onlineStatusChanged( this, status, oldtqStatus ); + emit onlineStatusChanged( this, status, oldStatus ); } void Contact::slotAccountIsConnectedChanged() @@ -171,9 +171,9 @@ void Contact::slotAccountIsConnectedChanged() return; if ( account()->isConnected() ) - emit onlineStatusChanged( this, d->onlinetqStatus, protocol()->accountOfflinetqStatus() ); + emit onlineStatusChanged( this, d->onlineStatus, protocol()->accountOfflineStatus() ); else - emit onlineStatusChanged( this, protocol()->accountOfflinetqStatus(), d->onlinetqStatus ); + emit onlineStatusChanged( this, protocol()->accountOfflineStatus(), d->onlineStatus ); } @@ -202,14 +202,14 @@ KPopupMenu* Contact::popupMenu( ChatSession *manager ) TQString titleText; TQString nick = property( Kopete::Global::Properties::self()->nickName() ).value().toString(); if( nick.isEmpty() ) - titleText = TQString::tqfromLatin1( "%1 (%2)" ).tqarg( contactId(), onlinetqStatus().description() ); + titleText = TQString::fromLatin1( "%1 (%2)" ).tqarg( contactId(), onlineStatus().description() ); else - titleText = TQString::tqfromLatin1( "%1 <%2> (%3)" ).tqarg( nick, contactId(), onlinetqStatus().description() ); + titleText = TQString::fromLatin1( "%1 <%2> (%3)" ).tqarg( nick, contactId(), onlineStatus().description() ); menu->insertTitle( titleText ); if( metaContact() && metaContact()->isTemporary() && contactId() != account()->myself()->contactId() ) { - KAction *actionAddContact = new KAction( i18n( "&Add to Your Contact List" ), TQString::tqfromLatin1( "add_user" ), + KAction *actionAddContact = new KAction( i18n( "&Add to Your Contact List" ), TQString::fromLatin1( "add_user" ), 0, TQT_TQOBJECT(this), TQT_SLOT( slotAddContact() ), TQT_TQOBJECT(menu), "actionAddContact" ); actionAddContact->plug( menu ); menu->insertSeparator(); @@ -315,7 +315,7 @@ void Contact::setMetaContact( MetaContact *m ) result = KMessageBox::questionYesNoCancel( Kopete::UI::Global::mainWidget(), i18n( "You are moving the contact `%1' to the meta contact `%2'.\n" "`%3' will be empty afterwards. Do you want to delete this contact?" ) .tqarg(contactId(), m ? m->displayName() : TQString(), old->displayName()) - , i18n( "Move Contact" ), KStdGuiItem::del(), i18n( "&Keep" ) , TQString::tqfromLatin1("delete_old_contact_when_move") ); + , i18n( "Move Contact" ), KStdGuiItem::del(), i18n( "&Keep" ) , TQString::fromLatin1("delete_old_contact_when_move") ); if(result==KMessageBox::Cancel) return; } @@ -368,7 +368,7 @@ void Contact::serializeProperties(TQMap<TQString, TQString> &serializedData) continue; TQVariant val = it.data().value(); - TQString key = TQString::tqfromLatin1("prop_%1_%2").tqarg(TQString::tqfromLatin1(val.typeName()), it.key()); + TQString key = TQString::fromLatin1("prop_%1_%2").tqarg(TQString::fromLatin1(val.typeName()), it.key()); serializedData[key] = val.toString(); @@ -383,7 +383,7 @@ void Contact::deserializeProperties( { TQString key = it.key(); - if ( !key.startsWith( TQString::tqfromLatin1("prop_") ) ) // avoid parsing other serialized data + if ( !key.startsWith( TQString::fromLatin1("prop_") ) ) // avoid parsing other serialized data continue; TQStringList keyList = TQStringList::split( TQChar('_'), key, false ); @@ -419,20 +419,20 @@ bool Contact::isReachable() { // The default implementation returns false when offline and true // otherwise. Subclass if you need more control over the process. - return onlinetqStatus().status() != OnlineStatus::Offline; + return onlineStatus().status() != OnlineStatus::Offline; } void Contact::startChat() { - KopeteView *v=manager( CanCreate )->view(true, TQString::tqfromLatin1("kopete_chatwindow") ); + KopeteView *v=manager( CanCreate )->view(true, TQString::fromLatin1("kopete_chatwindow") ); if(v) v->raise(true); } void Contact::sendMessage() { - KopeteView *v=manager( CanCreate )->view(true, TQString::tqfromLatin1("kopete_emailwindow") ); + KopeteView *v=manager( CanCreate )->view(true, TQString::fromLatin1("kopete_emailwindow") ); if(v) v->raise(true); } @@ -458,8 +458,8 @@ void Contact::slotDelete() { if ( KMessageBox::warningContinueCancel( Kopete::UI::Global::mainWidget(), i18n( "Are you sure you want to remove the contact '%1' from your contact list?" ). - arg( d->contactId ), i18n( "Remove Contact" ), KGuiItem(i18n("Remove"), TQString::tqfromLatin1("delete_user") ), - TQString::tqfromLatin1("askRemoveContact"), KMessageBox::Notify | KMessageBox::Dangerous ) + arg( d->contactId ), i18n( "Remove Contact" ), KGuiItem(i18n("Remove"), TQString::fromLatin1("delete_user") ), + TQString::fromLatin1("askRemoveContact"), KMessageBox::Notify | KMessageBox::Dangerous ) == KMessageBox::Continue ) { deleteContact(); @@ -524,7 +524,7 @@ TQPtrList<KAction> *Contact::customContextMenuActions( ChatSession * /* manager bool Contact::isOnline() const { - return onlinetqStatus().isDefinitelyOnline(); + return onlineStatus().isDefinitelyOnline(); } @@ -645,7 +645,7 @@ TQString Contact::toolTip() const // -------------------------------------------------------------------------- // Fixed part of tooltip - TQString iconName = TQString::tqfromLatin1("kopete-contact-icon:%1:%2:%3") + TQString iconName = TQString::fromLatin1("kopete-contact-icon:%1:%2:%3") .tqarg( KURL::encode_string( protocol()->pluginId() ), KURL::encode_string( account()->accountId() ), KURL::encode_string( contactId() ) ); @@ -656,14 +656,14 @@ TQString Contact::toolTip() const { tip = i18n( "<b>DISPLAY NAME</b><br><img src=\"%2\"> CONTACT STATUS", "<b><nobr>%3</nobr></b><br><img src=\"%2\"> %1" ). - arg( Kopete::Message::escape( onlinetqStatus().description() ), iconName, + arg( Kopete::Message::escape( onlineStatus().description() ), iconName, Kopete::Message::escape( d->contactId ) ); } else { tip = i18n( "<b>DISPLAY NAME</b> (CONTACT ID)<br><img src=\"%2\"> CONTACT STATUS", "<nobr><b>%4</b> (%3)</nobr><br><img src=\"%2\"> %1" ). - arg( Kopete::Message::escape( onlinetqStatus().description() ), iconName, + arg( Kopete::Message::escape( onlineStatus().description() ), iconName, Kopete::Message::escape( contactId() ), Kopete::Emoticons::parseEmoticons( Kopete::Message::escape( nick ) ) ); } @@ -673,7 +673,7 @@ TQString Contact::toolTip() const for(TQStringList::Iterator it=shownProps.begin(); it!=shownProps.end(); ++it) { - if((*it) == TQString::tqfromLatin1("FormattedName")) + if((*it) == TQString::fromLatin1("FormattedName")) { TQString name = formattedName(); if(!name.isEmpty()) @@ -682,7 +682,7 @@ TQString Contact::toolTip() const "<br><b>Full Name:</b> <nobr>%1</nobr>").tqarg(TQStyleSheet::escape(name)); } } - else if ((*it) == TQString::tqfromLatin1("FormattedIdleTime")) + else if ((*it) == TQString::fromLatin1("FormattedIdleTime")) { TQString time = formattedIdleTime(); if(!time.isEmpty()) @@ -691,7 +691,7 @@ TQString Contact::toolTip() const "<br><b>Idle:</b> <nobr>%1</nobr>").tqarg(time); } } - else if ((*it) == TQString::tqfromLatin1("homePage")) + else if ((*it) == TQString::fromLatin1("homePage")) { TQString url = property(*it).value().toString(); if(!url.isEmpty()) @@ -701,7 +701,7 @@ TQString Contact::toolTip() const arg( KURL::encode_string( url ), Kopete::Message::escape( TQStyleSheet::escape(url) ) ); } } - else if ((*it) == TQString::tqfromLatin1("awayMessage")) + else if ((*it) == TQString::fromLatin1("awayMessage")) { TQString awaymsg = property(*it).value().toString(); if(!awaymsg.isEmpty()) @@ -755,14 +755,14 @@ TQString Contact::toolTip() const TQString Kopete::Contact::formattedName() const { - if( hasProperty(TQString::tqfromLatin1("FormattedName")) ) - return property(TQString::tqfromLatin1("FormattedName")).value().toString(); + if( hasProperty(TQString::fromLatin1("FormattedName")) ) + return property(TQString::fromLatin1("FormattedName")).value().toString(); TQString ret; Kopete::ContactProperty first, last; - first = property(TQString::tqfromLatin1("firstName")); - last = property(TQString::tqfromLatin1("lastName")); + first = property(TQString::fromLatin1("firstName")); + last = property(TQString::fromLatin1("lastName")); if(!first.isNull()) { if(!last.isNull()) // contact has both first and last name |