diff options
Diffstat (limited to 'libkpgp/kpgpbaseG.cpp')
-rw-r--r-- | libkpgp/kpgpbaseG.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libkpgp/kpgpbaseG.cpp b/libkpgp/kpgpbaseG.cpp index cd6eaf41..c4aa0ac1 100644 --- a/libkpgp/kpgpbaseG.cpp +++ b/libkpgp/kpgpbaseG.cpp @@ -24,7 +24,7 @@ #include "kpgp.h" #include <tdelocale.h> -#include <kprocess.h> +#include <tdeprocess.h> #include <kdebug.h> #include <tqtextcodec.h> @@ -62,7 +62,7 @@ BaseG::encrypt( Block& block, const KeyIDList& recipients ) int -BaseG::clearsign( Block& block, const char *passphrase ) +BaseG::clearsign( Block& block, const TQString &passphrase ) { return encsign( block, KeyIDList(), passphrase ); } @@ -70,16 +70,16 @@ BaseG::clearsign( Block& block, const char *passphrase ) int BaseG::encsign( Block& block, const KeyIDList& recipients, - const char *passphrase ) + const TQString &passphrase ) { TQCString cmd; int exitStatus = 0; - if(!recipients.isEmpty() && passphrase != 0) + if (!recipients.isEmpty() && !passphrase.isEmpty()) cmd = "--batch --armor --sign --encrypt --textmode"; else if(!recipients.isEmpty()) cmd = "--batch --armor --encrypt --textmode"; - else if(passphrase != 0) + else if (!passphrase.isEmpty()) cmd = "--batch --escape-from --clearsign"; else { @@ -87,7 +87,7 @@ BaseG::encsign( Block& block, const KeyIDList& recipients, return OK; } - if(passphrase != 0) + if (!passphrase.isEmpty()) cmd += addUserId(); if(!recipients.isEmpty()) @@ -128,7 +128,7 @@ BaseG::encsign( Block& block, const KeyIDList& recipients, if(!recipients.isEmpty()) { int index = 0; - bool bad = FALSE; + bool bad = false; unsigned int num = 0; TQCString badkeys = ""; // Examples: @@ -140,7 +140,7 @@ BaseG::encsign( Block& block, const KeyIDList& recipients, // (untrusted key, 23456789 is the key Id of the encryption sub key) while((index = error.find("skipped: ",index)) != -1) { - bad = TRUE; + bad = true; index = error.find('\'',index); int index2 = error.find('\'',index+1); badkeys += error.mid(index, index2-index+1) + ", "; @@ -164,7 +164,7 @@ BaseG::encsign( Block& block, const KeyIDList& recipients, } } #endif - if( passphrase != 0 ) + if (!passphrase.isEmpty()) { // Example 1 (bad passphrase, clearsign only): // gpg: skipped `0x12345678': bad passphrase @@ -205,7 +205,7 @@ BaseG::encsign( Block& block, const KeyIDList& recipients, int -BaseG::decrypt( Block& block, const char *passphrase ) +BaseG::decrypt( Block& block, const TQString &passphrase ) { int index, index2; int exitStatus = 0; @@ -252,7 +252,7 @@ BaseG::decrypt( Block& block, const char *passphrase ) { if( ( index = error.find( "bad passphrase" ) ) != -1 ) { - if( passphrase != 0 ) + if (!passphrase.isEmpty()) { errMsg = i18n( "Bad passphrase; could not decrypt." ); kdDebug(5100) << "Base: passphrase is bad" << endl; @@ -483,7 +483,7 @@ BaseG::secretKeys( const TQStringList & patterns ) int -BaseG::signKey(const KeyID& keyID, const char *passphrase) +BaseG::signKey(const KeyID& keyID, const TQString &passphrase) { TQCString cmd; int exitStatus = 0; |