From 2e5de46030e2354b851ba731f6c76ac30a2e8a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 29 Nov 2018 19:52:17 +0100 Subject: Adapted to new KPasswordEdit::password() signature. This relates to bug 2961. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- libkpgp/kpgpbaseG.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'libkpgp/kpgpbaseG.cpp') diff --git a/libkpgp/kpgpbaseG.cpp b/libkpgp/kpgpbaseG.cpp index cd6eaf41..e63c3015 100644 --- a/libkpgp/kpgpbaseG.cpp +++ b/libkpgp/kpgpbaseG.cpp @@ -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.isNull()) cmd = "--batch --armor --sign --encrypt --textmode"; else if(!recipients.isEmpty()) cmd = "--batch --armor --encrypt --textmode"; - else if(passphrase != 0) + else if (!passphrase.isNull()) cmd = "--batch --escape-from --clearsign"; else { @@ -87,7 +87,7 @@ BaseG::encsign( Block& block, const KeyIDList& recipients, return OK; } - if(passphrase != 0) + if (!passphrase.isNull()) cmd += addUserId(); if(!recipients.isEmpty()) @@ -164,7 +164,7 @@ BaseG::encsign( Block& block, const KeyIDList& recipients, } } #endif - if( passphrase != 0 ) + if (!passphrase.isNull()) { // 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.isNull()) { 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; -- cgit v1.2.3