summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/msn/msncontact.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/msn/msncontact.cpp')
-rw-r--r--kopete/protocols/msn/msncontact.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/kopete/protocols/msn/msncontact.cpp b/kopete/protocols/msn/msncontact.cpp
index c6ef14f8..8e7742f0 100644
--- a/kopete/protocols/msn/msncontact.cpp
+++ b/kopete/protocols/msn/msncontact.cpp
@@ -50,8 +50,8 @@
#include "msnnotifysocket.h"
#include "msnaccount.h"
-MSNContact::MSNContact( Kopete::Account *account, const TQString &id, Kopete::MetaContact *parent )
-: Kopete::Contact( account, id, parent )
+MSNContact::MSNContact( Kopete::Account *account, const TQString &id, Kopete::MetaContact *tqparent )
+: Kopete::Contact( account, id, tqparent )
{
m_deleted = false;
m_allowed = false;
@@ -75,7 +75,7 @@ MSNContact::MSNContact( Kopete::Account *account, const TQString &id, Kopete::Me
// wizard, and it can be because we are creating a temporary contact.
// if it's added by the wizard, the status will be set immediately after.
// if it's a temporary contact, better to set the unknown status.
- setOnlineStatus( ( parent && parent->isTemporary() ) ? MSNProtocol::protocol()->UNK : MSNProtocol::protocol()->FLN );
+ setOnlineStatus( ( tqparent && tqparent->isTemporary() ) ? MSNProtocol::protocol()->UNK : MSNProtocol::protocol()->FLN );
actionBlock = 0L;
@@ -89,7 +89,7 @@ MSNContact::~MSNContact()
bool MSNContact::isReachable()
{
- if ( account()->isConnected() && isOnline() && account()->myself()->onlineStatus() != MSNProtocol::protocol()->HDN )
+ if ( account()->isConnected() && isOnline() && account()->myself()->onlinetqStatus() != MSNProtocol::protocol()->HDN )
return true;
MSNChatSession *kmm=dynamic_cast<MSNChatSession*>(manager(Kopete::Contact::CannotCreate));
@@ -98,13 +98,13 @@ bool MSNContact::isReachable()
// When we are invisible we can't start a chat with others, make isReachable return false
// (This is an MSN limitation, not a problem in Kopete)
- if ( !account()->isConnected() || account()->myself()->onlineStatus() == MSNProtocol::protocol()->HDN )
+ if ( !account()->isConnected() || account()->myself()->onlinetqStatus() == MSNProtocol::protocol()->HDN )
return false;
//if the contact is offline, it is impossible to send it a message. but it is impossible
//to be sure the contact is realy offline. For example, if the contact is not on the contactlist for
//some reason.
- if( onlineStatus() == MSNProtocol::protocol()->FLN && ( isAllowed() || isBlocked() ) && !serverGroups().isEmpty() )
+ if( onlinetqStatus() == MSNProtocol::protocol()->FLN && ( isAllowed() || isBlocked() ) && !serverGroups().isEmpty() )
return false;
return true;
@@ -178,20 +178,20 @@ void MSNContact::slotBlockUser()
if( m_blocked )
{
- notify->removeContact( contactId(), MSNProtocol::BL, TQString::null, TQString::null );
+ notify->removeContact( contactId(), MSNProtocol::BL, TQString(), TQString() );
}
else
{
if(m_allowed)
- notify->removeContact( contactId(), MSNProtocol::AL, TQString::null, TQString::null );
+ notify->removeContact( contactId(), MSNProtocol::AL, TQString(), TQString() );
else
- notify->addContact( contactId(), MSNProtocol::BL, TQString::null, TQString::null, TQString::null );
+ notify->addContact( contactId(), MSNProtocol::BL, TQString(), TQString(), TQString() );
}
}
void MSNContact::slotUserInfo()
{
- KDialogBase *infoDialog=new KDialogBase( 0l, "infoDialog", /*modal = */false, TQString::null, KDialogBase::Close , KDialogBase::Close, false );
+ KDialogBase *infoDialog=new KDialogBase( 0l, "infoDialog", /*modal = */false, TQString(), KDialogBase::Close , KDialogBase::Close, false );
TQString nick=property( Kopete::Global::Properties::self()->nickName()).value().toString();
TQString personalMessage=property( MSNProtocol::protocol()->propPersonalMessage).value().toString();
MSNInfo *info=new MSNInfo ( infoDialog,"info");
@@ -237,7 +237,7 @@ void MSNContact::deleteContact()
// Then trully remove it from server contact list,
// because only removing the contact from his groups isn't sufficent from MSNP11.
kdDebug( 14140 ) << k_funcinfo << "Removing contact from top-level." << endl;
- notify->removeContact( contactId(), MSNProtocol::FL, guid(), TQString::null);
+ notify->removeContact( contactId(), MSNProtocol::FL, guid(), TQString());
}
else
{
@@ -264,8 +264,8 @@ void MSNContact::setBlocked( bool blocked )
{
m_blocked = blocked;
//update the status
- setOnlineStatus(m_currentStatus);
- //m_currentStatus is used here. previously it was onlineStatus() but this may cause problem when
+ setOnlineStatus(m_currenttqStatus);
+ //m_currenttqStatus is used here. previously it was onlinetqStatus() but this may cause problem when
// the account is offline because of the Kopete::Contact::OnlineStatus() account offline hack.
}
}
@@ -317,7 +317,7 @@ void MSNContact::setClientFlags( uint flags )
setProperty( MSNProtocol::protocol()->propClient , i18n("Windows Mobile") );
else if( flags & MSNProtocol::MSNMobileDevice)
setProperty( MSNProtocol::protocol()->propClient , i18n("MSN Mobile") );
- else if( m_obj.contains("kopete") )
+ else if( m_obj.tqcontains("kopete") )
setProperty( MSNProtocol::protocol()->propClient , i18n("Kopete") );
}
@@ -427,7 +427,7 @@ void MSNContact::sync( unsigned int changed )
// and then, the same command can be sent twice.
// FIXME: if this method is called a seconds times, that mean change can be
// done in the contactlist. we should found a way to recall this
- // method later. (a QTimer?)
+ // method later. (a TQTimer?)
kdDebug( 14140 ) << k_funcinfo << " This contact is already moving. Abort sync id: " << contactId() << endl;
return;
}
@@ -458,14 +458,14 @@ void MSNContact::sync( unsigned int changed )
if( !group->pluginData( protocol() , account()->accountId() + " id" ).isEmpty() )
{
TQString Gid=group->pluginData( protocol(), account()->accountId() + " id" );
- if( !static_cast<MSNAccount*>( account() )->m_groupList.contains(Gid) )
+ if( !static_cast<MSNAccount*>( account() )->m_groupList.tqcontains(Gid) )
{ // ohoh! something is corrupted on the contactlist.xml
// anyway, we never should add a contact to an unexisting group on the server.
// This shouln't be possible anymore 2004-06-10 -Olivier
//repair the problem
- group->setPluginData( protocol() , account()->accountId() + " id" , TQString::null);
- group->setPluginData( protocol() , account()->accountId() + " displayName" , TQString::null);
+ group->setPluginData( protocol() , account()->accountId() + " id" , TQString());
+ group->setPluginData( protocol() , account()->accountId() + " displayName" , TQString());
kdWarning( 14140 ) << k_funcinfo << " Group " << group->displayName() << " marked with id #" <<Gid << " does not seems to be anymore on the server" << endl;
if(!group->displayName().isEmpty() && group->type() == Kopete::Group::Normal) //not the top-level
@@ -476,10 +476,10 @@ void MSNContact::sync( unsigned int changed )
m_moving=true;
}
}
- else if( !m_serverGroups.contains(Gid) )
+ else if( !m_serverGroups.tqcontains(Gid) )
{
//Add the contact to the group on the server
- notify->addContact( contactId(), MSNProtocol::FL, TQString::null, guid(), Gid );
+ notify->addContact( contactId(), MSNProtocol::FL, TQString(), guid(), Gid );
count++;
m_moving=true;
}
@@ -506,7 +506,7 @@ void MSNContact::sync( unsigned int changed )
for( TQMap<TQString, Kopete::Group*>::Iterator it = m_serverGroups.begin();(count > 1 && it != m_serverGroups.end()); ++it )
{
- if( !static_cast<MSNAccount*>( account() )->m_groupList.contains(it.key()) )
+ if( !static_cast<MSNAccount*>( account() )->m_groupList.tqcontains(it.key()) )
{ // ohoh! something is corrupted on the contactlist.xml
// anyway, we never should add a contact to an unexisting group on the server.
@@ -523,7 +523,7 @@ void MSNContact::sync( unsigned int changed )
Kopete::Group *group=it.data();
if(!group) //we can't trust the data of it() see in MSNProtocol::deserializeContact why
group=static_cast<MSNAccount*>( account() )->m_groupList[it.key()];
- if( !metaContact()->groups().contains(group) )
+ if( !metaContact()->groups().tqcontains(group) )
{
m_moving=true;
notify->removeContact( contactId(), MSNProtocol::FL, guid(), it.key() );
@@ -539,7 +539,7 @@ void MSNContact::sync( unsigned int changed )
// we add the contact to the group #0 (the default one)
/*if(count==0)
{
-// notify->addContact( contactId(), MSNProtocol::FL, TQString::null, guid(), "0");
+// notify->addContact( contactId(), MSNProtocol::FL, TQString(), guid(), "0");
}*/
}
@@ -577,7 +577,7 @@ void MSNContact::rename( const TQString &newName )
void MSNContact::slotShowProfile()
{
- KRun::runURL( KURL( TQString::fromLatin1("http://members.msn.com/?pgmarket=it-it&mem=") + contactId()) , "text/html" );
+ KRun::runURL( KURL( TQString::tqfromLatin1("http://members.msn.com/?pgmarket=it-it&mem=") + contactId()) , "text/html" );
}
@@ -590,7 +590,7 @@ void MSNContact::sendFile( const KURL &sourceURL, const TQString &altFileName, u
//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);
@@ -598,7 +598,7 @@ void MSNContact::sendFile( const KURL &sourceURL, const TQString &altFileName, u
if ( !filePath.isEmpty() )
{
- Q_UINT32 fileSize = TQFileInfo(filePath).size();
+ TQ_UINT32 fileSize = TQFileInfo(filePath).size();
//Send the file
static_cast<MSNChatSession*>( manager(Kopete::Contact::CanCreate) )->sendFile( filePath, altFileName, fileSize );
@@ -615,7 +615,7 @@ void MSNContact::setOnlineStatus(const Kopete::OnlineStatus& status)
protocol() ,
status.internalStatus()+15 ,
status.overlayIcons() + TQStringList("msn_blocked") ,
- i18n("%1|Blocked").arg( status.description() ) ) );
+ i18n("%1|Blocked").tqarg( status.description() ) ) );
}
else if(!isBlocked() && status.internalStatus() >= 15)
{ //the user is not blocked, but the status is blocked
@@ -655,7 +655,7 @@ void MSNContact::setOnlineStatus(const Kopete::OnlineStatus& status)
}
else
Kopete::Contact::setOnlineStatus(status);
- m_currentStatus=status;
+ m_currenttqStatus=status;
}
void MSNContact::slotSendMail()
@@ -672,7 +672,7 @@ void MSNContact::setDisplayPicture(KTempFile *f)
//copy the temp file somewere else.
// in a better world, the file could be dirrectly wrote at the correct location.
// but the custom emoticon code is to deeply merged in the display picture code while it could be separated.
- TQString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ;
+ TQString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().tqreplace(TQRegExp("[./~]"),"-") +".png" ) ;
KIO::Job *j=KIO::file_move( KURL::fromPathOrURL( f->name() ) , KURL::fromPathOrURL( newlocation ) , -1, true /*overwrite*/ , false /*resume*/ , false /*showProgressInfo*/ );
@@ -685,7 +685,7 @@ void MSNContact::setDisplayPicture(KTempFile *f)
void MSNContact::slotEmitDisplayPictureChanged()
{
- TQString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ;
+ TQString newlocation=locateLocal( "appdata", "msnpictures/"+ contactId().lower().tqreplace(TQRegExp("[./~]"),"-") +".png" ) ;
setProperty( Kopete::Global::Properties::self()->photo() , newlocation );
emit displayPictureChanged();
}
@@ -703,7 +703,7 @@ void MSNContact::setObject(const TQString &obj)
KConfig *config = KGlobal::config();
config->setGroup( "MSN" );
if ( config->readNumEntry( "DownloadPicture", 2 ) >= 2 && !obj.isEmpty()
- && account()->myself()->onlineStatus().status() != Kopete::OnlineStatus::Invisible )
+ && account()->myself()->onlinetqStatus().status() != Kopete::OnlineStatus::Invisible )
manager(Kopete::Contact::CanCreate); //create the manager which will download the photo automatically.
}