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/translator/translatordialog.cpp | 2 +- kopete/plugins/translator/translatordialog.h | 3 ++- kopete/plugins/translator/translatorguiclient.cpp | 6 ++--- kopete/plugins/translator/translatorguiclient.h | 3 ++- kopete/plugins/translator/translatorplugin.cpp | 22 ++++++++-------- kopete/plugins/translator/translatorplugin.h | 3 ++- kopete/plugins/translator/translatorprefs.cpp | 2 +- kopete/plugins/translator/translatorprefsbase.ui | 32 +++++++++++------------ 8 files changed, 38 insertions(+), 35 deletions(-) (limited to 'kopete/plugins/translator') diff --git a/kopete/plugins/translator/translatordialog.cpp b/kopete/plugins/translator/translatordialog.cpp index 02e405ec..15c6b7d9 100644 --- a/kopete/plugins/translator/translatordialog.cpp +++ b/kopete/plugins/translator/translatordialog.cpp @@ -21,7 +21,7 @@ #include "translatordialog.h" -TranslatorDialog::TranslatorDialog(const TQString &text,TQWidget *parent, const char *name ) : KDialogBase(parent,name,true,i18n("Translator Plugin"), Ok) +TranslatorDialog::TranslatorDialog(const TQString &text,TQWidget *tqparent, const char *name ) : KDialogBase(tqparent,name,true,i18n("Translator Plugin"), Ok) { m_textEdit=new KTextEdit(this); setMainWidget(m_textEdit); diff --git a/kopete/plugins/translator/translatordialog.h b/kopete/plugins/translator/translatordialog.h index 40a5523e..79c910d0 100644 --- a/kopete/plugins/translator/translatordialog.h +++ b/kopete/plugins/translator/translatordialog.h @@ -31,9 +31,10 @@ class KTextEdit; class TranslatorDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - TranslatorDialog(const TQString &translated, TQWidget *parent=0, const char *name=0); + TranslatorDialog(const TQString &translated, TQWidget *tqparent=0, const char *name=0); ~TranslatorDialog(); TQString translatedText(); diff --git a/kopete/plugins/translator/translatorguiclient.cpp b/kopete/plugins/translator/translatorguiclient.cpp index ef5ac9ac..f583fcd1 100644 --- a/kopete/plugins/translator/translatorguiclient.cpp +++ b/kopete/plugins/translator/translatorguiclient.cpp @@ -33,13 +33,13 @@ #include "translatorguiclient.h" #include "translatorlanguages.h" -TranslatorGUIClient::TranslatorGUIClient( Kopete::ChatSession *parent, const char *name ) -: TQObject( parent, name ), KXMLGUIClient( parent ) +TranslatorGUIClient::TranslatorGUIClient( Kopete::ChatSession *tqparent, const char *name ) +: TQObject( tqparent, name ), KXMLGUIClient( tqparent ) { setInstance( TranslatorPlugin::plugin()->instance() ); connect( TranslatorPlugin::plugin(), TQT_SIGNAL( destroyed( TQObject * ) ), this, TQT_SLOT( deleteLater() ) ); - m_manager = parent; + m_manager = tqparent; new KAction( i18n( "Translate" ), "locale", CTRL + Key_T, this, TQT_SLOT( slotTranslateChat() ), actionCollection(), "translateCurrentMessage" ); diff --git a/kopete/plugins/translator/translatorguiclient.h b/kopete/plugins/translator/translatorguiclient.h index 68cb4fa7..e292b0e2 100644 --- a/kopete/plugins/translator/translatorguiclient.h +++ b/kopete/plugins/translator/translatorguiclient.h @@ -37,9 +37,10 @@ namespace Kopete { class ChatSession; } class TranslatorGUIClient : public TQObject , public KXMLGUIClient { Q_OBJECT + TQ_OBJECT public: - TranslatorGUIClient( Kopete::ChatSession *parent, const char *name=0L); + TranslatorGUIClient( Kopete::ChatSession *tqparent, const char *name=0L); ~TranslatorGUIClient(); private slots: diff --git a/kopete/plugins/translator/translatorplugin.cpp b/kopete/plugins/translator/translatorplugin.cpp index 9bff86f2..175cb9d8 100644 --- a/kopete/plugins/translator/translatorplugin.cpp +++ b/kopete/plugins/translator/translatorplugin.cpp @@ -17,7 +17,7 @@ * * ************************************************************************* Patched by Francesco Rossi in order to support new - google translation page layout (13-sept-2007) + google translation page tqlayout (13-sept-2007) */ #include @@ -51,8 +51,8 @@ K_EXPORT_COMPONENT_FACTORY( kopete_translator, TranslatorPluginFactory( &aboutda K_EXPORT_COMPONENT_FACTORY( kopete_translator, TranslatorPluginFactory( "kopete_translator" ) ) #endif -TranslatorPlugin::TranslatorPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ ) -: Kopete::Plugin( TranslatorPluginFactory::instance(), parent, name ) +TranslatorPlugin::TranslatorPlugin( TQObject *tqparent, const char *name, const TQStringList & /* args */ ) +: Kopete::Plugin( TranslatorPluginFactory::instance(), tqparent, name ) { kdDebug( 14308 ) << k_funcinfo << endl; @@ -237,14 +237,14 @@ TQString TranslatorPlugin::translateMessage( const TQString &msg, const TQString if ( from == to ) { kdDebug( 14308 ) << k_funcinfo << "Src and Dst languages are the same" << endl; - return TQString::null; + return TQString(); } // We search for src_dst - if(! m_languages->supported( m_service ).contains( from + "_" + to ) ) + if(! m_languages->supported( m_service ).tqcontains( from + "_" + to ) ) { kdDebug( 14308 ) << k_funcinfo << from << "_" << to << " is not supported by service " << m_service << endl; - return TQString::null; + return TQString(); } @@ -253,7 +253,7 @@ TQString TranslatorPlugin::translateMessage( const TQString &msg, const TQString else if ( m_service == "google" ) return googleTranslateMessage( msg ,from, to ); else - return TQString::null; + return TQString(); } TQString TranslatorPlugin::googleTranslateMessage( const TQString &msg, const TQString &from, const TQString &to ) @@ -282,9 +282,9 @@ TQString TranslatorPlugin::googleTranslateMessage( const TQString &msg, const TQ // FIXME: We need to make the libkopete API async to get rid of this processEvents. // It often causes crashes in the code. - Martijn while ( !m_completed[ job ] ) - qApp->processEvents(); + tqApp->processEvents(); - TQString data = TQString::fromLatin1( m_data[ job ] ); + TQString data = TQString::tqfromLatin1( m_data[ job ] ); // After hacks, we need to clean m_data.remove( job ); @@ -318,7 +318,7 @@ TQString TranslatorPlugin::babelTranslateMessage( const TQString &msg, const TQS // FIXME: We need to make the libkopete API async to get rid of this processEvents. // It often causes crashes in the code. - Martijn while ( !m_completed[ job ] ) - qApp->processEvents(); + tqApp->processEvents(); TQString data = TQString::fromUtf8( m_data[ job ] ); @@ -364,7 +364,7 @@ void TranslatorPlugin::sendTranslation( Kopete::Message &msg, const TQString &tr msg.setBody( translated, msg.format() ); break; case ShowOriginal: - msg.setBody( i18n( "%2 \nAuto Translated: \n%1" ).arg( translated, msg.plainBody() ), msg.format() ); + msg.setBody( i18n( "%2 \nAuto Translated: \n%1" ).tqarg( translated, msg.plainBody() ), msg.format() ); break; case ShowDialog: { diff --git a/kopete/plugins/translator/translatorplugin.h b/kopete/plugins/translator/translatorplugin.h index d82a00be..d7b40a2d 100644 --- a/kopete/plugins/translator/translatorplugin.h +++ b/kopete/plugins/translator/translatorplugin.h @@ -52,13 +52,14 @@ class TranslatorLanguages; class TranslatorPlugin : public Kopete::Plugin { Q_OBJECT + TQ_OBJECT friend class TranslatorGUIClient; public: static TranslatorPlugin *plugin(); - TranslatorPlugin( TQObject *parent, const char *name, const TQStringList &args ); + TranslatorPlugin( TQObject *tqparent, const char *name, const TQStringList &args ); ~TranslatorPlugin(); enum TranslateMode diff --git a/kopete/plugins/translator/translatorprefs.cpp b/kopete/plugins/translator/translatorprefs.cpp index 8d06b49f..4eca00e6 100644 --- a/kopete/plugins/translator/translatorprefs.cpp +++ b/kopete/plugins/translator/translatorprefs.cpp @@ -30,7 +30,7 @@ K_EXPORT_COMPONENT_FACTORY( kcm_kopete_translator, TranslatorConfigFactory( "kcm class TranslatorPreferences : public KCAutoConfigModule { public: - TranslatorPreferences( TQWidget *parent = 0, const char * = 0, const TQStringList &args = TQStringList() ) : KCAutoConfigModule( TranslatorConfigFactory::instance(), parent, args ) + TranslatorPreferences( TQWidget *tqparent = 0, const char * = 0, const TQStringList &args = TQStringList() ) : KCAutoConfigModule( TranslatorConfigFactory::instance(), tqparent, args ) { TranslatorPrefsUI *preferencesDialog = new TranslatorPrefsUI(this); diff --git a/kopete/plugins/translator/translatorprefsbase.ui b/kopete/plugins/translator/translatorprefsbase.ui index 56b75543..f6c063a2 100644 --- a/kopete/plugins/translator/translatorprefsbase.ui +++ b/kopete/plugins/translator/translatorprefsbase.ui @@ -1,7 +1,7 @@ TranslatorPrefsUI Duncan Mac-Vicar P. - + TranslatorPrefsUI @@ -25,12 +25,12 @@ unnamed - + Service - + TextLabel2_2 @@ -38,7 +38,7 @@ Translation service: - + TextLabel2 @@ -46,7 +46,7 @@ Default native language: - + myLang @@ -59,7 +59,7 @@ - + IncomingMessages @@ -70,7 +70,7 @@ unnamed - + IncomingDontTranslate @@ -84,7 +84,7 @@ 0 - + IncomingShowOriginal @@ -98,7 +98,7 @@ 1 - + IncomingTranslate @@ -111,7 +111,7 @@ - + OutgoingMessages @@ -122,7 +122,7 @@ unnamed - + OutgoingDontTranslate @@ -136,7 +136,7 @@ 0 - + OutgoingShowOriginal @@ -150,7 +150,7 @@ 1 - + OutgoingTranslate @@ -158,7 +158,7 @@ Translate directly - + OutgoingAsk @@ -178,7 +178,7 @@ Expanding - + 20 20 @@ -187,5 +187,5 @@ - + -- cgit v1.2.1