summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/autoreplace/autoreplaceplugin.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/plugins/autoreplace/autoreplaceplugin.cpp
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-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/autoreplace/autoreplaceplugin.cpp')
-rw-r--r--kopete/plugins/autoreplace/autoreplaceplugin.cpp16
1 files changed, 8 insertions, 8 deletions
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<AutoReplacePlugin> 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 );