diff options
Diffstat (limited to 'libkpgp/kpgpbaseG.cpp')
-rw-r--r-- | libkpgp/kpgpbaseG.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/libkpgp/kpgpbaseG.cpp b/libkpgp/kpgpbaseG.cpp index 7ce5c2358..ecb5af195 100644 --- a/libkpgp/kpgpbaseG.cpp +++ b/libkpgp/kpgpbaseG.cpp @@ -27,7 +27,7 @@ #include <kprocess.h> #include <kdebug.h> -#include <textcodec.h> +#include <tqtextcodec.h> #include <string.h> /* strncmp */ @@ -73,7 +73,7 @@ BaseG::encsign( Block& block, const KeyIDList& recipients, const char *passphrase ) { TQCString cmd; - int exiStatus = 0; + int exitqStatus = 0; if(!recipients.isEmpty() && passphrase != 0) cmd = "--batch --armor --sign --encrypt --textmode"; @@ -109,12 +109,12 @@ BaseG::encsign( Block& block, const KeyIDList& recipients, clear(); input = block.text(); - exiStatus = runGpg(cmd.data(), passphrase); + exitqStatus = runGpg(cmd.data(), passphrase); if( !output.isEmpty() ) block.setProcessedText( output ); block.setError( error ); - if( exiStatus != 0 ) + if( exitqStatus != 0 ) { // this error message is later hopefully overwritten errMsg = i18n( "Unknown error." ); @@ -153,12 +153,12 @@ BaseG::encsign( Block& block, const KeyIDList& recipients, errMsg = i18n("Could not find public keys matching the userid(s)\n" "%1;\n" "the message is not encrypted.") - .arg( badkeys.data() ); + .tqarg( badkeys.data() ); else errMsg = i18n("Could not find public keys matching the userid(s)\n" "%1;\n" "these persons will not be able to read the message.") - .arg( badkeys.data() ); + .tqarg( badkeys.data() ); status |= MISSINGKEY; status |= ERROR; } @@ -199,7 +199,7 @@ BaseG::encsign( Block& block, const KeyIDList& recipients, } //kdDebug(5100) << "status = " << status << endl; - block.seStatus( status ); + block.setqStatus( status ); return status; } @@ -208,19 +208,19 @@ int BaseG::decrypt( Block& block, const char *passphrase ) { int index, index2; - int exiStatus = 0; + int exitqStatus = 0; clear(); input = block.text(); - exiStatus = runGpg("--batch --decrypt", passphrase); + exitqStatus = runGpg("--batch --decrypt", passphrase); if( !output.isEmpty() && ( error.find( "gpg: quoted printable" ) == -1 ) ) block.setProcessedText( output ); block.setError( error ); - if(exiStatus == -1) { + if(exitqStatus == -1) { errMsg = i18n("Error running gpg"); status = RUN_ERR; - block.seStatus( status ); + block.setqStatus( status ); return status; } @@ -361,7 +361,7 @@ BaseG::decrypt( Block& block, const char *passphrase ) } } //kdDebug(5100) << "status = " << status << endl; - block.seStatus( status ); + block.setqStatus( status ); return status; } @@ -371,15 +371,15 @@ BaseG::readPublicKey( const KeyID& keyID, const bool readTrust /* = false */, Key* key /* = 0 */ ) { - int exiStatus = 0; + int exitqStatus = 0; status = 0; if( readTrust ) - exiStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode 0x" + keyID, 0, true ); + exitqStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode 0x" + keyID, 0, true ); else - exiStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode --no-expensive-trust-checks 0x" + keyID, 0, true ); + exitqStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode --no-expensive-trust-checks 0x" + keyID, 0, true ); - if(exiStatus != 0) { + if(exitqStatus != 0) { status = ERROR; return 0; } @@ -405,7 +405,7 @@ BaseG::readPublicKey( const KeyID& keyID, KeyList BaseG::publicKeys( const TQStringList & patterns ) { - int exiStatus = 0; + int exitqStatus = 0; // the option --with-colons should be used for interprocess communication // with gpg (according to Werner Koch) @@ -417,9 +417,9 @@ BaseG::publicKeys( const TQStringList & patterns ) cmd += KProcess::quote( *it ).local8Bit(); } status = 0; - exiStatus = runGpg( cmd, 0, true ); + exitqStatus = runGpg( cmd, 0, true ); - if(exiStatus != 0) { + if(exitqStatus != 0) { status = ERROR; return KeyList(); } @@ -437,7 +437,7 @@ BaseG::publicKeys( const TQStringList & patterns ) KeyList BaseG::secretKeys( const TQStringList & patterns ) { - int exiStatus = 0; + int exitqStatus = 0; // the option --with-colons should be used for interprocess communication // with gpg (according to Werner Koch) @@ -449,9 +449,9 @@ BaseG::secretKeys( const TQStringList & patterns ) cmd += KProcess::quote( *it ).local8Bit(); } status = 0; - exiStatus = runGpg( cmd, 0, true ); + exitqStatus = runGpg( cmd, 0, true ); - if(exiStatus != 0) { + if(exitqStatus != 0) { status = ERROR; return KeyList(); } @@ -470,7 +470,7 @@ int BaseG::signKey(const KeyID& keyID, const char *passphrase) { TQCString cmd; - int exiStatus = 0; + int exitqStatus = 0; cmd = "--batch"; cmd += addUserId(); @@ -478,9 +478,9 @@ BaseG::signKey(const KeyID& keyID, const char *passphrase) cmd += keyID; status = 0; - exiStatus = runGpg(cmd.data(), passphrase); + exitqStatus = runGpg(cmd.data(), passphrase); - if (exiStatus != 0) + if (exitqStatus != 0) status = ERROR; return status; @@ -490,15 +490,15 @@ BaseG::signKey(const KeyID& keyID, const char *passphrase) TQCString BaseG::getAsciiPublicKey(const KeyID& keyID) { - int exiStatus = 0; + int exitqStatus = 0; if (keyID.isEmpty()) return TQCString(); status = 0; - exiStatus = runGpg("--batch --armor --export 0x" + keyID, 0, true); + exitqStatus = runGpg("--batch --armor --export 0x" + keyID, 0, true); - if(exiStatus != 0) { + if(exitqStatus != 0) { status = ERROR; return TQCString(); } @@ -722,7 +722,7 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) // check whether uid was utf-8 encoded bool isUtf8 = true; for ( unsigned int i = 0; i + 1 < uidString.length(); ++i ) { - if ( uidString[i].unicode() == 0xdbff && + if ( uidString[i].tqunicode() == 0xdbff && uidString[i+1].row() == 0xde ) { // we found a non-Unicode character (see TQString::fromUtf8()) isUtf8 = false; @@ -778,7 +778,7 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) else { // assume latin1 encoding kdDebug(5100) << "Assume latin1 encoding." << endl; - uidString = TQString::fromLatin1( uid.data() ); + uidString = TQString::tqfromLatin1( uid.data() ); } } userID->setText( uidString ); |