summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/kopetemetacontact.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/libkopete/kopetemetacontact.cpp')
-rw-r--r--kopete/libkopete/kopetemetacontact.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/kopete/libkopete/kopetemetacontact.cpp b/kopete/libkopete/kopetemetacontact.cpp
index 9a908f32..a031f5bd 100644
--- a/kopete/libkopete/kopetemetacontact.cpp
+++ b/kopete/libkopete/kopetemetacontact.cpp
@@ -58,7 +58,7 @@ class MetaContact::Private
Private() :
photoSource(MetaContact::SourceCustom), displayNameSource(MetaContact::SourceCustom),
displayNameSourceContact(0L), photoSourceContact(0L), temporary(false),
- onlineStatus(Kopete::OnlineStatus::Offline), photoSyncedWithKABC(false)
+ onlinetqStatus(Kopete::OnlineStatus::Offline), photoSyncedWithKABC(false)
{}
~Private()
@@ -85,7 +85,7 @@ class MetaContact::Private
TQMap<TQString, TQMap<TQString, TQString> > addressBook;
bool temporary;
- OnlineStatus::StatusType onlineStatus;
+ OnlineStatus::StatusType onlinetqStatus;
bool photoSyncedWithKABC;
// Used to set contact source at load.
@@ -127,7 +127,7 @@ MetaContact::~MetaContact()
void MetaContact::addContact( Contact *c )
{
- if( d->contacts.contains( c ) )
+ if( d->contacts.tqcontains( c ) )
{
kdWarning(14010) << "Ignoring attempt to add duplicate contact " << c->contactId() << "!" << endl;
}
@@ -171,29 +171,29 @@ void MetaContact::addContact( Contact *c )
void MetaContact::updateOnlineStatus()
{
- Kopete::OnlineStatus::StatusType newStatus = Kopete::OnlineStatus::Unknown;
- Kopete::OnlineStatus mostSignificantStatus;
+ Kopete::OnlineStatus::StatusType newtqStatus = Kopete::OnlineStatus::Unknown;
+ Kopete::OnlineStatus mostSignificanttqStatus;
for ( TQPtrListIterator<Contact> it( d->contacts ); it.current(); ++it )
{
// find most significant status
- if ( it.current()->onlineStatus() > mostSignificantStatus )
- mostSignificantStatus = it.current()->onlineStatus();
+ if ( it.current()->onlinetqStatus() > mostSignificanttqStatus )
+ mostSignificanttqStatus = it.current()->onlinetqStatus();
}
- newStatus = mostSignificantStatus.status();
+ newtqStatus = mostSignificanttqStatus.status();
- if( newStatus != d->onlineStatus )
+ if( newtqStatus != d->onlinetqStatus )
{
- d->onlineStatus = newStatus;
- emit onlineStatusChanged( this, d->onlineStatus );
+ d->onlinetqStatus = newtqStatus;
+ emit onlineStatusChanged( this, d->onlinetqStatus );
}
}
void MetaContact::removeContact(Contact *c, bool deleted)
{
- if( !d->contacts.contains( c ) )
+ if( !d->contacts.tqcontains( c ) )
{
kdDebug(14010) << k_funcinfo << " Contact is not in this metaContact " << endl;
}
@@ -257,7 +257,7 @@ void MetaContact::removeContact(Contact *c, bool deleted)
}
if(!deleted)
- { //If this function is tell by slotContactRemoved, c is maybe just a QObject
+ { //If this function is tell by slotContactRemoved, c is maybe just a TQObject
disconnect( c, TQT_SIGNAL( onlineStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ),
this, TQT_SLOT( slotContactStatusChanged( Kopete::Contact *, const Kopete::OnlineStatus &, const Kopete::OnlineStatus & ) ) );
disconnect( c, TQT_SIGNAL( propertyChanged( Kopete::Contact *, const TQString &, const TQVariant &, const TQVariant & ) ),
@@ -272,7 +272,7 @@ void MetaContact::removeContact(Contact *c, bool deleted)
KABCPersistence::self()->write( this );
}
- // Reparent the contact
+ // Retqparent the contact
removeChild( c );
emit contactRemoved( c );
@@ -415,14 +415,14 @@ Contact *MetaContact::preferredContact()
continue;
}
- if( c->onlineStatus().status() > contact->onlineStatus().status() )
+ if( c->onlinetqStatus().status() > contact->onlinetqStatus().status() )
contact=c; //this contact has a better status
- else if ( c->onlineStatus().status() == contact->onlineStatus().status() )
+ else if ( c->onlinetqStatus().status() == contact->onlinetqStatus().status() )
{
if( c->account()->priority() > contact->account()->priority() )
contact=c;
else if( c->account()->priority() == contact->account()->priority()
- && c->onlineStatus().weight() > contact->onlineStatus().weight() )
+ && c->onlinetqStatus().weight() > contact->onlinetqStatus().weight() )
contact = c; //the weight is not supposed to follow the same scale for each protocol
}
}
@@ -507,13 +507,13 @@ TQString MetaContact::statusString() const
return i18n( "Offline" );
case OnlineStatus::Unknown:
default:
- return i18n( "Status not available" );
+ return i18n( "tqStatus not available" );
}
}
OnlineStatus::StatusType MetaContact::status() const
{
- return d->onlineStatus;
+ return d->onlinetqStatus;
}
bool MetaContact::isOnline() const
@@ -566,7 +566,7 @@ void MetaContact::sendFile( const KURL &sourceURL, const TQString &altFileName,
Contact *contact = d->contacts.first();
for( TQPtrListIterator<Contact> it( d->contacts ) ; it.current(); ++it )
{
- if( ( *it )->onlineStatus() > contact->onlineStatus() && ( *it )->canAcceptFiles() )
+ if( ( *it )->onlinetqStatus() > contact->onlinetqStatus() && ( *it )->canAcceptFiles() )
contact = *it;
}
@@ -640,7 +640,7 @@ TQString MetaContact::displayName() const
TQString nameFromKABC( const TQString &id ) /*const*/
{
KABC::AddressBook* ab = KABCPersistence::self()->addressBook();
- if ( ! id.isEmpty() && !id.contains(':') )
+ if ( ! id.isEmpty() && !id.tqcontains(':') )
{
KABC::Addressee theAddressee = ab->findByUid(id);
if ( theAddressee.isEmpty() )
@@ -653,20 +653,20 @@ TQString nameFromKABC( const TQString &id ) /*const*/
}
}
// no kabc association, return null image
- return TQString::null;
+ return TQString();
}
TQString nameFromContact( Kopete::Contact *c) /*const*/
{
if ( !c )
- return TQString::null;
+ return TQString();
TQString contactName;
if ( c->hasProperty( Kopete::Global::Properties::self()->nickName().key() ) )
contactName = c->property( Global::Properties::self()->nickName()).value().toString();
//the replace is there to workaround the Bug 95444
- return contactName.isEmpty() ? c->contactId() : contactName.replace('\n',TQString::fromUtf8(""));
+ return contactName.isEmpty() ? c->contactId() : contactName.tqreplace('\n',TQString::fromUtf8(""));
}
KURL MetaContact::customPhoto() const
@@ -690,7 +690,7 @@ TQImage MetaContact::photo() const
if( picture().image().width() > 96 && picture().image().height() > 96 )
{
kdDebug( 14010 ) << k_funcinfo << "Resizing image from " << picture().image().width() << " x " << picture().image().height() << endl;
- return picture().image().smoothScale(96,96,TQImage::ScaleMin);
+ return picture().image().smoothScale(96,96,TQ_ScaleMin);
}
else
return picture().image();
@@ -739,7 +739,7 @@ TQImage photoFromContact( Kopete::Contact *contact) /*const*/
TQImage photoFromKABC( const TQString &id ) /*const*/
{
KABC::AddressBook* ab = KABCPersistence::self()->addressBook();
- if ( ! id.isEmpty() && !id.contains(':') )
+ if ( ! id.isEmpty() && !id.tqcontains(':') )
{
KABC::Addressee theAddressee = ab->findByUid(id);
if ( theAddressee.isEmpty() )
@@ -859,14 +859,14 @@ void MetaContact::slotPropertyChanged( Contact* subcontact, const TQString &key,
void MetaContact::moveToGroup( Group *from, Group *to )
{
- if ( !from || !groups().contains( from ) )
+ if ( !from || !groups().tqcontains( from ) )
{
// We're adding, not moving, because 'from' is illegal
addToGroup( to );
return;
}
- if ( !to || groups().contains( to ) )
+ if ( !to || groups().tqcontains( to ) )
{
// We're removing, not moving, because 'to' is illegal
removeFromGroup( from );
@@ -890,7 +890,7 @@ void MetaContact::moveToGroup( Group *from, Group *to )
void MetaContact::removeFromGroup( Group *group )
{
- if ( !group || !groups().contains( group ) || ( isTemporary() && group->type() == Group::Temporary ) )
+ if ( !group || !groups().tqcontains( group ) || ( isTemporary() && group->type() == Group::Temporary ) )
{
return;
}
@@ -912,13 +912,13 @@ void MetaContact::removeFromGroup( Group *group )
void MetaContact::addToGroup( Group *to )
{
- if ( !to || groups().contains( to ) )
+ if ( !to || groups().tqcontains( to ) )
return;
if ( d->temporary && to->type() != Group::Temporary )
return;
- if ( d->groups.contains( Group::topLevel() ) )
+ if ( d->groups.tqcontains( Group::topLevel() ) )
{
d->groups.remove( Group::topLevel() );
emit removedFromGroup( this, Group::topLevel() );
@@ -1058,7 +1058,7 @@ bool MetaContact::fromXML( const TQDomElement& element )
// return false;
//the replace is there to workaround the Bug 95444
- d->displayName = contactElement.text().replace('\n',TQString::fromUtf8(""));
+ d->displayName = contactElement.text().tqreplace('\n',TQString::fromUtf8(""));
if ( contactElement.hasAttribute(NSCID_ELEM) && contactElement.hasAttribute(NSPID_ELEM) && contactElement.hasAttribute(NSAID_ELEM))
{
@@ -1162,8 +1162,8 @@ bool MetaContact::fromXML( const TQDomElement& element )
}
else if( contactElement.tagName() == TQString::fromUtf8( "address-book-field" ) )
{
- TQString app = contactElement.attribute( TQString::fromUtf8( "app" ), TQString::null );
- TQString key = contactElement.attribute( TQString::fromUtf8( "key" ), TQString::null );
+ TQString app = contactElement.attribute( TQString::fromUtf8( "app" ), TQString() );
+ TQString key = contactElement.attribute( TQString::fromUtf8( "key" ), TQString() );
TQString val = contactElement.text();
d->addressBook[ app ][ key ] = val;
}
@@ -1291,7 +1291,7 @@ void MetaContact::slotUpdateAddressBookPicture()
{
KABC::AddressBook* ab = KABCPersistence::self()->addressBook();
TQString id = metaContactId();
- if ( !id.isEmpty() && !id.contains(':') )
+ if ( !id.isEmpty() && !id.tqcontains(':') )
{
KABC::Addressee theAddressee = ab->findByUid(id);
if ( theAddressee.isEmpty() )
@@ -1338,7 +1338,7 @@ TQString MetaContact::metaContactId() const
{
Contact *c=d->contacts.first();
if(!c)
- return TQString::null;
+ return TQString();
return c->protocol()->pluginId()+TQString::fromUtf8(":")+c->account()->accountId()+TQString::fromUtf8(":") + c->contactId() ;
}
return d->metaContactId;
@@ -1360,7 +1360,7 @@ void MetaContact::setMetaContactId( const TQString& newMetaContactId )
// other programs may have written that data and depend on it
d->metaContactId = newMetaContactId;
KABCPersistence::self()->write( this );
- emit onlineStatusChanged( this, d->onlineStatus );
+ emit onlineStatusChanged( this, d->onlinetqStatus );
emit persistentDataChanged();
}