summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/cryptography/cryptographyplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/plugins/cryptography/cryptographyplugin.cpp')
-rw-r--r--kopete/plugins/cryptography/cryptographyplugin.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/kopete/plugins/cryptography/cryptographyplugin.cpp b/kopete/plugins/cryptography/cryptographyplugin.cpp
index 4e2e9686..bd1ce0dc 100644
--- a/kopete/plugins/cryptography/cryptographyplugin.cpp
+++ b/kopete/plugins/cryptography/cryptographyplugin.cpp
@@ -45,14 +45,14 @@
//In Jabber, the JEP says it's not. so we don't use richtext in our message, but some client did.
//We limit the html to some basis tag to limit security problem (bad links)
// - Olivier
-const TQRegExp CryptographyPlugin::isHTML( TQString::fromLatin1( "^[^<>]*(</?(html|body|br|p|font|center|b|i|u|span|div|pre)(>|[\\s/][^><]*>)[^><]*)+$" ) , false );
+const TQRegExp CryptographyPlugin::isHTML( TQString::tqfromLatin1( "^[^<>]*(</?(html|body|br|p|font|center|b|i|u|span|div|pre)(>|[\\s/][^><]*>)[^><]*)+$" ) , false );
typedef KGenericFactory<CryptographyPlugin> CryptographyPluginFactory;
static const KAboutData aboutdata("kopete_cryptography", I18N_NOOP("Cryptography") , "1.0" );
K_EXPORT_COMPONENT_FACTORY( kopete_cryptography, CryptographyPluginFactory( &aboutdata ) )
-CryptographyPlugin::CryptographyPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ )
-: Kopete::Plugin( CryptographyPluginFactory::instance(), parent, name ),
+CryptographyPlugin::CryptographyPlugin( TQObject *tqparent, const char *name, const TQStringList & /* args */ )
+: Kopete::Plugin( CryptographyPluginFactory::instance(), tqparent, name ),
m_cachedPass()
{
if( !pluginStatic_ )
@@ -154,14 +154,14 @@ bool CryptographyPlugin::passphraseHandling()
void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg )
{
TQString body = msg.plainBody();
- if( !body.startsWith( TQString::fromLatin1("-----BEGIN PGP MESSAGE----") )
- || !body.contains( TQString::fromLatin1("-----END PGP MESSAGE----") ) )
+ if( !body.startsWith( TQString::tqfromLatin1("-----BEGIN PGP MESSAGE----") )
+ || !body.tqcontains( TQString::tqfromLatin1("-----END PGP MESSAGE----") ) )
return;
if( msg.direction() != Kopete::Message::Inbound )
{
TQString plainBody;
- if ( m_cachedMessages.contains( body ) )
+ if ( m_cachedMessages.tqcontains( body ) )
{
plainBody = m_cachedMessages[ body ];
m_cachedMessages.remove( body );
@@ -179,16 +179,16 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg )
plainBody = TQStyleSheet::escape( plainBody );
//this is the same algoritm as in Kopete::Message::escapedBody();
- plainBody.replace( TQString::fromLatin1( "\n" ), TQString::fromLatin1( "<br/>" ) )
- .replace( TQString::fromLatin1( "\t" ), TQString::fromLatin1( "&nbsp;&nbsp;&nbsp;&nbsp;" ) )
- .replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( "&nbsp; " ) );
+ plainBody.tqreplace( TQString::tqfromLatin1( "\n" ), TQString::tqfromLatin1( "<br/>" ) )
+ .tqreplace( TQString::tqfromLatin1( "\t" ), TQString::tqfromLatin1( "&nbsp;&nbsp;&nbsp;&nbsp;" ) )
+ .tqreplace( TQRegExp( TQString::tqfromLatin1( "\\s\\s" ) ), TQString::tqfromLatin1( "&nbsp; " ) );
}
- msg.setBody( TQString::fromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ msg.setBody( TQString::tqfromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ i18n("Outgoing Encrypted Message: ")
- + TQString::fromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ + TQString::tqfromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ plainBody
- + TQString::fromLatin1(" </td></tr></table>")
+ + TQString::tqfromLatin1(" </td></tr></table>")
, Kopete::Message::RichText );
}
@@ -202,7 +202,7 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg )
//the Message::unescape is there because client like fire replace linebreak by <BR> to work even if the protocol doesn't allow newlines (IRC)
// cf http://fire.sourceforge.net/forums/viewtopic.php?t=174 and Bug #96052
- if(body.contains("<"))
+ if(body.tqcontains("<"))
body= Kopete::Message::unescape(body);
body = KgpgInterface::KgpgDecryptText( body, mPrivateKeyID );
@@ -215,11 +215,11 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg )
body = Kopete::Message::escape( body );
}
- msg.setBody( TQString::fromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ msg.setBody( TQString::tqfromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ i18n("Incoming Encrypted Message: ")
- + TQString::fromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ + TQString::tqfromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ body
- + TQString::fromLatin1(" </td></tr></table>")
+ + TQString::tqfromLatin1(" </td></tr></table>")
, Kopete::Message::RichText );
}