summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/cryptography
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/plugins/cryptography')
-rw-r--r--kopete/plugins/cryptography/cryptographyplugin.cpp12
-rw-r--r--kopete/plugins/cryptography/kgpginterface.cpp16
-rw-r--r--kopete/plugins/cryptography/kgpgselkey.cpp4
-rw-r--r--kopete/plugins/cryptography/popuppublic.cpp12
4 files changed, 22 insertions, 22 deletions
diff --git a/kopete/plugins/cryptography/cryptographyplugin.cpp b/kopete/plugins/cryptography/cryptographyplugin.cpp
index bd1ce0dc..7b2cb8bf 100644
--- a/kopete/plugins/cryptography/cryptographyplugin.cpp
+++ b/kopete/plugins/cryptography/cryptographyplugin.cpp
@@ -155,13 +155,13 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg )
{
TQString body = msg.plainBody();
if( !body.startsWith( TQString::tqfromLatin1("-----BEGIN PGP MESSAGE----") )
- || !body.tqcontains( TQString::tqfromLatin1("-----END PGP MESSAGE----") ) )
+ || !body.contains( TQString::tqfromLatin1("-----END PGP MESSAGE----") ) )
return;
if( msg.direction() != Kopete::Message::Inbound )
{
TQString plainBody;
- if ( m_cachedMessages.tqcontains( body ) )
+ if ( m_cachedMessages.contains( body ) )
{
plainBody = m_cachedMessages[ body ];
m_cachedMessages.remove( body );
@@ -179,9 +179,9 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg )
plainBody = TQStyleSheet::escape( plainBody );
//this is the same algoritm as in Kopete::Message::escapedBody();
- 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; " ) );
+ plainBody.replace( TQString::tqfromLatin1( "\n" ), TQString::tqfromLatin1( "<br/>" ) )
+ .replace( TQString::tqfromLatin1( "\t" ), TQString::tqfromLatin1( "&nbsp;&nbsp;&nbsp;&nbsp;" ) )
+ .replace( TQRegExp( TQString::tqfromLatin1( "\\s\\s" ) ), TQString::tqfromLatin1( "&nbsp; " ) );
}
msg.setBody( TQString::tqfromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
@@ -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.tqcontains("<"))
+ if(body.contains("<"))
body= Kopete::Message::unescape(body);
body = KgpgInterface::KgpgDecryptText( body, mPrivateKeyID );
diff --git a/kopete/plugins/cryptography/kgpginterface.cpp b/kopete/plugins/cryptography/kgpginterface.cpp
index d74f9baa..fb407523 100644
--- a/kopete/plugins/cryptography/kgpginterface.cpp
+++ b/kopete/plugins/cryptography/kgpginterface.cpp
@@ -50,12 +50,12 @@ TQString KgpgInterface::KgpgEncryptText(TQString text,TQString userIDs, TQString
userIDs=userIDs.simplifyWhiteSpace();
Options=Options.stripWhiteSpace();
- int ct=userIDs.tqfind(" ");
+ int ct=userIDs.find(" ");
while (ct!=-1) // if multiple keys...
{
dests+=" --recipient "+userIDs.section(' ',0,0);
userIDs.remove(0,ct+1);
- ct=userIDs.tqfind(" ");
+ ct=userIDs.find(" ");
}
dests+=" --recipient "+userIDs;
@@ -95,7 +95,7 @@ TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID)
{
/// pipe for passphrase
//userID=TQString::fromUtf8(userID);
- userID.tqreplace('<',"&lt;");
+ userID.replace('<',"&lt;");
TQString passdlg=i18n("Enter passphrase for <b>%1</b>:").tqarg(userID);
if (counter>1)
passdlg.prepend(i18n("<b>Bad passphrase</b><br> You have %1 tries left.<br>").tqarg(TQString::number(4-counter)));
@@ -151,18 +151,18 @@ TQString KgpgInterface::checkForUtf8(TQString txt)
for (s = txt.ascii(); *s && !(*s & 0x80); s++)
;
- if (*s && !strchr (txt.ascii(), 0xc3) && (txt.tqfind("\\x")==-1))
+ if (*s && !strchr (txt.ascii(), 0xc3) && (txt.find("\\x")==-1))
return txt;
/* The string is not in UTF-8 */
//if (strchr (txt.ascii(), 0xc3)) return (txt+" +++");
- if (txt.tqfind("\\x")==-1)
+ if (txt.find("\\x")==-1)
return TQString::fromUtf8(txt.ascii());
- // if (!strchr (txt.ascii(), 0xc3) || (txt.tqfind("\\x")!=-1)) {
- for ( int idx = 0 ; (idx = txt.tqfind( "\\x", idx )) >= 0 ; ++idx ) {
+ // if (!strchr (txt.ascii(), 0xc3) || (txt.find("\\x")!=-1)) {
+ for ( int idx = 0 ; (idx = txt.find( "\\x", idx )) >= 0 ; ++idx ) {
char str[2] = "x";
str[0] = (char) TQString( txt.mid( idx + 2, 2 ) ).toShort( 0, 16 );
- txt.tqreplace( idx, 4, str );
+ txt.replace( idx, 4, str );
}
if (!strchr (txt.ascii(), 0xc3))
return TQString::fromUtf8(txt.ascii());
diff --git a/kopete/plugins/cryptography/kgpgselkey.cpp b/kopete/plugins/cryptography/kgpgselkey.cpp
index 1f3d5a39..f4d4072f 100644
--- a/kopete/plugins/cryptography/kgpgselkey.cpp
+++ b/kopete/plugins/cryptography/kgpgselkey.cpp
@@ -170,13 +170,13 @@ KgpgSelKey::KgpgSelKey(TQWidget *tqparent, const char *name,bool showlocal):KDia
TQString KgpgSelKey::extractKeyName(TQString fullName)
{
TQString kMail;
- if (fullName.tqfind("<")!=-1)
+ if (fullName.find("<")!=-1)
{
kMail=fullName.section('<',-1,-1);
kMail.truncate(kMail.length()-1);
}
TQString kName=fullName.section('<',0,0);
- if (kName.tqfind("(")!=-1) kName=kName.section('(',0,0);
+ if (kName.find("(")!=-1) kName=kName.section('(',0,0);
return TQString(kMail+" ("+kName+")").stripWhiteSpace();
}
diff --git a/kopete/plugins/cryptography/popuppublic.cpp b/kopete/plugins/cryptography/popuppublic.cpp
index 661fd717..d3d3ecd7 100644
--- a/kopete/plugins/cryptography/popuppublic.cpp
+++ b/kopete/plugins/cryptography/popuppublic.cpp
@@ -269,7 +269,7 @@ void popupPublic::sort()
if (current==NULL)
return;
- if ((untrustedList.tqfind(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())){
+ if ((untrustedList.find(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())){
if (current->isSelected()) {
current->setSelected(false);
reselect=true;
@@ -279,7 +279,7 @@ void popupPublic::sort()
while ( current->nextSibling() ) {
current = current->nextSibling();
- if ((untrustedList.tqfind(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())) {
+ if ((untrustedList.find(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())) {
if (current->isSelected()) {
current->setSelected(false);
reselect=true;
@@ -433,13 +433,13 @@ void popupPublic::slotprocread(KProcIO *p)
untrustedList<<id;
break;
}
- if (keyString[11].tqfind('D')!=-1) dead=true;
+ if (keyString[11].find('D')!=-1) dead=true;
tst=keyString[9];
- if (tst.tqfind("<")!=-1) {
+ if (tst.find("<")!=-1) {
keymail=tst.section('<',-1,-1);
keymail.truncate(keymail.length()-1);
keyname=tst.section('<',0,0);
- //if (keyname.tqfind("(")!=-1)
+ //if (keyname.find("(")!=-1)
// keyname=keyname.section('(',0,0);
} else {
keymail=TQString();
@@ -454,7 +454,7 @@ void popupPublic::slotprocread(KProcIO *p)
UpdateViewItem2 *item=new UpdateViewItem2(keysList,keyname,keymail,id,isDefaultKey);
//KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, validity: %3").tqarg(id).tqarg(tr).tqarg(val));
//sub->setSelectable(false);
- if (seclist.tqfind(tst,0,FALSE)!=-1)
+ if (seclist.find(tst,0,FALSE)!=-1)
item->setPixmap(0,keyPair);
else
item->setPixmap(0,keySingle);