diff options
author | Timothy Pearson <[email protected]> | 2011-12-16 09:59:34 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-16 09:59:34 -0600 |
commit | 83677e35509b4dafac63b76995652bdf3b49f209 (patch) | |
tree | 591f1dc22278addb439726c42896376b17bb42bd /kopete/libkopete/kopetecontact.cpp | |
parent | 808e453c56036211f57482ed847d54aca01bba68 (diff) | |
download | tdenetwork-83677e35509b4dafac63b76995652bdf3b49f209.tar.gz tdenetwork-83677e35509b4dafac63b76995652bdf3b49f209.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 808e453c56036211f57482ed847d54aca01bba68.
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 fee3a7b0..44eb7c4b 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 <stylesheet.h> +#include <tqstylesheet.h> namespace Kopete { @@ -63,7 +63,7 @@ struct Contact::Private public: bool fileCapable; - OnlineStatus onlineStatus; + OnlineStatus onlinetqStatus; Account *account; MetaContact *metaContact; @@ -124,45 +124,45 @@ Contact::~Contact() -OnlineStatus Contact::onlineStatus() const +OnlineStatus Contact::onlinetqStatus() const { if ( this == account()->myself() || account()->isConnected() ) - return d->onlineStatus; + return d->onlinetqStatus; else - return protocol()->accountOfflineStatus(); + return protocol()->accountOfflinetqStatus(); } void Contact::setOnlineStatus( const OnlineStatus &status ) { - if( status == d->onlineStatus ) + if( status == d->onlinetqStatus ) return; - OnlineStatus oldStatus = d->onlineStatus; - d->onlineStatus = status; + OnlineStatus oldtqStatus = d->onlinetqStatus; + d->onlinetqStatus = status; Kopete::Global::Properties *globalProps = Kopete::Global::Properties::self(); // Contact changed from Offline to another status - if( oldStatus.status() == OnlineStatus::Offline && + if( oldtqStatus.status() == OnlineStatus::Offline && status.status() != OnlineStatus::Offline ) { - setProperty( globalProps->onlineSince(), TQDateTime::currentDateTime() ); + setProperty( globalProps->onlineSince(), TQDateTime::tqcurrentDateTime() ); /*kdDebug(14010) << k_funcinfo << "REMOVING lastSeen property for " << d->displayName << endl;*/ removeProperty( globalProps->lastSeen() ); } - else if( oldStatus.status() != OnlineStatus::Offline && - oldStatus.status() != OnlineStatus::Unknown && + else if( oldtqStatus.status() != OnlineStatus::Offline && + oldtqStatus.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::currentDateTime() ); + setProperty( globalProps->lastSeen(), TQDateTime::tqcurrentDateTime() ); } if ( this == account()->myself() || account()->isConnected() ) - emit onlineStatusChanged( this, status, oldStatus ); + emit onlineStatusChanged( this, status, oldtqStatus ); } void Contact::slotAccountIsConnectedChanged() @@ -171,9 +171,9 @@ void Contact::slotAccountIsConnectedChanged() return; if ( account()->isConnected() ) - emit onlineStatusChanged( this, d->onlineStatus, protocol()->accountOfflineStatus() ); + emit onlineStatusChanged( this, d->onlinetqStatus, protocol()->accountOfflinetqStatus() ); else - emit onlineStatusChanged( this, protocol()->accountOfflineStatus(), d->onlineStatus ); + emit onlineStatusChanged( this, protocol()->accountOfflinetqStatus(), d->onlinetqStatus ); } @@ -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::fromLatin1( "%1 (%2)" ).arg( contactId(), onlineStatus().description() ); + titleText = TQString::tqfromLatin1( "%1 (%2)" ).tqarg( contactId(), onlinetqStatus().description() ); else - titleText = TQString::fromLatin1( "%1 <%2> (%3)" ).arg( nick, contactId(), onlineStatus().description() ); + titleText = TQString::tqfromLatin1( "%1 <%2> (%3)" ).tqarg( nick, contactId(), onlinetqStatus().description() ); menu->insertTitle( titleText ); if( metaContact() && metaContact()->isTemporary() && contactId() != account()->myself()->contactId() ) { - KAction *actionAddContact = new KAction( i18n( "&Add to Your Contact List" ), TQString::fromLatin1( "add_user" ), + KAction *actionAddContact = new KAction( i18n( "&Add to Your Contact List" ), TQString::tqfromLatin1( "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?" ) - .arg(contactId(), m ? m->displayName() : TQString(), old->displayName()) - , i18n( "Move Contact" ), KStdGuiItem::del(), i18n( "&Keep" ) , TQString::fromLatin1("delete_old_contact_when_move") ); + .tqarg(contactId(), m ? m->displayName() : TQString(), old->displayName()) + , i18n( "Move Contact" ), KStdGuiItem::del(), i18n( "&Keep" ) , TQString::tqfromLatin1("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::fromLatin1("prop_%1_%2").arg(TQString::fromLatin1(val.typeName()), it.key()); + TQString key = TQString::tqfromLatin1("prop_%1_%2").tqarg(TQString::tqfromLatin1(val.typeName()), it.key()); serializedData[key] = val.toString(); @@ -383,7 +383,7 @@ void Contact::deserializeProperties( { TQString key = it.key(); - if ( !key.startsWith( TQString::fromLatin1("prop_") ) ) // avoid parsing other serialized data + if ( !key.startsWith( TQString::tqfromLatin1("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 onlineStatus().status() != OnlineStatus::Offline; + return onlinetqStatus().status() != OnlineStatus::Offline; } void Contact::startChat() { - KopeteView *v=manager( CanCreate )->view(true, TQString::fromLatin1("kopete_chatwindow") ); + KopeteView *v=manager( CanCreate )->view(true, TQString::tqfromLatin1("kopete_chatwindow") ); if(v) v->raise(true); } void Contact::sendMessage() { - KopeteView *v=manager( CanCreate )->view(true, TQString::fromLatin1("kopete_emailwindow") ); + KopeteView *v=manager( CanCreate )->view(true, TQString::tqfromLatin1("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::fromLatin1("delete_user") ), - TQString::fromLatin1("askRemoveContact"), KMessageBox::Notify | KMessageBox::Dangerous ) + arg( d->contactId ), i18n( "Remove Contact" ), KGuiItem(i18n("Remove"), TQString::tqfromLatin1("delete_user") ), + TQString::tqfromLatin1("askRemoveContact"), KMessageBox::Notify | KMessageBox::Dangerous ) == KMessageBox::Continue ) { deleteContact(); @@ -524,7 +524,7 @@ TQPtrList<KAction> *Contact::customContextMenuActions( ChatSession * /* manager bool Contact::isOnline() const { - return onlineStatus().isDefinitelyOnline(); + return onlinetqStatus().isDefinitelyOnline(); } @@ -645,8 +645,8 @@ TQString Contact::toolTip() const // -------------------------------------------------------------------------- // Fixed part of tooltip - TQString iconName = TQString::fromLatin1("kopete-contact-icon:%1:%2:%3") - .arg( KURL::encode_string( protocol()->pluginId() ), + TQString iconName = TQString::tqfromLatin1("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( onlineStatus().description() ), iconName, + arg( Kopete::Message::escape( onlinetqStatus().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( onlineStatus().description() ), iconName, + arg( Kopete::Message::escape( onlinetqStatus().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::fromLatin1("FormattedName")) + if((*it) == TQString::tqfromLatin1("FormattedName")) { TQString name = formattedName(); if(!name.isEmpty()) { tip += i18n("<br><b>Full Name:</b> FORMATTED NAME", - "<br><b>Full Name:</b> <nobr>%1</nobr>").arg(TQStyleSheet::escape(name)); + "<br><b>Full Name:</b> <nobr>%1</nobr>").tqarg(TQStyleSheet::escape(name)); } } - else if ((*it) == TQString::fromLatin1("FormattedIdleTime")) + else if ((*it) == TQString::tqfromLatin1("FormattedIdleTime")) { TQString time = formattedIdleTime(); if(!time.isEmpty()) { tip += i18n("<br><b>Idle:</b> FORMATTED IDLE TIME", - "<br><b>Idle:</b> <nobr>%1</nobr>").arg(time); + "<br><b>Idle:</b> <nobr>%1</nobr>").tqarg(time); } } - else if ((*it) == TQString::fromLatin1("homePage")) + else if ((*it) == TQString::tqfromLatin1("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::fromLatin1("awayMessage")) + else if ((*it) == TQString::tqfromLatin1("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::fromLatin1("FormattedName")) ) - return property(TQString::fromLatin1("FormattedName")).value().toString(); + if( hasProperty(TQString::tqfromLatin1("FormattedName")) ) + return property(TQString::tqfromLatin1("FormattedName")).value().toString(); TQString ret; Kopete::ContactProperty first, last; - first = property(TQString::fromLatin1("firstName")); - last = property(TQString::fromLatin1("lastName")); + first = property(TQString::tqfromLatin1("firstName")); + last = property(TQString::tqfromLatin1("lastName")); if(!first.isNull()) { if(!last.isNull()) // contact has both first and last name { ret = i18n("firstName lastName", "%2 %1") - .arg(last.value().toString()) - .arg(first.value().toString()); + .tqarg(last.value().toString()) + .tqarg(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" ) - .arg( secs ) - .arg( mins ) - .arg( hours ) - .arg( days ); + .tqarg( secs ) + .tqarg( mins ) + .tqarg( hours ) + .tqarg( days ); } else if ( hours != 0 ) { ret = i18n( "<hours>h <minutes>m <seconds>s", "%3h %2m %1s" ) - .arg( secs ) - .arg( mins ) - .arg( hours ); + .tqarg( secs ) + .tqarg( mins ) + .tqarg( hours ); } else { ret = i18n( "<minutes>m <seconds>s", "%2m %1s" ) - .arg( secs ) - .arg( mins ); + .tqarg( secs ) + .tqarg( mins ); } } return ret; |