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/plugins/nowlistening/nowlisteningplugin.cpp | 44 +++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'kopete/plugins/nowlistening/nowlisteningplugin.cpp') diff --git a/kopete/plugins/nowlistening/nowlisteningplugin.cpp b/kopete/plugins/nowlistening/nowlisteningplugin.cpp index 4c286b0f..0d782a39 100644 --- a/kopete/plugins/nowlistening/nowlisteningplugin.cpp +++ b/kopete/plugins/nowlistening/nowlisteningplugin.cpp @@ -47,7 +47,7 @@ #include "nlkaffeine.h" #include "nowlisteningguiclient.h" -#if defined Q_WS_X11 && !defined K_WS_QTONLY && defined HAVE_XMMS +#if defined TQ_WS_X11 && !defined K_WS_TQTONLY && defined HAVE_XMMS #include "nlxmms.h" #endif @@ -78,8 +78,8 @@ public: typedef KGenericFactory NowListeningPluginFactory; K_EXPORT_COMPONENT_FACTORY( kopete_nowlistening, NowListeningPluginFactory( "kopete_nowlistening" ) ) -NowListeningPlugin::NowListeningPlugin( TQObject *parent, const char* name, const TQStringList& /*args*/ ) -: Kopete::Plugin( NowListeningPluginFactory::instance(), parent, name ) +NowListeningPlugin::NowListeningPlugin( TQObject *tqparent, const char* name, const TQStringList& /*args*/ ) +: Kopete::Plugin( NowListeningPluginFactory::instance(), tqparent, name ) { if ( pluginStatic_ ) kdDebug( 14307 )<<"####"<<"Now Listening already initialized"<m_mediaPlayerList.append( new NLamaroK( d->m_client ) ); d->m_mediaPlayerList.append( new NLKaffeine( d->m_client ) ); -#if defined Q_WS_X11 && !defined K_WS_QTONLY && HAVE_XMMS +#if defined TQ_WS_X11 && !defined K_WS_TQTONLY && HAVE_XMMS d->m_mediaPlayerList.append( new NLXmms() ); #endif @@ -205,7 +205,7 @@ void NowListeningPlugin::slotOutgoingMessage(Kopete::Message& msg) for( Kopete::Contact *c = dest.first() ; c ; c = dest.next() ) { const TQString& cId = c->contactId(); - if( 0 == d->m_musicSentTo.contains( cId ) ) + if( 0 == d->m_musicSentTo.tqcontains( cId ) ) { mustSendAnyway = true; @@ -298,7 +298,7 @@ void NowListeningPlugin::slotAdvertCurrentMusic() // KDE4 TODO: Use the new status message framework, and remove this "hack". if( isPlaying ) { - advert = TQString("[Music]%1").arg(mediaList); + advert = TQString("[Music]%1").tqarg(mediaList); } } @@ -306,9 +306,9 @@ void NowListeningPlugin::slotAdvertCurrentMusic() { if( NowListeningConfig::self()->appendStatusAdvertising() ) { - // Check for the now listening message in parenthesis, - // include the header to not override other messages in parenthesis. - TQRegExp statusSong( TQString(" \\(%1.*\\)$").arg( NowListeningConfig::header()) ); + // Check for the now listening message in tqparenthesis, + // include the header to not override other messages in tqparenthesis. + TQRegExp statusSong( TQString(" \\(%1.*\\)$").tqarg( NowListeningConfig::header()) ); // HACK: Don't keep appending the now listened song. Replace it in the status message. advert = a->myself()->property( Kopete::Global::Properties::self()->awayMessage() ).value().toString(); @@ -318,16 +318,16 @@ void NowListeningPlugin::slotAdvertCurrentMusic() { if(statusSong.search(advert) != -1) { - advert = advert.replace(statusSong, TQString(" (%1)").arg(mediaPlayerAdvert(false)) ); + advert = advert.tqreplace(statusSong, TQString(" (%1)").tqarg(mediaPlayerAdvert(false)) ); } else { - advert += TQString(" (%1)").arg( mediaPlayerAdvert(false) ); + advert += TQString(" (%1)").tqarg( mediaPlayerAdvert(false) ); } } else { - advert = advert.replace(statusSong, ""); + advert = advert.tqreplace(statusSong, ""); } } else @@ -336,7 +336,7 @@ void NowListeningPlugin::slotAdvertCurrentMusic() } } - a->setOnlineStatus(a->myself()->onlineStatus(), advert); + a->setOnlineStatus(a->myself()->onlinetqStatus(), advert); } } } @@ -432,7 +432,7 @@ TQString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player, // recursively replace contents of matching () TQString substitution = substDepthFirst( player, in.mid( i + 1, j - i - 1), true ) ; - in.replace ( i, j - i + 1, substitution ); + in.tqreplace ( i, j - i + 1, substitution ); // perform substitution and return the result i = i + substitution.length() - 1; break; @@ -446,34 +446,34 @@ TQString NowListeningPlugin::substDepthFirst( NLMediaPlayer *player, // no () found, perform substitution! // get each string (to) to substitute for (from) bool done = false; - if ( in.contains ( "%track" ) ) + if ( in.tqcontains ( "%track" ) ) { if ( track.isEmpty() ) track = i18n("Unknown track"); - in.replace( "%track", track ); + in.tqreplace( "%track", track ); done = true; } - if ( in.contains ( "%artist" ) && !artist.isEmpty() ) + if ( in.tqcontains ( "%artist" ) && !artist.isEmpty() ) { if ( artist.isEmpty() ) artist = i18n("Unknown artist"); - in.replace( "%artist", artist ); + in.tqreplace( "%artist", artist ); done = true; } - if ( in.contains ( "%album" ) && !album.isEmpty() ) + if ( in.tqcontains ( "%album" ) && !album.isEmpty() ) { if ( album.isEmpty() ) album = i18n("Unknown album"); - in.replace( "%album", album ); + in.tqreplace( "%album", album ); done = true; } - if ( in.contains ( "%player" ) && !playerName.isEmpty() ) + if ( in.tqcontains ( "%player" ) && !playerName.isEmpty() ) { if ( playerName.isEmpty() ) playerName = i18n("Unknown player"); - in.replace( "%player", playerName ); + in.tqreplace( "%player", playerName ); done = true; } // make whether we return anything dependent on whether we -- cgit v1.2.1