summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/yahoo/yahooaccount.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-18 18:33:51 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-18 18:33:51 -0600
commit089118c18533dfa3e6ce5065dbebdd4db94051f1 (patch)
treece014fb2326a80fcfafa2362b7ff88486aa17c96 /kopete/protocols/yahoo/yahooaccount.cpp
parent83677e35509b4dafac63b76995652bdf3b49f209 (diff)
downloadtdenetwork-089118c18533dfa3e6ce5065dbebdd4db94051f1.tar.gz
tdenetwork-089118c18533dfa3e6ce5065dbebdd4db94051f1.zip
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'kopete/protocols/yahoo/yahooaccount.cpp')
-rw-r--r--kopete/protocols/yahoo/yahooaccount.cpp118
1 files changed, 59 insertions, 59 deletions
diff --git a/kopete/protocols/yahoo/yahooaccount.cpp b/kopete/protocols/yahoo/yahooaccount.cpp
index eabf6fdd..c6c861c9 100644
--- a/kopete/protocols/yahoo/yahooaccount.cpp
+++ b/kopete/protocols/yahoo/yahooaccount.cpp
@@ -109,7 +109,7 @@ YahooAccount::YahooAccount(YahooProtocol *parent, const TQString& accountId, con
// initConnectionSignals( MakeConnections );
- TQString displayName = configGroup()->readEntry(TQString::tqfromLatin1("displayName"), TQString());
+ TQString displayName = configGroup()->readEntry(TQString::fromLatin1("displayName"), TQString());
if(!displayName.isEmpty())
_myself->setNickName(displayName);
@@ -130,15 +130,15 @@ YahooAccount::~YahooAccount()
void YahooAccount::setServer( const TQString &server )
{
- configGroup()->writeEntry( TQString::tqfromLatin1( "Server" ), server );
+ configGroup()->writeEntry( TQString::fromLatin1( "Server" ), server );
}
void YahooAccount::setPort( int port )
{
- configGroup()->writeEntry( TQString::tqfromLatin1( "Port" ), port );
+ configGroup()->writeEntry( TQString::fromLatin1( "Port" ), port );
}
-void YahooAccount::slotGotqStatus( int status, const TQString &awayMessage)
+void YahooAccount::slotGoStatus( int status, const TQString &awayMessage)
{
kdDebug(YAHOO_GEN_DEBUG) << "GoStatus: " << status << " msg: " << awayMessage << endl;
if( !isConnected() )
@@ -148,7 +148,7 @@ void YahooAccount::slotGotqStatus( int status, const TQString &awayMessage)
}
else
{
- m_session->changetqStatus( Yahoo::tqStatus( status ), awayMessage,
+ m_session->changeStatus( Yahoo::Status( status ), awayMessage,
(status == Yahoo::StatusAvailable)? Yahoo::StatusTypeAvailable : Yahoo::StatusTypeAway );
//sets the awayMessage property for the owner of the account. shows up in the statusbar icon's tooltip. the property is unset when awayMessage is null
@@ -265,8 +265,8 @@ void YahooAccount::initConnectionSignals( enum SignalConnectionType sct )
TQObject::connect(m_session, TQT_SIGNAL(statusChanged(const TQString&,int,const TQString&,int,int,int)),
this, TQT_SLOT(slotStatusChanged(const TQString&,int,const TQString&,int,int,int)));
- TQObject::connect(m_session, TQT_SIGNAL(stealthStatusChanged(const TQString &, Yahoo::StealthtqStatus)),
- this, TQT_SLOT(slotStealthStatusChanged( const TQString &, Yahoo::StealthtqStatus)) );
+ TQObject::connect(m_session, TQT_SIGNAL(stealthStatusChanged(const TQString &, Yahoo::StealthStatus)),
+ this, TQT_SLOT(slotStealthStatusChanged( const TQString &, Yahoo::StealthStatus)) );
TQObject::connect(m_session, TQT_SIGNAL(gotIm(const TQString&, const TQString&, long, int)),
this, TQT_SLOT(slotGotIm(const TQString &, const TQString&, long, int)));
@@ -407,8 +407,8 @@ void YahooAccount::initConnectionSignals( enum SignalConnectionType sct )
TQObject::disconnect(m_session, TQT_SIGNAL(statusChanged(const TQString&,int,const TQString&,int,int,int)),
this, TQT_SLOT(slotStatusChanged(const TQString&,int,const TQString&,int,int,int)));
- TQObject::disconnect(m_session, TQT_SIGNAL(stealthStatusChanged(const TQString &, Yahoo::StealthtqStatus)),
- this, TQT_SLOT(slotStealthStatusChanged( const TQString &, Yahoo::StealthtqStatus)) );
+ TQObject::disconnect(m_session, TQT_SIGNAL(stealthStatusChanged(const TQString &, Yahoo::StealthStatus)),
+ this, TQT_SLOT(slotStealthStatusChanged( const TQString &, Yahoo::StealthStatus)) );
TQObject::disconnect(m_session, TQT_SIGNAL(gotIm(const TQString&, const TQString&, long, int)),
this, TQT_SLOT(slotGotIm(const TQString &, const TQString&, long, int)));
@@ -526,7 +526,7 @@ void YahooAccount::connectWithPassword( const TQString &passwd )
}
if ( isConnected() ||
- myself()->onlinetqStatus() == m_protocol->Connecting )
+ myself()->onlineStatus() == m_protocol->Connecting )
{
kdDebug(YAHOO_GEN_DEBUG) << "Yahoo plugin: Ignoring connect request (already connected)." << endl;
return;
@@ -549,7 +549,7 @@ void YahooAccount::connectWithPassword( const TQString &passwd )
kdDebug(YAHOO_GEN_DEBUG) << "Attempting to connect to Yahoo on <" << server << ":"
<< port << ">. user <" << accountId() << ">" << endl;
static_cast<YahooContact *>( myself() )->setOnlineStatus( m_protocol->Connecting );
- m_session->setStatusOnConnect( Yahoo::tqStatus( initialtqStatus().internalStatus() ) );
+ m_session->setStatusOnConnect( Yahoo::Status( initialStatus().internalStatus() ) );
m_session->connect( server, port, accountId().lower(), passwd );
}
@@ -607,9 +607,9 @@ void YahooAccount::setAway(bool status, const TQString &awayMessage)
kdDebug(YAHOO_GEN_DEBUG) ;
if( awayMessage.isEmpty() )
- slotGotqStatus( status ? 2 : 0 );
+ slotGoStatus( status ? 2 : 0 );
else
- slotGotqStatus( status ? 99 : 0, awayMessage );
+ slotGoStatus( status ? 99 : 0, awayMessage );
}
void YahooAccount::slotConnected()
@@ -623,7 +623,7 @@ void YahooAccount::slotGoOnline()
if( !isConnected() )
connect( m_protocol->Online );
else
- slotGotqStatus(0);
+ slotGoStatus(0);
}
void YahooAccount::slotGoOffline()
@@ -722,9 +722,9 @@ void YahooAccount::slotLoginResponse( int succ , const TQString &url )
setupActions( succ == Yahoo::LoginOk );
if ( succ == Yahoo::LoginOk || (succ == Yahoo::LoginDupl && m_lastDisconnectCode == 2) )
{
- if ( initialtqStatus().internalStatus() )
+ if ( initialStatus().internalStatus() )
{
- static_cast<YahooContact *>( myself() )->setOnlineStatus( initialtqStatus() );
+ static_cast<YahooContact *>( myself() )->setOnlineStatus( initialStatus() );
}
else
{
@@ -802,7 +802,7 @@ void YahooAccount::slotDisconnected()
TQString message;
message = i18n( "%1 has been disconnected.\nError message:\n%2 - %3" )
.tqarg( accountId() ).tqarg( m_session->error() ).tqarg( m_session->errorString() );
- KNotification::event( "connection_lost", message, myself()->onlinetqStatus().protocolIcon() );
+ KNotification::event( "connection_lost", message, myself()->onlineStatus().protocolIcon() );
}
void YahooAccount::slotLoginFailed()
@@ -815,7 +815,7 @@ void YahooAccount::slotLoginFailed()
TQString message;
message = i18n( "There was an error while connecting %1 to the Yahoo server.\nError message:\n%2 - %3" )
.tqarg( accountId()).tqarg( m_session->error() ).tqarg( m_session->errorString() );
- KNotification::event( "cannot_connect", message, myself()->onlinetqStatus().protocolIcon() );
+ KNotification::event( "cannot_connect", message, myself()->onlineStatus().protocolIcon() );
}
void YahooAccount::slotError( int level )
@@ -889,7 +889,7 @@ void YahooAccount::slotAuthorizationAccepted( const TQString &who )
kdDebug(YAHOO_GEN_DEBUG) ;
TQString message;
message = i18n( "User %1 has granted your authorization request." ).tqarg( who );
- KNotification::event( TQString::tqfromLatin1("kopete_authorization"), message );
+ KNotification::event( TQString::fromLatin1("kopete_authorization"), message );
if( contact( who ) )
contact( who )->setOnlineStatus( m_protocol->Online );
@@ -901,7 +901,7 @@ void YahooAccount::slotAuthorizationRejected( const TQString &who, const TQStrin
TQString message;
message = i18n( "User %1 has rejected your authorization request.\n%2" )
.tqarg( who ).tqarg( msg );
- KNotification::event( TQString::tqfromLatin1("kopete_authorization"), message );
+ KNotification::event( TQString::fromLatin1("kopete_authorization"), message );
}
void YahooAccount::slotgotAuthorizationRequest( const TQString &user, const TQString &msg, const TQString &name )
@@ -995,24 +995,24 @@ void YahooAccount::slotStatusChanged( const TQString &who, int stat, const TQStr
if ( kc )
{
- Kopete::OnlineStatus newtqStatus = m_protocol->statusFromYahoo( stat );
- Kopete::OnlineStatus oldtqStatus = kc->onlinetqStatus();
+ Kopete::OnlineStatus newStatus = m_protocol->statusFromYahoo( stat );
+ Kopete::OnlineStatus oldStatus = kc->onlineStatus();
- if( newtqStatus == m_protocol->Custom ) {
+ if( newStatus == m_protocol->Custom ) {
if( away == 0 )
- newtqStatus =m_protocol->Online;
+ newStatus =m_protocol->Online;
kc->setProperty( m_protocol->awayMessage, msg);
}
else
kc->removeProperty( m_protocol->awayMessage );
// from original file
- if( newtqStatus != m_protocol->Offline && oldtqStatus == m_protocol->Offline && contact(who) != myself() )
+ if( newStatus != m_protocol->Offline && oldStatus == m_protocol->Offline && contact(who) != myself() )
{
//m_session->requestBuddyIcon( who ); // Try to get Buddy Icon
if ( !myself()->property( Kopete::Global::Properties::self()->photo() ).isNull() &&
- myself()->onlinetqStatus() != m_protocol->Invisible &&
+ myself()->onlineStatus() != m_protocol->Invisible &&
!kc->stealthed() )
{
kc->sendBuddyIconUpdate( m_session->pictureFlag() );
@@ -1020,19 +1020,19 @@ void YahooAccount::slotStatusChanged( const TQString &who, int stat, const TQStr
}
}
- //if( newtqStatus == static_cast<YahooProtocol*>( m_protocol )->Idle ) {
- if( newtqStatus == m_protocol->Idle )
+ //if( newStatus == static_cast<YahooProtocol*>( m_protocol )->Idle ) {
+ if( newStatus == m_protocol->Idle )
kc->setIdleTime( idle ? idle : 1 );
else
kc->setIdleTime( 0 );
- kc->setOnlineStatus( newtqStatus );
+ kc->setOnlineStatus( newStatus );
slotGotBuddyIconChecksum( who, pictureChecksum );
}
}
-void YahooAccount::slotStealthStatusChanged( const TQString &who, Yahoo::StealthtqStatus state )
+void YahooAccount::slotStealthStatusChanged( const TQString &who, Yahoo::StealthStatus state )
{
//kdDebug(YAHOO_GEN_DEBUG) << "Stealth Status of " << who << "changed to " << state;
@@ -1053,7 +1053,7 @@ TQString YahooAccount::prepareIncomingMessage( const TQString &messageText )
kdDebug(YAHOO_GEN_DEBUG) << "Message after stripping color codes '" << newMsgText << "'" << endl;
- newMsgText.replace( TQString::tqfromLatin1( "&" ), TQString::tqfromLatin1( "&amp;" ) );
+ newMsgText.replace( TQString::fromLatin1( "&" ), TQString::fromLatin1( "&amp;" ) );
// Replace Font tags
regExp.setMinimal( true );
@@ -1063,7 +1063,7 @@ TQString YahooAccount::prepareIncomingMessage( const TQString &messageText )
pos = regExp.search( newMsgText, pos );
if ( pos >= 0 ) {
pos += regExp.matchedLength();
- newMsgText.replace( regExp, TQString::tqfromLatin1("<font\\1style=\"font-size:\\2pt\">" ) );
+ newMsgText.replace( regExp, TQString::fromLatin1("<font\\1style=\"font-size:\\2pt\">" ) );
}
}
@@ -1095,7 +1095,7 @@ TQString YahooAccount::prepareIncomingMessage( const TQString &messageText )
pos = regExp.search( newMsgText, pos );
if ( pos >= 0 ) {
pos += regExp.matchedLength();
- newMsgText.replace( regExp, TQString::tqfromLatin1("&lt;" ) );
+ newMsgText.replace( regExp, TQString::fromLatin1("&lt;" ) );
}
}
regExp.setPattern( "([^\"bui])>" );
@@ -1104,22 +1104,22 @@ TQString YahooAccount::prepareIncomingMessage( const TQString &messageText )
pos = regExp.search( newMsgText, pos );
if ( pos >= 0 ) {
pos += regExp.matchedLength();
- newMsgText.replace( regExp, TQString::tqfromLatin1("\\1&gt;" ) );
+ newMsgText.replace( regExp, TQString::fromLatin1("\\1&gt;" ) );
}
}
// add closing tags when needed
regExp.setMinimal( false );
regExp.setPattern( "(<b>.*)(?!</b>)" );
- newMsgText.replace( regExp, TQString::tqfromLatin1("\\1</b>" ) );
+ newMsgText.replace( regExp, TQString::fromLatin1("\\1</b>" ) );
regExp.setPattern( "(<i>.*)(?!</i>)" );
- newMsgText.replace( regExp, TQString::tqfromLatin1("\\1</i>" ) );
+ newMsgText.replace( regExp, TQString::fromLatin1("\\1</i>" ) );
regExp.setPattern( "(<u>.*)(?!</u>)" );
- newMsgText.replace( regExp, TQString::tqfromLatin1("\\1</u>" ) );
+ newMsgText.replace( regExp, TQString::fromLatin1("\\1</u>" ) );
regExp.setPattern( "(<font.*)(?!</font>)" );
- newMsgText.replace( regExp, TQString::tqfromLatin1("\\1</font>" ) );
+ newMsgText.replace( regExp, TQString::fromLatin1("\\1</font>" ) );
- newMsgText.replace( TQString::tqfromLatin1( "\r" ), TQString::tqfromLatin1( "<br/>" ) );
+ newMsgText.replace( TQString::fromLatin1( "\r" ), TQString::fromLatin1( "<br/>" ) );
return newMsgText;
}
@@ -1143,7 +1143,7 @@ void YahooAccount::slotGotIm( const TQString &who, const TQString &msg, long tm,
// FIXME to check
if (tm == 0)
- //msgDT = TQDateTime( TQDate::tqcurrentDate(), TQTime::currentTime(), TQt::LocalTime );
+ //msgDT = TQDateTime( TQDate::currentDate(), TQTime::currentTime(), TQt::LocalTime );
msgDT.setTime_t(time(0L));
else
//msgDT = TQDateTime::fromTime_t(tm);
@@ -1181,7 +1181,7 @@ void YahooAccount::slotGotBuzz( const TQString &who, long tm )
// FIXME: to check
if (tm == 0)
- //msgDT = TQDateTime( TQDate::tqcurrentDate(), TQTime::currentTime(), TQt::LocalTime );
+ //msgDT = TQDateTime( TQDate::currentDate(), TQTime::currentTime(), TQt::LocalTime );
msgDT.setTime_t(time(0L));
else
//msgDT = TQDateTime::fromTime_t(tm);
@@ -1642,7 +1642,7 @@ void YahooAccount::slotMailNotify( const TQString& from, const TQString& subjec
if ( cnt > 0 && from.isEmpty() )
{
- TQObject::connect(KNotification::event( TQString::tqfromLatin1("yahoo_mail"), i18n( "You have one unread message in your Yahoo inbox.",
+ TQObject::connect(KNotification::event( TQString::fromLatin1("yahoo_mail"), i18n( "You have one unread message in your Yahoo inbox.",
"You have %n unread messages in your Yahoo inbox.", cnt ), TQPixmap() , 0 ),
TQT_SIGNAL(activated(unsigned int ) ) , this, TQT_SLOT( slotOpenInbox() ) );
@@ -1651,7 +1651,7 @@ void YahooAccount::slotMailNotify( const TQString& from, const TQString& subjec
else if ( cnt > 0 )
{ kdDebug(YAHOO_GEN_DEBUG) << "attempting to trigger event" << endl;
- TQObject::connect(KNotification::event( TQString::tqfromLatin1("yahoo_mail"), i18n( "You have a message from %1 in your Yahoo inbox. <br><br>Subject: %2").tqarg( from ).tqarg( subject ),
+ TQObject::connect(KNotification::event( TQString::fromLatin1("yahoo_mail"), i18n( "You have a message from %1 in your Yahoo inbox. <br><br>Subject: %2").tqarg( from ).tqarg( subject ),
TQPixmap() , 0 ), TQT_SIGNAL(activated(unsigned int ) ) , this, TQT_SLOT( slotOpenInbox() ) );
m_currentMailCount = cnt;
@@ -1777,7 +1777,7 @@ void YahooAccount::setBuddyIcon( const KURL &url )
myself()->removeProperty( YahooProtocol::protocol()->iconExpire );
if ( m_session )
- m_session->setPicturetqStatus( Yahoo::NoPicture );
+ m_session->setPictureStatus( Yahoo::NoPicture );
}
else
{
@@ -1827,7 +1827,7 @@ void YahooAccount::setBuddyIcon( const KURL &url )
configGroup()->writeEntry( "iconLocalUrl", newlocation );
if ( checksum != static_cast<uint>(myself()->property( YahooProtocol::protocol()->iconCheckSum ).value().toInt()) ||
- TQDateTime::tqcurrentDateTime().toTime_t() > expire )
+ TQDateTime::currentDateTime().toTime_t() > expire )
{
myself()->setProperty( YahooProtocol::protocol()->iconCheckSum, checksum );
configGroup()->writeEntry( "iconCheckSum", checksum );
@@ -1848,7 +1848,7 @@ void YahooAccount::slotBuddyIconChanged( const TQString &url, int expires )
myself()->setProperty( YahooProtocol::protocol()->iconExpire , expires );
configGroup()->writeEntry( "iconRemoteUrl", url );
configGroup()->writeEntry( "iconExpire", expires );
- m_session->setPicturetqStatus( Yahoo::Picture );
+ m_session->setPictureStatus( Yahoo::Picture );
m_session->sendPictureChecksum( TQString(), checksum );
}
}
@@ -1928,52 +1928,52 @@ void YahooAccount::slotWebcamPaused( const TQString &who )
void YahooAccount::setOnlineStatus( const Kopete::OnlineStatus &status, const TQString &reason)
{
kdDebug(YAHOO_GEN_DEBUG) ;
- if ( myself()->onlinetqStatus().status() == Kopete::OnlineStatus::Offline &&
+ if ( myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline &&
status.status() != Kopete::OnlineStatus::Offline )
{
if( !reason.isEmpty() )
m_session->setStatusMessageOnConnect( reason );
connect( status );
}
- else if ( myself()->onlinetqStatus().status() != Kopete::OnlineStatus::Offline &&
+ else if ( myself()->onlineStatus().status() != Kopete::OnlineStatus::Offline &&
status.status() == Kopete::OnlineStatus::Offline )
{
disconnect();
}
- else if ( myself()->onlinetqStatus().status() != Kopete::OnlineStatus::Offline &&
+ else if ( myself()->onlineStatus().status() != Kopete::OnlineStatus::Offline &&
status.internalStatus() == 2 && !reason.isEmpty())
{
- slotGotqStatus( 99, reason );
+ slotGoStatus( 99, reason );
}
- else if ( myself()->onlinetqStatus().status() != Kopete::OnlineStatus::Offline &&
+ else if ( myself()->onlineStatus().status() != Kopete::OnlineStatus::Offline &&
status.internalStatus() == 99 && reason.isEmpty())
{
- slotGotqStatus( 2, reason );
+ slotGoStatus( 2, reason );
}
- else if ( myself()->onlinetqStatus().status() != Kopete::OnlineStatus::Offline )
+ else if ( myself()->onlineStatus().status() != Kopete::OnlineStatus::Offline )
{
- slotGotqStatus( status.internalStatus(), reason );
+ slotGoStatus( status.internalStatus(), reason );
}
}
/* FIXME: not ported yet
void YahooAccount::setStatusMessage(const Kopete::StatusMessage &statusMessage)
{
- int currenttqStatus = myself()->onlinetqStatus().internalStatus();
- m_session->changetqStatus( Yahoo::tqStatus( currenttqStatus ), statusMessage.message(),
- (currenttqStatus == Yahoo::StatusAvailable)? Yahoo::StatusTypeAvailable : Yahoo::StatusTypeAway );
+ int currentStatus = myself()->onlineStatus().internalStatus();
+ m_session->changeStatus( Yahoo::Status( currentStatus ), statusMessage.message(),
+ (currentStatus == Yahoo::StatusAvailable)? Yahoo::StatusTypeAvailable : Yahoo::StatusTypeAway );
myself()->setStatusMessage( statusMessage );
}
*/
void YahooAccount::slotOpenInbox()
{
- KRun::runURL( KURL( TQString::tqfromLatin1("http://mail.yahoo.com/") ) , "text/html" );
+ KRun::runURL( KURL( TQString::fromLatin1("http://mail.yahoo.com/") ) , "text/html" );
}
void YahooAccount::slotOpenYAB()
{
- KRun::runURL( KURL( TQString::tqfromLatin1("http://address.yahoo.com/") ) , "text/html" );
+ KRun::runURL( KURL( TQString::fromLatin1("http://address.yahoo.com/") ) , "text/html" );
}
void YahooAccount::slotEditOwnYABEntry()