summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/autoreplace/autoreplaceplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/plugins/autoreplace/autoreplaceplugin.cpp')
-rw-r--r--kopete/plugins/autoreplace/autoreplaceplugin.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/kopete/plugins/autoreplace/autoreplaceplugin.cpp b/kopete/plugins/autoreplace/autoreplaceplugin.cpp
index c06bc0bd..f3610a7f 100644
--- a/kopete/plugins/autoreplace/autoreplaceplugin.cpp
+++ b/kopete/plugins/autoreplace/autoreplaceplugin.cpp
@@ -29,7 +29,7 @@ typedef KGenericFactory<AutoReplacePlugin> AutoReplacePluginFactory;
K_EXPORT_COMPONENT_FACTORY( kopete_autoreplace, AutoReplacePluginFactory( "kopete_autoreplace" ) )
AutoReplacePlugin * AutoReplacePlugin::pluginStatic_ = 0L;
-AutoReplacePlugin::AutoReplacePlugin( QObject *parent, const char * name, const QStringList & )
+AutoReplacePlugin::AutoReplacePlugin( TQObject *parent, const char * name, const TQStringList & )
: Kopete::Plugin( AutoReplacePluginFactory::instance(), parent, name )
{
if( !pluginStatic_ )
@@ -37,16 +37,16 @@ AutoReplacePlugin::AutoReplacePlugin( QObject *parent, const char * name, const
m_prefs = new AutoReplaceConfig;
- connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToSend( Kopete::Message & ) ),
- this, SLOT( slotAboutToSend( Kopete::Message & ) ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToSend( Kopete::Message & ) ),
+ this, TQT_SLOT( slotAboutToSend( Kopete::Message & ) ) );
// nb this connection causes the slot to be called on in- and outbound
// messages which suggests something is broken in the message handler
// system!
m_inboundHandler = new Kopete::SimpleMessageHandlerFactory( Kopete::Message::Inbound,
- Kopete::MessageHandlerFactory::InStageToSent, this, SLOT( slotAboutToSend( Kopete::Message& ) ) );
+ Kopete::MessageHandlerFactory::InStageToSent, this, TQT_SLOT( slotAboutToSend( Kopete::Message& ) ) );
- connect( this, SIGNAL( settingsChanged() ), this, SLOT( slotSettingsChanged() ) );
+ connect( this, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( slotSettingsChanged() ) );
}
AutoReplacePlugin::~AutoReplacePlugin()
@@ -71,21 +71,21 @@ void AutoReplacePlugin::slotAboutToSend( Kopete::Message &msg )
if ( ( msg.direction() == Kopete::Message::Outbound && m_prefs->autoReplaceOutgoing() ) ||
( msg.direction() == Kopete::Message::Inbound && m_prefs->autoReplaceIncoming() ) )
{
- QString replaced_message = msg.plainBody();
+ TQString replaced_message = msg.plainBody();
AutoReplaceConfig::WordsToReplace map = m_prefs->map();
// replaces all matched words --> try to find a more 'economic' way
// "\\b(%1)\\b" doesn't work when substituting /me.
- QString match = "(^|\\s|\\.|\\;|\\,|\\:)(%1)(\\b)";
+ TQString match = "(^|\\s|\\.|\\;|\\,|\\:)(%1)(\\b)";
AutoReplaceConfig::WordsToReplace::Iterator it;
bool isReplaced=false;
for ( it = map.begin(); it != map.end(); ++it )
{
- QRegExp re( match.arg( QRegExp::escape( it.key() ) ) );
+ TQRegExp re( match.arg( TQRegExp::escape( it.key() ) ) );
if( re.search( replaced_message ) != -1 )
{
- QString before = re.cap(1);
- QString after = re.cap(3);
+ TQString before = re.cap(1);
+ TQString after = re.cap(3);
replaced_message.replace( re, before + map.find( it.key() ).data() + after );
isReplaced=true;
}
@@ -99,10 +99,10 @@ void AutoReplacePlugin::slotAboutToSend( Kopete::Message &msg )
{
if ( m_prefs->dotEndSentence() )
{
- QString replaced_message = msg.plainBody();
+ TQString replaced_message = msg.plainBody();
// eventually add . at the end of the lines, sent lines only
- replaced_message.replace( QRegExp( "([a-z])$" ), "\\1." );
- // replaced_message.replace(QRegExp( "([\\w])$" ), "\\1." );
+ replaced_message.replace( TQRegExp( "([a-z])$" ), "\\1." );
+ // replaced_message.replace(TQRegExp( "([\\w])$" ), "\\1." );
// the message is now the one with replaced words
msg.setBody( replaced_message, Kopete::Message::PlainText );
@@ -110,7 +110,7 @@ void AutoReplacePlugin::slotAboutToSend( Kopete::Message &msg )
if( m_prefs->capitalizeBeginningSentence() )
{
- QString replaced_message = msg.plainBody();
+ TQString replaced_message = msg.plainBody();
// eventually start each sent line with capital letter
// TODO ". " "? " "! "
replaced_message[ 0 ] = replaced_message.at( 0 ).upper();