From 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 22 Jun 2011 00:30:31 +0000 Subject: 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 --- kopete/plugins/cryptography/kgpginterface.cpp | 28 +++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'kopete/plugins/cryptography/kgpginterface.cpp') 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('<',"<"); - TQString passdlg=i18n("Enter passphrase for %1:").arg(userID); + userID.tqreplace('<',"<"); + TQString passdlg=i18n("Enter passphrase for %1:").tqarg(userID); if (counter>1) - passdlg.prepend(i18n("Bad passphrase
You have %1 tries left.
").arg(TQString::number(4-counter))); + passdlg.prepend(i18n("Bad passphrase
You have %1 tries left.
").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()); -- cgit v1.2.1