summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/cryptography/kgpginterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/plugins/cryptography/kgpginterface.cpp')
-rw-r--r--kopete/plugins/cryptography/kgpginterface.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/kopete/plugins/cryptography/kgpginterface.cpp b/kopete/plugins/cryptography/kgpginterface.cpp
index e41e246d..d74f9baa 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.find(" ");
+ int ct=userIDs.tqfind(" ");
while (ct!=-1) // if multiple keys...
{
dests+=" --recipient "+userIDs.section(' ',0,0);
userIDs.remove(0,ct+1);
- ct=userIDs.find(" ");
+ ct=userIDs.tqfind(" ");
}
dests+=" --recipient "+userIDs;
@@ -75,7 +75,7 @@ TQString KgpgInterface::KgpgEncryptText(TQString text,TQString userIDs, TQString
if( !encResult.isEmpty() )
return encResult;
else
- return TQString::null;
+ return TQString();
}
TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID)
@@ -95,15 +95,15 @@ TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID)
{
/// pipe for passphrase
//userID=TQString::fromUtf8(userID);
- userID.replace('<',"&lt;");
- TQString passdlg=i18n("Enter passphrase for <b>%1</b>:").arg(userID);
+ userID.tqreplace('<',"&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>").arg(TQString::number(4-counter)));
+ passdlg.prepend(i18n("<b>Bad passphrase</b><br> You have %1 tries left.<br>").tqarg(TQString::number(4-counter)));
/// pipe for passphrase
int code=KPasswordDialog::getPassword(password,passdlg);
if (code!=TQDialog::Accepted)
- return TQString::null;
+ return TQString();
CryptographyPlugin::setCachedPass(password);
}
@@ -135,7 +135,7 @@ TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID)
if( !encResult.isEmpty() )
return encResult;
else
- return TQString::null;
+ return TQString();
}
TQString KgpgInterface::checkForUtf8(TQString txt)
@@ -147,22 +147,22 @@ TQString KgpgInterface::checkForUtf8(TQString txt)
/* Make sure the encoding is UTF-8.
* Test structure suggested by Werner Koch */
if (txt.isEmpty())
- return TQString::null;
+ return TQString();
for (s = txt.ascii(); *s && !(*s & 0x80); s++)
;
- if (*s && !strchr (txt.ascii(), 0xc3) && (txt.find("\\x")==-1))
+ if (*s && !strchr (txt.ascii(), 0xc3) && (txt.tqfind("\\x")==-1))
return txt;
/* The string is not in UTF-8 */
//if (strchr (txt.ascii(), 0xc3)) return (txt+" +++");
- if (txt.find("\\x")==-1)
+ if (txt.tqfind("\\x")==-1)
return TQString::fromUtf8(txt.ascii());
- // if (!strchr (txt.ascii(), 0xc3) || (txt.find("\\x")!=-1)) {
- for ( int idx = 0 ; (idx = txt.find( "\\x", idx )) >= 0 ; ++idx ) {
+ // if (!strchr (txt.ascii(), 0xc3) || (txt.tqfind("\\x")!=-1)) {
+ for ( int idx = 0 ; (idx = txt.tqfind( "\\x", idx )) >= 0 ; ++idx ) {
char str[2] = "x";
str[0] = (char) TQString( txt.mid( idx + 2, 2 ) ).toShort( 0, 16 );
- txt.replace( idx, 4, str );
+ txt.tqreplace( idx, 4, str );
}
if (!strchr (txt.ascii(), 0xc3))
return TQString::fromUtf8(txt.ascii());