diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:49:40 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:49:40 -0600 |
commit | 808e453c56036211f57482ed847d54aca01bba68 (patch) | |
tree | 75515d5768dea10d4fbe4cd772e0a89c1c4b3aa9 /kopete/libkopete/kopetecontact.cpp | |
parent | cd9b9ed7fd0ac8a75106148254aa58e2e5c04863 (diff) | |
download | tdenetwork-808e453c56036211f57482ed847d54aca01bba68.tar.gz tdenetwork-808e453c56036211f57482ed847d54aca01bba68.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kopete/libkopete/kopetecontact.cpp')
-rw-r--r-- | kopete/libkopete/kopetecontact.cpp | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/kopete/libkopete/kopetecontact.cpp b/kopete/libkopete/kopetecontact.cpp index 44eb7c4b..fee3a7b0 100644 --- a/kopete/libkopete/kopetecontact.cpp +++ b/kopete/libkopete/kopetecontact.cpp @@ -54,7 +54,7 @@ #include <klistview.h> #include <tqcheckbox.h> #include <tqwhatsthis.h> -#include <tqstylesheet.h> +#include <stylesheet.h> namespace Kopete { @@ -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)" ).arg( contactId(), onlineStatus().description() ); else - titleText = TQString::tqfromLatin1( "%1 <%2> (%3)" ).tqarg( nick, contactId(), onlinetqStatus().description() ); + titleText = TQString::fromLatin1( "%1 <%2> (%3)" ).arg( 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(); @@ -314,8 +314,8 @@ void Contact::setMetaContact( MetaContact *m ) { //only one contact, including this one, that mean the contact will be empty efter the move 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") ); + .arg(contactId(), m ? m->displayName() : TQString(), old->displayName()) + , 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").arg(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,8 +645,8 @@ TQString Contact::toolTip() const // -------------------------------------------------------------------------- // Fixed part of tooltip - TQString iconName = TQString::tqfromLatin1("kopete-contact-icon:%1:%2:%3") - .tqarg( KURL::encode_string( protocol()->pluginId() ), + TQString iconName = TQString::fromLatin1("kopete-contact-icon:%1:%2:%3") + .arg( 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,25 +673,25 @@ 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()) { tip += i18n("<br><b>Full Name:</b> FORMATTED NAME", - "<br><b>Full Name:</b> <nobr>%1</nobr>").tqarg(TQStyleSheet::escape(name)); + "<br><b>Full Name:</b> <nobr>%1</nobr>").arg(TQStyleSheet::escape(name)); } } - else if ((*it) == TQString::tqfromLatin1("FormattedIdleTime")) + else if ((*it) == TQString::fromLatin1("FormattedIdleTime")) { TQString time = formattedIdleTime(); if(!time.isEmpty()) { tip += i18n("<br><b>Idle:</b> FORMATTED IDLE TIME", - "<br><b>Idle:</b> <nobr>%1</nobr>").tqarg(time); + "<br><b>Idle:</b> <nobr>%1</nobr>").arg(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,21 +755,21 @@ 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 { ret = i18n("firstName lastName", "%2 %1") - .tqarg(last.value().toString()) - .tqarg(first.value().toString()); + .arg(last.value().toString()) + .arg(first.value().toString()); } else // only first name set { @@ -804,23 +804,23 @@ TQString Kopete::Contact::formattedIdleTime() const { ret = i18n( "<days>d <hours>h <minutes>m <seconds>s", "%4d %3h %2m %1s" ) - .tqarg( secs ) - .tqarg( mins ) - .tqarg( hours ) - .tqarg( days ); + .arg( secs ) + .arg( mins ) + .arg( hours ) + .arg( days ); } else if ( hours != 0 ) { ret = i18n( "<hours>h <minutes>m <seconds>s", "%3h %2m %1s" ) - .tqarg( secs ) - .tqarg( mins ) - .tqarg( hours ); + .arg( secs ) + .arg( mins ) + .arg( hours ); } else { ret = i18n( "<minutes>m <seconds>s", "%2m %1s" ) - .tqarg( secs ) - .tqarg( mins ); + .arg( secs ) + .arg( mins ); } } return ret; |