summaryrefslogtreecommitdiffstats
path: root/libkpgp/kpgpbase2.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/kpgpbase2.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/kpgpbase2.cpp')
-rw-r--r--libkpgp/kpgpbase2.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/libkpgp/kpgpbase2.cpp b/libkpgp/kpgpbase2.cpp
index d0d08a0ff..255701a6f 100644
--- a/libkpgp/kpgpbase2.cpp
+++ b/libkpgp/kpgpbase2.cpp
@@ -55,7 +55,7 @@ Base2::encrypt( Block& block, const KeyIDList& recipients )
int
-Base2::clearsign( Block& block, const TQString& passphrase )
+Base2::clearsign( Block& block, const TQString &passphrase )
{
return encsign( block, KeyIDList(), passphrase );
}
@@ -63,16 +63,16 @@ Base2::clearsign( Block& block, const TQString& passphrase )
int
Base2::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 = PGP2 " +batchmode +language=en +verbose=1 -seat";
else if(!recipients.isEmpty())
cmd = PGP2 " +batchmode +language=en +verbose=1 -eat";
- else if (!passphrase.isNull())
+ else if (!passphrase.isEmpty())
cmd = PGP2 " +batchmode +language=en +verbose=1 -sat";
else
{
@@ -80,7 +80,7 @@ Base2::encsign( Block& block, const KeyIDList& recipients,
return OK;
}
- if (!passphrase.isNull())
+ if (!passphrase.isEmpty())
cmd += addUserId();
if(!recipients.isEmpty()) {
@@ -185,7 +185,7 @@ Base2::encsign( Block& block, const KeyIDList& recipients,
}
}
#endif
- if (!passphrase.isNull())
+ if (!passphrase.isEmpty())
{
if(error.find("Pass phrase is good") != -1)
{
@@ -224,7 +224,7 @@ Base2::encsign( Block& block, const KeyIDList& recipients,
int
-Base2::decrypt( Block& block, const TQString& passphrase )
+Base2::decrypt( Block& block, const TQString &passphrase )
{
int index, index2;
int exitStatus = 0;
@@ -294,7 +294,7 @@ Base2::decrypt( Block& block, const TQString& passphrase )
block.setRequiredUserId( error.mid(index, index2 - index) );
//kdDebug(5100) << "Base: key needed is \"" << block.requiredUserId() << "\"!\n";
- if ((!passphrase.isNull()) && (error.find("Bad pass phrase") != -1))
+ if ((!passphrase.isEmpty()) && (error.find("Bad pass phrase") != -1))
{
errMsg = i18n("Bad passphrase; could not decrypt.");
kdDebug(5100) << "Base: passphrase is bad" << endl;
@@ -573,7 +573,7 @@ Base2::secretKeys( const TQStringList & patterns )
int
-Base2::signKey(const KeyID& keyID, const TQString& passphrase)
+Base2::signKey(const KeyID& keyID, const TQString &passphrase)
{
TQCString cmd;
int exitStatus = 0;