summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/oscar/aim/aimaccount.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/oscar/aim/aimaccount.cpp')
-rw-r--r--kopete/protocols/oscar/aim/aimaccount.cpp110
1 files changed, 55 insertions, 55 deletions
diff --git a/kopete/protocols/oscar/aim/aimaccount.cpp b/kopete/protocols/oscar/aim/aimaccount.cpp
index 9a6ec9de..1f0269c8 100644
--- a/kopete/protocols/oscar/aim/aimaccount.cpp
+++ b/kopete/protocols/oscar/aim/aimaccount.cpp
@@ -118,7 +118,7 @@ void AIMMyselfContact::sendMessage( Kopete::Message& message, Kopete::ChatSessio
return;
//okay, now we need to change the message.escapedBody from real HTML to aimhtml.
//looking right now for docs on that "format".
- //looks like everything except for alignment codes comes in the format of spans
+ //looks like everything except for tqalignment codes comes in the format of spans
//font-style:italic -> <i>
//font-weight:600 -> <b> (anything > 400 should be <b>, 400 is not bold)
@@ -127,53 +127,53 @@ void AIMMyselfContact::sendMessage( Kopete::Message& message, Kopete::ChatSessio
//font-size:xxpt -> <font ptsize=xx>
s=message.escapedBody();
- s.replace ( TQRegExp( TQString::fromLatin1("<span style=\"([^\"]*)\">([^<]*)</span>")),
- TQString::fromLatin1("<style>\\1;\"\\2</style>"));
+ s.tqreplace ( TQRegExp( TQString::tqfromLatin1("<span style=\"([^\"]*)\">([^<]*)</span>")),
+ TQString::tqfromLatin1("<style>\\1;\"\\2</style>"));
- s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-style:italic;([^\"]*)\"([^<]*)</style>")),
- TQString::fromLatin1("<i><style>\\1\\2\"\\3</style></i>"));
+ s.tqreplace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)font-style:italic;([^\"]*)\"([^<]*)</style>")),
+ TQString::tqfromLatin1("<i><style>\\1\\2\"\\3</style></i>"));
- s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-weight:600;([^\"]*)\"([^<]*)</style>")),
- TQString::fromLatin1("<b><style>\\1\\2\"\\3</style></b>"));
+ s.tqreplace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)font-weight:600;([^\"]*)\"([^<]*)</style>")),
+ TQString::tqfromLatin1("<b><style>\\1\\2\"\\3</style></b>"));
- s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)text-decoration:underline;([^\"]*)\"([^<]*)</style>")),
- TQString::fromLatin1("<u><style>\\1\\2\"\\3</style></u>"));
+ s.tqreplace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)text-decoration:underline;([^\"]*)\"([^<]*)</style>")),
+ TQString::tqfromLatin1("<u><style>\\1\\2\"\\3</style></u>"));
- s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-family:([^;]*);([^\"]*)\"([^<]*)</style>")),
- TQString::fromLatin1("<font face=\"\\2\"><style>\\1\\3\"\\4</style></font>"));
+ s.tqreplace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)font-family:([^;]*);([^\"]*)\"([^<]*)</style>")),
+ TQString::tqfromLatin1("<font face=\"\\2\"><style>\\1\\3\"\\4</style></font>"));
- s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)font-size:([^p]*)pt;([^\"]*)\"([^<]*)</style>")),
- TQString::fromLatin1("<font ptsize=\"\\2\"><style>\\1\\3\"\\4</style></font>"));
+ s.tqreplace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)font-size:([^p]*)pt;([^\"]*)\"([^<]*)</style>")),
+ TQString::tqfromLatin1("<font ptsize=\"\\2\"><style>\\1\\3\"\\4</style></font>"));
- s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)color:([^;]*);([^\"]*)\"([^<]*)</style>")),
- TQString::fromLatin1("<font color=\"\\2\"><style>\\1\\3\"\\4</style></font>"));
+ s.tqreplace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)color:([^;]*);([^\"]*)\"([^<]*)</style>")),
+ TQString::tqfromLatin1("<font color=\"\\2\"><style>\\1\\3\"\\4</style></font>"));
- s.replace ( TQRegExp( TQString::fromLatin1("<style>([^\"]*)\"([^<]*)</style>")),
- TQString::fromLatin1("\\2"));
+ s.tqreplace ( TQRegExp( TQString::tqfromLatin1("<style>([^\"]*)\"([^<]*)</style>")),
+ TQString::tqfromLatin1("\\2"));
//okay now change the <font ptsize="xx"> to <font size="xx">
//0-9 are size 1
- s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"\\d\">")),
- TQString::fromLatin1("<font size=\"1\">"));
+ s.tqreplace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"\\d\">")),
+ TQString::tqfromLatin1("<font size=\"1\">"));
//10-11 are size 2
- s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[01]\">")),
- TQString::fromLatin1("<font size=\"2\">"));
+ s.tqreplace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"1[01]\">")),
+ TQString::tqfromLatin1("<font size=\"2\">"));
//12-13 are size 3
- s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[23]\">")),
- TQString::fromLatin1("<font size=\"3\">"));
+ s.tqreplace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"1[23]\">")),
+ TQString::tqfromLatin1("<font size=\"3\">"));
//14-16 are size 4
- s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"1[456]\">")),
- TQString::fromLatin1("<font size=\"4\">"));
+ s.tqreplace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"1[456]\">")),
+ TQString::tqfromLatin1("<font size=\"4\">"));
//17-22 are size 5
- s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"(?:1[789]|2[012])\">")),
- TQString::fromLatin1("<font size=\"5\">"));
+ s.tqreplace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"(?:1[789]|2[012])\">")),
+ TQString::tqfromLatin1("<font size=\"5\">"));
//23-29 are size 6
- s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"2[3456789]\">")),TQString::fromLatin1("<font size=\"6\">"));
+ s.tqreplace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"2[3456789]\">")),TQString::tqfromLatin1("<font size=\"6\">"));
//30- (and any I missed) are size 7
- s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"[^\"]*\">")),TQString::fromLatin1("<font size=\"7\">"));
+ s.tqreplace ( TQRegExp ( TQString::tqfromLatin1("<font ptsize=\"[^\"]*\">")),TQString::tqfromLatin1("<font size=\"7\">"));
- s.replace ( TQRegExp ( TQString::fromLatin1("<br[ /]*>")), TQString::fromLatin1("<br>") );
+ s.tqreplace ( TQRegExp ( TQString::tqfromLatin1("<br[ /]*>")), TQString::tqfromLatin1("<br>") );
kdDebug(14190) << k_funcinfo << "sending "
<< s << endl;
@@ -200,13 +200,13 @@ void AIMMyselfContact::sendMessage( Kopete::Message& message, Kopete::ChatSessio
}
-AIMAccount::AIMAccount(Kopete::Protocol *parent, TQString accountID, const char *name)
- : OscarAccount(parent, accountID, name, false)
+AIMAccount::AIMAccount(Kopete::Protocol *tqparent, TQString accountID, const char *name)
+ : OscarAccount(tqparent, accountID, name, false)
{
kdDebug(14152) << k_funcinfo << accountID << ": Called."<< endl;
AIMMyselfContact* mc = new AIMMyselfContact( this );
setMyself( mc );
- myself()->setOnlineStatus( static_cast<AIMProtocol*>( parent )->statusOffline );
+ myself()->setOnlineStatus( static_cast<AIMProtocol*>( tqparent )->statusOffline );
TQString profile = configGroup()->readEntry( "Profile",
i18n( "Visit the Kopete website at <a href=\"http://kopete.kde.org\">http://kopete.kde.org</a>") );
mc->setOwnProfile( profile );
@@ -235,9 +235,9 @@ AIMAccount::~AIMAccount()
{
}
-OscarContact *AIMAccount::createNewContact( const TQString &contactId, Kopete::MetaContact *parentContact, const SSI& ssiItem )
+OscarContact *AIMAccount::createNewContact( const TQString &contactId, Kopete::MetaContact *tqparentContact, const SSI& ssiItem )
{
- AIMContact* contact = new AIMContact( this, contactId, parentContact, TQString::null, ssiItem );
+ AIMContact* contact = new AIMContact( this, contactId, tqparentContact, TQString(), ssiItem );
if ( !ssiItem.alias().isEmpty() )
contact->setProperty( Kopete::Global::Properties::self()->nickName(), ssiItem.alias() );
@@ -280,7 +280,7 @@ TQString AIMAccount::sanitizedMessage( const TQString& message )
continue;
if ( fontEl.hasAttribute( "back" ) )
{
- kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Found attribute to replace. Doing replacement" << endl;
+ kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Found attribute to tqreplace. Doing replacement" << endl;
TQString backgroundColor = fontEl.attribute( "back" );
backgroundColor.insert( 0, "background-color: " );
backgroundColor.append( ';' );
@@ -300,13 +300,13 @@ KActionMenu* AIMAccount::actionMenu()
// mActionMenu is managed by Kopete::Account. It is deleted when
// it is no longer shown, so we can (safely) just make a new one here.
KActionMenu *mActionMenu = new KActionMenu(accountId(),
- myself()->onlineStatus().iconFor( this ), this, "AIMAccount::mActionMenu");
+ myself()->onlinetqStatus().iconFor( this ), this, "AIMAccount::mActionMenu");
AIMProtocol *p = AIMProtocol::protocol();
TQString accountNick = myself()->property( Kopete::Global::Properties::self()->nickName() ).value().toString();
- mActionMenu->popupMenu()->insertTitle( myself()->onlineStatus().iconFor( myself() ),
- i18n( "%2 <%1>" ).arg( accountId(), accountNick ));
+ mActionMenu->popupMenu()->insertTitle( myself()->onlinetqStatus().iconFor( myself() ),
+ i18n( "%2 <%1>" ).tqarg( accountId(), accountNick ));
mActionMenu->insert( new KAction( i18n("Online"), p->statusOnline.iconFor( this ), 0, this,
TQT_SLOT( slotGoOnline() ), mActionMenu, "AIMAccount::mActionOnline") );
@@ -322,7 +322,7 @@ KActionMenu* AIMAccount::actionMenu()
mActionMenu->insert( mActionOffline );
mActionMenu->popupMenu()->insertSeparator();
- KAction* m_joinChatAction = new KAction( i18n( "Join Chat..." ), TQString::null, 0, this,
+ KAction* m_joinChatAction = new KAction( i18n( "Join Chat..." ), TQString(), 0, this,
TQT_SLOT( slotJoinChat() ), mActionMenu, "join_a_chat" );
mActionMenu->insert( new KToggleAction( i18n( "Set Visibility..." ), 0, 0,
@@ -344,16 +344,16 @@ void AIMAccount::setAway(bool away, const TQString &awayReason)
// kdDebug(14152) << k_funcinfo << accountId() << "reason is " << awayReason << endl;
if ( away )
{
- engine()->setStatus( Client::Away, awayReason );
+ engine()->settqStatus( Client::Away, awayReason );
AIMMyselfContact* me = static_cast<AIMMyselfContact *> ( myself() );
me->setLastAwayMessage(awayReason);
me->setProperty( Kopete::Global::Properties::self()->awayMessage(), awayReason );
}
else
{
- engine()->setStatus( Client::Online );
+ engine()->settqStatus( Client::Online );
AIMMyselfContact* me = static_cast<AIMMyselfContact *> ( myself() );
- me->setLastAwayMessage(TQString::null);
+ me->setLastAwayMessage(TQString());
me->removeProperty( Kopete::Global::Properties::self()->awayMessage() );
}
}
@@ -374,7 +374,7 @@ void AIMAccount::setUserProfile(const TQString &profile)
AIMMyselfContact* aimmc = dynamic_cast<AIMMyselfContact*>( myself() );
if ( aimmc )
aimmc->setOwnProfile( profile );
- configGroup()->writeEntry( TQString::fromLatin1( "Profile" ), profile );
+ configGroup()->writeEntry( TQString::tqfromLatin1( "Profile" ), profile );
}
void AIMAccount::slotEditInfo()
@@ -451,7 +451,7 @@ void AIMAccount::slotBuddyIconChanged()
iconFile.open( IO_ReadOnly );
KMD5 iconHash;
- iconHash.update( iconFile );
+ iconHash.update( *TQT_TQIODEVICE(&iconFile) );
kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "hash is :" << iconHash.hexDigest() << endl;
//find old item, create updated item
@@ -532,13 +532,13 @@ void AIMAccount::slotJoinChat()
void AIMAccount::slotGoOnline()
{
- if ( myself()->onlineStatus().status() == Kopete::OnlineStatus::Away )
+ if ( myself()->onlinetqStatus().status() == Kopete::OnlineStatus::Away )
{
kdDebug(14152) << k_funcinfo << accountId() << " was away. welcome back." << endl;
- engine()->setStatus( Client::Online );
+ engine()->settqStatus( Client::Online );
myself()->removeProperty( Kopete::Global::Properties::self()->awayMessage() );
}
- else if ( myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline )
+ else if ( myself()->onlinetqStatus().status() == Kopete::OnlineStatus::Offline )
{
kdDebug(14152) << k_funcinfo << accountId() << " was offline. time to connect" << endl;
OscarAccount::connect();
@@ -597,16 +597,16 @@ void AIMAccount::disconnected( DisconnectReason reason )
void AIMAccount::messageReceived( const Oscar::Message& message )
{
kdDebug(14152) << k_funcinfo << " Got a message, calling OscarAccount::messageReceived" << endl;
- // Want to call the parent to do everything else
+ // Want to call the tqparent to do everything else
if ( message.type() != 0x0003 )
{
OscarAccount::messageReceived(message);
// Check to see if our status is away, and send an away message
- // Might be duplicate code from the parent class to get some needed information
+ // Might be duplicate code from the tqparent class to get some needed information
// Perhaps a refactoring is needed.
kdDebug(14152) << k_funcinfo << "Checking to see if I'm online.." << endl;
- if( myself()->onlineStatus().status() == Kopete::OnlineStatus::Away )
+ if( myself()->onlinetqStatus().status() == Kopete::OnlineStatus::Away )
{
TQString sender = Oscar::normalize( message.sender() );
AIMContact* aimSender = static_cast<AIMContact *> ( contacts()[sender] ); //should exist now
@@ -759,7 +759,7 @@ void AIMAccount::connectWithPassword( const TQString & )
// Get the screen name for this account
TQString screenName = accountId();
- TQString server = configGroup()->readEntry( "Server", TQString::fromLatin1( "login.oscar.aol.com" ) );
+ TQString server = configGroup()->readEntry( "Server", TQString::tqfromLatin1( "login.oscar.aol.com" ) );
uint port = configGroup()->readNumEntry( "Port", 5190 );
Connection* c = setupConnection( server, port );
@@ -771,7 +771,7 @@ void AIMAccount::connectWithPassword( const TQString & )
<< "AIM network because no password was specified in the "
<< "preferences." << endl;
}
- else if ( myself()->onlineStatus() == static_cast<AIMProtocol*>( protocol() )->statusOffline )
+ else if ( myself()->onlinetqStatus() == static_cast<AIMProtocol*>( protocol() )->statusOffline )
{
kdDebug(14152) << k_funcinfo << "Logging in as " << accountId() << endl ;
updateVersionUpdaterStamp();
@@ -895,7 +895,7 @@ void AIMAccount::setPrivacySettings( int privacy )
void AIMAccount::setPrivacyTLVs( BYTE privacy, DWORD userClasses )
{
SSIManager* ssi = engine()->ssiManager();
- Oscar::SSI item = ssi->findItem( TQString::null, ROSTER_VISIBILITY );
+ Oscar::SSI item = ssi->findItem( TQString(), ROSTER_VISIBILITY );
TQValueList<Oscar::TLV> tList;
@@ -905,7 +905,7 @@ void AIMAccount::setPrivacyTLVs( BYTE privacy, DWORD userClasses )
if ( !item )
{
kdDebug(OSCAR_AIM_DEBUG) << k_funcinfo << "Adding new privacy TLV item" << endl;
- Oscar::SSI s( TQString::null, 0, ssi->nextContactId(), ROSTER_VISIBILITY, tList );
+ Oscar::SSI s( TQString(), 0, ssi->nextContactId(), ROSTER_VISIBILITY, tList );
engine()->modifySSIItem( item, s );
}
else