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/nlamarok.cpp | 6 +- kopete/plugins/nowlistening/nljuk.cpp | 12 ++-- kopete/plugins/nowlistening/nlkaffeine.cpp | 2 +- kopete/plugins/nowlistening/nlkscd.cpp | 6 +- kopete/plugins/nowlistening/nlnoatun.cpp | 8 +-- kopete/plugins/nowlistening/nlnoatun.h | 2 +- .../plugins/nowlistening/nowlisteningguiclient.cpp | 6 +- .../plugins/nowlistening/nowlisteningguiclient.h | 3 +- kopete/plugins/nowlistening/nowlisteningplugin.cpp | 44 ++++++------- kopete/plugins/nowlistening/nowlisteningplugin.h | 3 +- .../nowlistening/nowlisteningpreferences.cpp | 6 +- .../plugins/nowlistening/nowlisteningpreferences.h | 3 +- kopete/plugins/nowlistening/nowlisteningprefs.ui | 74 +++++++++++----------- 13 files changed, 89 insertions(+), 86 deletions(-) (limited to 'kopete/plugins/nowlistening') diff --git a/kopete/plugins/nowlistening/nlamarok.cpp b/kopete/plugins/nowlistening/nlamarok.cpp index 9101758c..348217bc 100644 --- a/kopete/plugins/nowlistening/nlamarok.cpp +++ b/kopete/plugins/nowlistening/nlamarok.cpp @@ -91,7 +91,7 @@ void NLamaroK::update() { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) { + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> newTrack; } } @@ -107,7 +107,7 @@ void NLamaroK::update() { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) { + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> m_album; } } @@ -117,7 +117,7 @@ void NLamaroK::update() { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) { + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> m_artist; } } diff --git a/kopete/plugins/nowlistening/nljuk.cpp b/kopete/plugins/nowlistening/nljuk.cpp index 422e0db9..fe58aba4 100644 --- a/kopete/plugins/nowlistening/nljuk.cpp +++ b/kopete/plugins/nowlistening/nljuk.cpp @@ -58,13 +58,13 @@ void NLJuk::update() { TQDataStream arg( data, IO_WriteOnly ); - arg << TQString::fromLatin1("Album"); + arg << TQString::tqfromLatin1("Album"); if ( m_client->call( "juk", "Player", "trackProperty(TQString)", data, replyType, replyData ) ) { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) { + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> m_album; } } @@ -72,13 +72,13 @@ void NLJuk::update() { TQDataStream arg( data, IO_WriteOnly ); - arg << TQString::fromLatin1("Artist"); + arg << TQString::tqfromLatin1("Artist"); if ( m_client->call( "juk", "Player", "trackProperty(TQString)", data, replyType, replyData ) ) { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) { + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> m_artist; } } @@ -86,13 +86,13 @@ void NLJuk::update() { TQDataStream arg( data, IO_WriteOnly ); - arg << TQString::fromLatin1("Title"); + arg << TQString::tqfromLatin1("Title"); if ( m_client->call( "juk", "Player", "trackProperty(TQString)", data, replyType, replyData ) ) { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) { + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> newTrack; } } diff --git a/kopete/plugins/nowlistening/nlkaffeine.cpp b/kopete/plugins/nowlistening/nlkaffeine.cpp index d5823298..c2b70ba3 100644 --- a/kopete/plugins/nowlistening/nlkaffeine.cpp +++ b/kopete/plugins/nowlistening/nlkaffeine.cpp @@ -85,7 +85,7 @@ void NLKaffeine::update() { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) { + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> newTrack; } } diff --git a/kopete/plugins/nowlistening/nlkscd.cpp b/kopete/plugins/nowlistening/nlkscd.cpp index 06bf6c28..bd9b9b6b 100644 --- a/kopete/plugins/nowlistening/nlkscd.cpp +++ b/kopete/plugins/nowlistening/nlkscd.cpp @@ -69,7 +69,7 @@ void NLKscd::update() << endl; else { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) reply >> m_artist; else kdDebug( 14307 ) << "NLKscd::update() trackList returned unexpected reply type!" << endl; @@ -82,7 +82,7 @@ void NLKscd::update() << endl; else { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) reply >> m_album; else kdDebug( 14307 ) << "NLKscd::update() trackList returned unexpected reply type!" << endl; @@ -94,7 +94,7 @@ void NLKscd::update() kdDebug( 14307 ) << "NLKscd::update() - there was some error using DCOP." << endl; else { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) { + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> newTrack; //kdDebug( 14307 ) << "the result is: " << newTrack.latin1() // << endl; diff --git a/kopete/plugins/nowlistening/nlnoatun.cpp b/kopete/plugins/nowlistening/nlnoatun.cpp index c9c504c2..4f414a11 100644 --- a/kopete/plugins/nowlistening/nlnoatun.cpp +++ b/kopete/plugins/nowlistening/nlnoatun.cpp @@ -39,7 +39,7 @@ void NLNoatun::update() m_playing = false; TQString newTrack; // see if it's registered with DCOP - TQCString appname = find(); + TQCString appname = tqfind(); if ( !appname.isEmpty() ) { // see if it's playing @@ -76,7 +76,7 @@ void NLNoatun::update() << endl; else { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) { + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> newTrack; } else kdDebug( 14307 ) << "NLNoatun::update(), title() returned unexpected reply type!" << endl; @@ -97,7 +97,7 @@ void NLNoatun::update() kdDebug( 14307 ) << "NLNoatun::update() - noatun not found" << endl; } -TQCString NLNoatun::find() const +TQCString NLNoatun::tqfind() const { TQCString app = "noatun"; if ( !m_client->isApplicationRegistered( app ) ) @@ -137,7 +137,7 @@ TQString NLNoatun::currentProperty( TQCString appname, TQString property ) const else { TQDataStream reply( replyData, IO_ReadOnly ); - if ( replyType == "TQString" ) + if ( replyType == TQSTRING_OBJECT_NAME_STRING ) { reply >> result; } diff --git a/kopete/plugins/nowlistening/nlnoatun.h b/kopete/plugins/nowlistening/nlnoatun.h index 85e1aaac..30956611 100644 --- a/kopete/plugins/nowlistening/nlnoatun.h +++ b/kopete/plugins/nowlistening/nlnoatun.h @@ -32,7 +32,7 @@ class NLNoatun : public NLMediaPlayer NLNoatun( DCOPClient *client ); virtual void update(); protected: - TQCString find() const; + TQCString tqfind() const; TQString currentProperty( TQCString appname, TQString property ) const; DCOPClient *m_client; }; diff --git a/kopete/plugins/nowlistening/nowlisteningguiclient.cpp b/kopete/plugins/nowlistening/nowlisteningguiclient.cpp index c5e47ef0..ddbf50bd 100644 --- a/kopete/plugins/nowlistening/nowlisteningguiclient.cpp +++ b/kopete/plugins/nowlistening/nowlisteningguiclient.cpp @@ -29,11 +29,11 @@ #include #include -NowListeningGUIClient::NowListeningGUIClient( Kopete::ChatSession *parent, NowListeningPlugin *plugin ) - : TQObject(parent) , KXMLGUIClient(parent) +NowListeningGUIClient::NowListeningGUIClient( Kopete::ChatSession *tqparent, NowListeningPlugin *plugin ) + : TQObject(tqparent) , KXMLGUIClient(tqparent) { connect(plugin, TQT_SIGNAL(readyForUnload()), TQT_SLOT(slotPluginUnloaded())); - m_msgManager = parent; + m_msgManager = tqparent; m_action = new KAction( i18n( "Send Media Info" ), 0, this, TQT_SLOT( slotAdvertToCurrentChat() ), actionCollection(), "actionSendAdvert" ); setXMLFile("nowlisteningchatui.rc"); diff --git a/kopete/plugins/nowlistening/nowlisteningguiclient.h b/kopete/plugins/nowlistening/nowlisteningguiclient.h index b12b0424..7ed37b7e 100644 --- a/kopete/plugins/nowlistening/nowlisteningguiclient.h +++ b/kopete/plugins/nowlistening/nowlisteningguiclient.h @@ -34,9 +34,10 @@ namespace Kopete { class NowListeningGUIClient : public TQObject, public KXMLGUIClient { Q_OBJECT + TQ_OBJECT public: - NowListeningGUIClient( Kopete::ChatSession* parent, NowListeningPlugin* plugin ); + NowListeningGUIClient( Kopete::ChatSession* tqparent, NowListeningPlugin* plugin ); virtual ~NowListeningGUIClient() {} protected slots: 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 diff --git a/kopete/plugins/nowlistening/nowlisteningplugin.h b/kopete/plugins/nowlistening/nowlisteningplugin.h index 1108a9a5..6b7b3d71 100644 --- a/kopete/plugins/nowlistening/nowlisteningplugin.h +++ b/kopete/plugins/nowlistening/nowlisteningplugin.h @@ -37,11 +37,12 @@ class TQStringList; class NowListeningPlugin : public Kopete::Plugin { Q_OBJECT + TQ_OBJECT friend class NowListeningGUIClient; public: - NowListeningPlugin( TQObject *parent, const char *name, const TQStringList &args ); + NowListeningPlugin( TQObject *tqparent, const char *name, const TQStringList &args ); virtual ~NowListeningPlugin(); static NowListeningPlugin* plugin(); diff --git a/kopete/plugins/nowlistening/nowlisteningpreferences.cpp b/kopete/plugins/nowlistening/nowlisteningpreferences.cpp index 118b37da..6e1751ab 100644 --- a/kopete/plugins/nowlistening/nowlisteningpreferences.cpp +++ b/kopete/plugins/nowlistening/nowlisteningpreferences.cpp @@ -36,8 +36,8 @@ typedef KGenericFactory NowListeningPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_nowlistening, NowListeningPreferencesFactory( "kcm_kopete_nowlistening" ) ) -NowListeningPreferences::NowListeningPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) - : KCModule( NowListeningPreferencesFactory::instance(), parent, args ) +NowListeningPreferences::NowListeningPreferences(TQWidget *tqparent, const char* /*name*/, const TQStringList &args) + : KCModule( NowListeningPreferencesFactory::instance(), tqparent, args ) { ( new TQVBoxLayout( this ) )->setAutoAdd( true ); preferencesDialog = new NowListeningPrefsUI( this ); @@ -50,7 +50,7 @@ NowListeningPreferences::NowListeningPreferences(TQWidget *parent, const char* / preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Juk")); preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("amaroK")); preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("Kaffeine")); -#if defined Q_WS_X11 && !defined K_WS_QTONLY && defined HAVE_XMMS +#if defined TQ_WS_X11 && !defined K_WS_TQTONLY && defined HAVE_XMMS preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(TQString::fromUtf8("XMMS")); #endif load(); diff --git a/kopete/plugins/nowlistening/nowlisteningpreferences.h b/kopete/plugins/nowlistening/nowlisteningpreferences.h index 078b1a0c..a0881113 100644 --- a/kopete/plugins/nowlistening/nowlisteningpreferences.h +++ b/kopete/plugins/nowlistening/nowlisteningpreferences.h @@ -32,8 +32,9 @@ class NowListeningConfig; class NowListeningPreferences : public KCModule { Q_OBJECT + TQ_OBJECT public: - NowListeningPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList()); + NowListeningPreferences(TQWidget *tqparent = 0, const char *name = 0, const TQStringList &args = TQStringList()); virtual ~NowListeningPreferences(); virtual void save(); virtual void load(); diff --git a/kopete/plugins/nowlistening/nowlisteningprefs.ui b/kopete/plugins/nowlistening/nowlisteningprefs.ui index 08dd72b9..dc418729 100644 --- a/kopete/plugins/nowlistening/nowlisteningprefs.ui +++ b/kopete/plugins/nowlistening/nowlisteningprefs.ui @@ -1,6 +1,6 @@ NowListeningPrefsUI - + NowListeningPrefsUI @@ -25,18 +25,18 @@ 6 - + advertiseNewMediaToBuddiesLabel <b>Share Your Musical Taste</b> - + AlignVCenter - + advertiseNewMediaToBuddiesHLine @@ -47,11 +47,11 @@ Sunken - + tabWidget2 - + TabPage @@ -62,15 +62,15 @@ unnamed - + - layout4 + tqlayout4 unnamed - + useThisMessageLabel @@ -78,7 +78,7 @@ Use this message when advertising: - + helperLabel @@ -86,33 +86,33 @@ %track, %artist, %album, %player will be substituted if known. Expressions in brackets depend on a substitution being made. - + WordBreak|AlignVCenter - + - layout2 + tqlayout2 unnamed - + m_headerLabel Start with: - + AlignVCenter|AlignLeft m_header - + kcfg_Header @@ -120,21 +120,21 @@ Expressions in brackets depend on a substitution being made. Now Listening To: - + m_perTrackLabel For each track: - + AlignVCenter|AlignLeft m_perTrack - + kcfg_PerTrack @@ -142,21 +142,21 @@ Expressions in brackets depend on a substitution being made. %track (by %artist)(on %album) - + m_conjunctionLabel Conjunction (if >1 track): - + AlignVCenter|AlignLeft m_conjunction - + kcfg_Conjunction @@ -178,7 +178,7 @@ Expressions in brackets depend on a substitution being made. Expanding - + 20 40 @@ -187,7 +187,7 @@ Expressions in brackets depend on a substitution being made. - + tab @@ -198,7 +198,7 @@ Expressions in brackets depend on a substitution being made. unnamed - + buttonGroup2 @@ -212,7 +212,7 @@ Expressions in brackets depend on a substitution being made. unnamed - + kcfg_ExplicitAdvertising @@ -222,7 +222,7 @@ or by typing "/media" in the chat window edit area. - + kcfg_ChatAdvertising @@ -230,7 +230,7 @@ window edit area. &Show in chat window (automatic) - + kcfg_StatusAdvertising @@ -239,7 +239,7 @@ window edit area. in place of your status message. - + kcfg_AppendStatusAdvertising @@ -259,7 +259,7 @@ in place of your status message. Expanding - + 20 80 @@ -268,7 +268,7 @@ in place of your status message. - + tab @@ -279,15 +279,15 @@ in place of your status message. unnamed - + - layout2_2 + tqlayout2_2 unnamed - + kcfg_UseSpecifiedMediaPlayer @@ -332,7 +332,7 @@ in place of your status message. Expanding - + 20 40 @@ -352,7 +352,7 @@ in place of your status message. Expanding - + 20 40 @@ -369,7 +369,7 @@ in place of your status message. setEnabled(bool) - + klistbox.h -- cgit v1.2.1