diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:50:21 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:50:21 -0600 |
commit | 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (patch) | |
tree | 89de88213bd261e4ccaade899ab2d6ec34b3a5a7 /libkpgp/kpgpbaseG.cpp | |
parent | 1dad5f662a09dfc5cc041caffe0f674044a4dcec (diff) | |
download | tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.tar.gz tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.zip |
Rename a number of old tq methods that are no longer tq specific
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 ecb5af195..7ce5c2358 100644 --- a/libkpgp/kpgpbaseG.cpp +++ b/libkpgp/kpgpbaseG.cpp @@ -27,7 +27,7 @@ #include <kprocess.h> #include <kdebug.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <string.h> /* strncmp */ @@ -73,7 +73,7 @@ BaseG::encsign( Block& block, const KeyIDList& recipients, const char *passphrase ) { TQCString cmd; - int exitqStatus = 0; + int exiStatus = 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(); - exitqStatus = runGpg(cmd.data(), passphrase); + exiStatus = runGpg(cmd.data(), passphrase); if( !output.isEmpty() ) block.setProcessedText( output ); block.setError( error ); - if( exitqStatus != 0 ) + if( exiStatus != 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.") - .tqarg( badkeys.data() ); + .arg( 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.") - .tqarg( badkeys.data() ); + .arg( badkeys.data() ); status |= MISSINGKEY; status |= ERROR; } @@ -199,7 +199,7 @@ BaseG::encsign( Block& block, const KeyIDList& recipients, } //kdDebug(5100) << "status = " << status << endl; - block.setqStatus( status ); + block.seStatus( status ); return status; } @@ -208,19 +208,19 @@ int BaseG::decrypt( Block& block, const char *passphrase ) { int index, index2; - int exitqStatus = 0; + int exiStatus = 0; clear(); input = block.text(); - exitqStatus = runGpg("--batch --decrypt", passphrase); + exiStatus = runGpg("--batch --decrypt", passphrase); if( !output.isEmpty() && ( error.find( "gpg: quoted printable" ) == -1 ) ) block.setProcessedText( output ); block.setError( error ); - if(exitqStatus == -1) { + if(exiStatus == -1) { errMsg = i18n("Error running gpg"); status = RUN_ERR; - block.setqStatus( status ); + block.seStatus( status ); return status; } @@ -361,7 +361,7 @@ BaseG::decrypt( Block& block, const char *passphrase ) } } //kdDebug(5100) << "status = " << status << endl; - block.setqStatus( status ); + block.seStatus( status ); return status; } @@ -371,15 +371,15 @@ BaseG::readPublicKey( const KeyID& keyID, const bool readTrust /* = false */, Key* key /* = 0 */ ) { - int exitqStatus = 0; + int exiStatus = 0; status = 0; if( readTrust ) - exitqStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode 0x" + keyID, 0, true ); + exiStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode 0x" + keyID, 0, true ); else - exitqStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode --no-expensive-trust-checks 0x" + keyID, 0, true ); + exiStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode --no-expensive-trust-checks 0x" + keyID, 0, true ); - if(exitqStatus != 0) { + if(exiStatus != 0) { status = ERROR; return 0; } @@ -405,7 +405,7 @@ BaseG::readPublicKey( const KeyID& keyID, KeyList BaseG::publicKeys( const TQStringList & patterns ) { - int exitqStatus = 0; + int exiStatus = 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; - exitqStatus = runGpg( cmd, 0, true ); + exiStatus = runGpg( cmd, 0, true ); - if(exitqStatus != 0) { + if(exiStatus != 0) { status = ERROR; return KeyList(); } @@ -437,7 +437,7 @@ BaseG::publicKeys( const TQStringList & patterns ) KeyList BaseG::secretKeys( const TQStringList & patterns ) { - int exitqStatus = 0; + int exiStatus = 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; - exitqStatus = runGpg( cmd, 0, true ); + exiStatus = runGpg( cmd, 0, true ); - if(exitqStatus != 0) { + if(exiStatus != 0) { status = ERROR; return KeyList(); } @@ -470,7 +470,7 @@ int BaseG::signKey(const KeyID& keyID, const char *passphrase) { TQCString cmd; - int exitqStatus = 0; + int exiStatus = 0; cmd = "--batch"; cmd += addUserId(); @@ -478,9 +478,9 @@ BaseG::signKey(const KeyID& keyID, const char *passphrase) cmd += keyID; status = 0; - exitqStatus = runGpg(cmd.data(), passphrase); + exiStatus = runGpg(cmd.data(), passphrase); - if (exitqStatus != 0) + if (exiStatus != 0) status = ERROR; return status; @@ -490,15 +490,15 @@ BaseG::signKey(const KeyID& keyID, const char *passphrase) TQCString BaseG::getAsciiPublicKey(const KeyID& keyID) { - int exitqStatus = 0; + int exiStatus = 0; if (keyID.isEmpty()) return TQCString(); status = 0; - exitqStatus = runGpg("--batch --armor --export 0x" + keyID, 0, true); + exiStatus = runGpg("--batch --armor --export 0x" + keyID, 0, true); - if(exitqStatus != 0) { + if(exiStatus != 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].tqunicode() == 0xdbff && + if ( uidString[i].unicode() == 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::tqfromLatin1( uid.data() ); + uidString = TQString::fromLatin1( uid.data() ); } } userID->setText( uidString ); |