diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/plugins/translator | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip |
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
Diffstat (limited to 'kopete/plugins/translator')
-rw-r--r-- | kopete/plugins/translator/translatordialog.cpp | 2 | ||||
-rw-r--r-- | kopete/plugins/translator/translatordialog.h | 3 | ||||
-rw-r--r-- | kopete/plugins/translator/translatorguiclient.cpp | 6 | ||||
-rw-r--r-- | kopete/plugins/translator/translatorguiclient.h | 3 | ||||
-rw-r--r-- | kopete/plugins/translator/translatorplugin.cpp | 22 | ||||
-rw-r--r-- | kopete/plugins/translator/translatorplugin.h | 3 | ||||
-rw-r--r-- | kopete/plugins/translator/translatorprefs.cpp | 2 | ||||
-rw-r--r-- | kopete/plugins/translator/translatorprefsbase.ui | 32 |
8 files changed, 38 insertions, 35 deletions
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 <redsh@email.it> in order to support new - google translation page layout (13-sept-2007) + google translation page tqlayout (13-sept-2007) */ #include <tqapplication.h> @@ -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 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>TranslatorPrefsUI</class> <author>Duncan Mac-Vicar P.</author> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>TranslatorPrefsUI</cstring> </property> @@ -25,12 +25,12 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QComboBox" row="1" column="1"> + <widget class="TQComboBox" row="1" column="1"> <property name="name"> <cstring>Service</cstring> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel2_2</cstring> </property> @@ -38,7 +38,7 @@ <string>Translation service:</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -46,7 +46,7 @@ <string>Default native language:</string> </property> </widget> - <widget class="QComboBox" row="0" column="1"> + <widget class="TQComboBox" row="0" column="1"> <property name="name"> <cstring>myLang</cstring> </property> @@ -59,7 +59,7 @@ </sizepolicy> </property> </widget> - <widget class="QButtonGroup" row="2" column="0" rowspan="1" colspan="2"> + <widget class="TQButtonGroup" row="2" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>IncomingMessages</cstring> </property> @@ -70,7 +70,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>IncomingDontTranslate</cstring> </property> @@ -84,7 +84,7 @@ <number>0</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>IncomingShowOriginal</cstring> </property> @@ -98,7 +98,7 @@ <number>1</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>IncomingTranslate</cstring> </property> @@ -111,7 +111,7 @@ </widget> </vbox> </widget> - <widget class="QButtonGroup" row="3" column="0" rowspan="1" colspan="2"> + <widget class="TQButtonGroup" row="3" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>OutgoingMessages</cstring> </property> @@ -122,7 +122,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>OutgoingDontTranslate</cstring> </property> @@ -136,7 +136,7 @@ <number>0</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>OutgoingShowOriginal</cstring> </property> @@ -150,7 +150,7 @@ <number>1</number> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>OutgoingTranslate</cstring> </property> @@ -158,7 +158,7 @@ <string>Translate directly</string> </property> </widget> - <widget class="QRadioButton"> + <widget class="TQRadioButton"> <property name="name"> <cstring>OutgoingAsk</cstring> </property> @@ -178,7 +178,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -187,5 +187,5 @@ </spacer> </grid> </widget> -<layoutdefaults spacing="6" margin="11"/> +<tqlayoutdefaults spacing="6" margin="11"/> </UI> |