From 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 22 Jun 2011 00:30:31 +0000 Subject: TQt4 port kdenetwork This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/protocols/yahoo/yahoocontact.cpp | 58 ++++++++++++++++----------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'kopete/protocols/yahoo/yahoocontact.cpp') diff --git a/kopete/protocols/yahoo/yahoocontact.cpp b/kopete/protocols/yahoo/yahoocontact.cpp index d26eb739..377103c8 100644 --- a/kopete/protocols/yahoo/yahoocontact.cpp +++ b/kopete/protocols/yahoo/yahoocontact.cpp @@ -114,7 +114,7 @@ void YahooContact::setOnlineStatus(const Kopete::OnlineStatus &status) protocol() , status.internalStatus()+1000 , status.overlayIcons() + TQStringList("yahoo_stealthed") , - i18n("%1|Stealthed").arg( status.description() ) ) ); + i18n("%1|Stealthed").tqarg( status.description() ) ) ); } else if( !m_stealthed && status.internalStatus() > 999 )// Stealthed -> Not Stealthed Contact::setOnlineStatus( static_cast< YahooProtocol *>( protocol() )->statusFromYahoo( status.internalStatus() - 1000 ) ); @@ -128,7 +128,7 @@ void YahooContact::setOnlineStatus(const Kopete::OnlineStatus &status) void YahooContact::setStealthed( bool stealthed ) { m_stealthed = stealthed; - setOnlineStatus( onlineStatus() ); + setOnlineStatus( onlinetqStatus() ); } bool YahooContact::stealthed() @@ -187,7 +187,7 @@ void YahooContact::sync(unsigned int flags) bool YahooContact::isOnline() const { //kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - return onlineStatus().status() != Kopete::OnlineStatus::Offline && onlineStatus().status() != Kopete::OnlineStatus::Unknown; + return onlinetqStatus().status() != Kopete::OnlineStatus::Offline && onlinetqStatus().status() != Kopete::OnlineStatus::Unknown; } bool YahooContact::isReachable() @@ -232,7 +232,7 @@ TQString YahooContact::prepareMessage( const TQString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, TQString::fromLatin1("\033[1m\\3\033[x1m" ) ); + newMsg.tqreplace( regExp, TQString::tqfromLatin1("\033[1m\\3\033[x1m" ) ); } } @@ -243,7 +243,7 @@ TQString YahooContact::prepareMessage( const TQString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, TQString::fromLatin1("\033[4m\\3\033[x4m" ) ); + newMsg.tqreplace( regExp, TQString::tqfromLatin1("\033[4m\\3\033[x4m" ) ); } } @@ -254,7 +254,7 @@ TQString YahooContact::prepareMessage( const TQString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, TQString::fromLatin1("\033[2m\\3\033[x2m" ) ); + newMsg.tqreplace( regExp, TQString::tqfromLatin1("\033[2m\\3\033[x2m" ) ); } } @@ -265,7 +265,7 @@ TQString YahooContact::prepareMessage( const TQString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, TQString::fromLatin1("\033[#\\2m\\4\033[#000000m" ) ); + newMsg.tqreplace( regExp, TQString::tqfromLatin1("\033[#\\2m\\4\033[#000000m" ) ); } } @@ -276,7 +276,7 @@ TQString YahooContact::prepareMessage( const TQString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, TQString::fromLatin1("\\4" ) ); + newMsg.tqreplace( regExp, TQString::tqfromLatin1("\\4" ) ); } } @@ -287,7 +287,7 @@ TQString YahooContact::prepareMessage( const TQString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, TQString::fromLatin1("\\4" ) ); + newMsg.tqreplace( regExp, TQString::tqfromLatin1("\\4" ) ); } } @@ -298,18 +298,18 @@ TQString YahooContact::prepareMessage( const TQString &messageText ) pos = regExp.search( messageText, pos ); if ( pos >= 0 ) { pos += regExp.matchedLength(); - newMsg.replace( regExp, TQString::fromLatin1("\\2") ); + newMsg.tqreplace( regExp, TQString::tqfromLatin1("\\2") ); } } // convert escaped chars - newMsg.replace( TQString::fromLatin1( ">" ), TQString::fromLatin1( ">" ) ); - newMsg.replace( TQString::fromLatin1( "<" ), TQString::fromLatin1( "<" ) ); - newMsg.replace( TQString::fromLatin1( """ ), TQString::fromLatin1( "\"" ) ); - newMsg.replace( TQString::fromLatin1( " " ), TQString::fromLatin1( " " ) ); - newMsg.replace( TQString::fromLatin1( "&" ), TQString::fromLatin1( "&" ) ); - newMsg.replace( TQString::fromLatin1( "
" ), TQString::fromLatin1( "\r" ) ); - newMsg.replace( TQString::fromLatin1( "
" ), TQString::fromLatin1( "\r" ) ); + newMsg.tqreplace( TQString::tqfromLatin1( ">" ), TQString::tqfromLatin1( ">" ) ); + newMsg.tqreplace( TQString::tqfromLatin1( "<" ), TQString::tqfromLatin1( "<" ) ); + newMsg.tqreplace( TQString::tqfromLatin1( """ ), TQString::tqfromLatin1( "\"" ) ); + newMsg.tqreplace( TQString::tqfromLatin1( " " ), TQString::tqfromLatin1( " " ) ); + newMsg.tqreplace( TQString::tqfromLatin1( "&" ), TQString::tqfromLatin1( "&" ) ); + newMsg.tqreplace( TQString::tqfromLatin1( "
" ), TQString::tqfromLatin1( "\r" ) ); + newMsg.tqreplace( TQString::tqfromLatin1( "
" ), TQString::tqfromLatin1( "\r" ) ); return newMsg; } @@ -447,7 +447,7 @@ void YahooContact::slotUserProfile() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - TQString profileSiteString = TQString::fromLatin1("http://profiles.yahoo.com/") + userId(); + TQString profileSiteString = TQString::tqfromLatin1("http://profiles.yahoo.com/") + userId(); KRun::runURL( KURL( profileSiteString ) , "text/html" ); } @@ -467,7 +467,7 @@ void YahooContact::stealthContact() stealthSettingDialog->setMainWidget( stealthWidget ); // Prepare dialog - if( m_account->myself()->onlineStatus() == YahooProtocol::protocol()->Invisible ) + if( m_account->myself()->onlinetqStatus() == YahooProtocol::protocol()->Invisible ) { stealthWidget->radioOffline->setEnabled( true ); stealthWidget->radioOffline->setChecked( true ); @@ -490,7 +490,7 @@ void YahooContact::stealthContact() m_account->yahooSession()->stealthContact( m_userId, Yahoo::StealthPermOffline, Yahoo::StealthActive ); // Apply temporary setting - if( m_account->myself()->onlineStatus() == YahooProtocol::protocol()->Invisible ) + if( m_account->myself()->onlinetqStatus() == YahooProtocol::protocol()->Invisible ) { if( stealthWidget->radioOnline->isChecked() ) { @@ -518,7 +518,7 @@ void YahooContact::buzzContact() Kopete::Message msg = Kopete::Message( manager(Kopete::Contact::CannotCreate)->myself() , manager(Kopete::Contact::CannotCreate)->members(), i18n("Buzzz!!!"), Kopete::Message::Outbound, Kopete::Message::PlainText, - TQString::null , Kopete::Message::TypeAction); + TQString() , Kopete::Message::TypeAction); view->appendMessage( msg ); } } @@ -549,7 +549,7 @@ void YahooContact::setDisplayPicture(const TQByteArray &data, int checksum) { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << data.size() << endl; - TQString newlocation = locateLocal( "appdata", "yahoopictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ; + TQString newlocation = locateLocal( "appdata", "yahoopictures/"+ contactId().lower().tqreplace(TQRegExp("[./~]"),"-") +".png" ) ; setProperty( YahooProtocol::protocol()->iconCheckSum, checksum ); TQFile f( newlocation ); @@ -590,8 +590,8 @@ const YABEntry *YahooContact::yabEntry() void YahooContact::slotEmitDisplayPictureChanged() { kdDebug(YAHOO_GEN_DEBUG) << k_funcinfo << endl; - TQString newlocation=locateLocal( "appdata", "yahoopictures/"+ contactId().lower().replace(TQRegExp("[./~]"),"-") +".png" ) ; - setProperty( Kopete::Global::Properties::self()->photo(), TQString::null ); + TQString newlocation=locateLocal( "appdata", "yahoopictures/"+ contactId().lower().tqreplace(TQRegExp("[./~]"),"-") +".png" ) ; + setProperty( Kopete::Global::Properties::self()->photo(), TQString() ); setProperty( Kopete::Global::Properties::self()->photo() , newlocation ); emit displayPictureChanged(); } @@ -607,7 +607,7 @@ void YahooContact::inviteWebcam() { KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Error, i18n("I cannot find the jasper image convert program.\njasper is required to render the yahoo webcam images." - "\nPlease see %1 for further information.").arg("http://wiki.kde.org/tiki-index.php?page=Kopete%20Webcam%20Support") ); + "\nPlease see %1 for further information.").tqarg("http://wiki.kde.org/tiki-index.php?page=Kopete%20Webcam%20Support") ); return; } m_account->yahooSession()->sendWebcamInvite( m_userId ); @@ -662,7 +662,7 @@ void YahooContact::requestWebcam() { KMessageBox::queuedMessageBox( Kopete::UI::Global::mainWidget(), KMessageBox::Error, i18n("I cannot find the jasper image convert program.\njasper is required to render the yahoo webcam images." - "\nPlease see %1 for further information.").arg("http://wiki.kde.org/tiki-index.php?page=Kopete%20Webcam%20Support") ); + "\nPlease see %1 for further information.").tqarg("http://wiki.kde.org/tiki-index.php?page=Kopete%20Webcam%20Support") ); return; } @@ -763,8 +763,8 @@ void YahooContact::writeYABEntry() setProperty( YahooProtocol::protocol()->propWorkURL, m_YABEntry->workURL ); // Miscellanous - setProperty( YahooProtocol::protocol()->propBirthday, m_YABEntry->birthday.toString( Qt::ISODate ) ); - setProperty( YahooProtocol::protocol()->propAnniversary, m_YABEntry->anniversary.toString( Qt::ISODate ) ); + setProperty( YahooProtocol::protocol()->propBirthday, TQString(m_YABEntry->birthday.toString( Qt::ISODate )) ); + setProperty( YahooProtocol::protocol()->propAnniversary, TQString(m_YABEntry->anniversary.toString( Qt::ISODate )) ); setProperty( YahooProtocol::protocol()->propNotes, m_YABEntry->notes ); setProperty( YahooProtocol::protocol()->propAdditional1, m_YABEntry->additional1 ); setProperty( YahooProtocol::protocol()->propAdditional2, m_YABEntry->additional2 ); @@ -838,5 +838,5 @@ void YahooContact::readYABEntry() #include "yahoocontact.moc" // vim: set noet ts=4 sts=4 sw=4: -//kate: space-indent off; replace-tabs off; indent-mode csands; +//kate: space-indent off; tqreplace-tabs off; indent-mode csands; -- cgit v1.2.1