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/autoreplace/autoreplaceplugin.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'kopete/plugins/autoreplace/autoreplaceplugin.cpp') diff --git a/kopete/plugins/autoreplace/autoreplaceplugin.cpp b/kopete/plugins/autoreplace/autoreplaceplugin.cpp index f3610a7f..62060ef3 100644 --- a/kopete/plugins/autoreplace/autoreplaceplugin.cpp +++ b/kopete/plugins/autoreplace/autoreplaceplugin.cpp @@ -26,11 +26,11 @@ #include "autoreplaceconfig.h" typedef KGenericFactory AutoReplacePluginFactory; -K_EXPORT_COMPONENT_FACTORY( kopete_autoreplace, AutoReplacePluginFactory( "kopete_autoreplace" ) ) +K_EXPORT_COMPONENT_FACTORY( kopete_autotqreplace, AutoReplacePluginFactory( "kopete_autotqreplace" ) ) AutoReplacePlugin * AutoReplacePlugin::pluginStatic_ = 0L; -AutoReplacePlugin::AutoReplacePlugin( TQObject *parent, const char * name, const TQStringList & ) -: Kopete::Plugin( AutoReplacePluginFactory::instance(), parent, name ) +AutoReplacePlugin::AutoReplacePlugin( TQObject *tqparent, const char * name, const TQStringList & ) +: Kopete::Plugin( AutoReplacePluginFactory::instance(), tqparent, name ) { if( !pluginStatic_ ) pluginStatic_ = this; @@ -81,12 +81,12 @@ void AutoReplacePlugin::slotAboutToSend( Kopete::Message &msg ) bool isReplaced=false; for ( it = map.begin(); it != map.end(); ++it ) { - TQRegExp re( match.arg( TQRegExp::escape( it.key() ) ) ); + TQRegExp re( match.tqarg( TQRegExp::escape( it.key() ) ) ); if( re.search( replaced_message ) != -1 ) { TQString before = re.cap(1); TQString after = re.cap(3); - replaced_message.replace( re, before + map.find( it.key() ).data() + after ); + replaced_message.tqreplace( re, before + map.tqfind( it.key() ).data() + after ); isReplaced=true; } } @@ -101,8 +101,8 @@ void AutoReplacePlugin::slotAboutToSend( Kopete::Message &msg ) { TQString replaced_message = msg.plainBody(); // eventually add . at the end of the lines, sent lines only - replaced_message.replace( TQRegExp( "([a-z])$" ), "\\1." ); - // replaced_message.replace(TQRegExp( "([\\w])$" ), "\\1." ); + replaced_message.tqreplace( TQRegExp( "([a-z])$" ), "\\1." ); + // replaced_message.tqreplace(TQRegExp( "([\\w])$" ), "\\1." ); // the message is now the one with replaced words msg.setBody( replaced_message, Kopete::Message::PlainText ); @@ -113,7 +113,7 @@ void AutoReplacePlugin::slotAboutToSend( Kopete::Message &msg ) TQString replaced_message = msg.plainBody(); // eventually start each sent line with capital letter // TODO ". " "? " "! " - replaced_message[ 0 ] = replaced_message.at( 0 ).upper(); + replaced_message[ 0 ] = replaced_message.tqat( 0 ).upper(); // the message is now the one with replaced words msg.setBody( replaced_message, Kopete::Message::PlainText ); -- cgit v1.2.1