summaryrefslogtreecommitdiffstats
path: root/libkpgp/kpgpbaseG.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2018-11-30 16:17:09 +0100
committerSlávek Banko <slavek.banko@axis.cz>2018-11-30 16:24:31 +0100
commit6492b716b372d0f929f98a2965e00e10a0355204 (patch)
tree45a233b3f64424bea40533578150d392fa07b704 /libkpgp/kpgpbaseG.cpp
parent2e5de46030e2354b851ba731f6c76ac30a2e8a3b (diff)
downloadtdepim-6492b716b372d0f929f98a2965e00e10a0355204.tar.gz
tdepim-6492b716b372d0f929f98a2965e00e10a0355204.zip
Improved previous commit
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'libkpgp/kpgpbaseG.cpp')
-rw-r--r--libkpgp/kpgpbaseG.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/libkpgp/kpgpbaseG.cpp b/libkpgp/kpgpbaseG.cpp
index e63c30153..2e5c916fc 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 TQString& passphrase )
+BaseG::clearsign( Block& block, const TQString &passphrase )
{
return encsign( block, KeyIDList(), passphrase );
}
@@ -70,16 +70,16 @@ BaseG::clearsign( Block& block, const TQString& passphrase )
int
BaseG::encsign( Block& block, const KeyIDList& recipients,
- const TQString& passphrase )
+ const TQString &passphrase )
{
TQCString cmd;
int exitStatus = 0;
- if (!recipients.isEmpty() && !passphrase.isNull())
+ if (!recipients.isEmpty() && !passphrase.isEmpty())
cmd = "--batch --armor --sign --encrypt --textmode";
else if(!recipients.isEmpty())
cmd = "--batch --armor --encrypt --textmode";
- else if (!passphrase.isNull())
+ 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.isNull())
+ if (!passphrase.isEmpty())
cmd += addUserId();
if(!recipients.isEmpty())
@@ -164,7 +164,7 @@ BaseG::encsign( Block& block, const KeyIDList& recipients,
}
}
#endif
- if (!passphrase.isNull())
+ 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 TQString& passphrase )
+BaseG::decrypt( Block& block, const TQString &passphrase )
{
int index, index2;
int exitStatus = 0;
@@ -252,7 +252,7 @@ BaseG::decrypt( Block& block, const TQString& passphrase )
{
if( ( index = error.find( "bad passphrase" ) ) != -1 )
{
- if (!passphrase.isNull())
+ 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 TQString& passphrase)
+BaseG::signKey(const KeyID& keyID, const TQString &passphrase)
{
TQCString cmd;
int exitStatus = 0;