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/translatorplugin.cpp | |
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/translatorplugin.cpp')
-rw-r--r-- | kopete/plugins/translator/translatorplugin.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
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 <[email protected]> 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: { |