summaryrefslogtreecommitdiffstats
path: root/libkpgp/kpgpbase.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/kpgpbase.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/kpgpbase.cpp')
-rw-r--r--libkpgp/kpgpbase.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/libkpgp/kpgpbase.cpp b/libkpgp/kpgpbase.cpp
index 5b28bd540..a033a0b4a 100644
--- a/libkpgp/kpgpbase.cpp
+++ b/libkpgp/kpgpbase.cpp
@@ -59,7 +59,7 @@ Base::clear()
int
-Base::run( const char *cmd, const TQString& passphrase, bool onlyReadFromPGP )
+Base::run( const char *cmd, const TQString &passphrase, bool onlyReadFromPGP )
{
/* the pipe ppass is used for to pass the password to
* pgp. passing the password together with the normal input through
@@ -74,7 +74,7 @@ Base::run( const char *cmd, const TQString& passphrase, bool onlyReadFromPGP )
struct pollfd pollin, pollout, pollerr;
int pollstatus;
- if (!passphrase.isNull())
+ if (!passphrase.isEmpty())
{
if (pipe(ppass) < 0) {
// An error occurred
@@ -369,7 +369,7 @@ Base::run( const char *cmd, const TQString& passphrase, bool onlyReadFromPGP )
close(perr[0]);
unsetenv("PGPPASSFD");
- if (!passphrase.isNull())
+ if (!passphrase.isEmpty())
close(ppass[0]);
// Did the child exit normally?
@@ -398,7 +398,7 @@ Base::run( const char *cmd, const TQString& passphrase, bool onlyReadFromPGP )
int
-Base::runGpg( const char *cmd, const TQString& passphrase, bool onlyReadFromGnuPG )
+Base::runGpg( const char *cmd, const TQString &passphrase, bool onlyReadFromGnuPG )
{
/* the pipe ppass is used for to pass the password to
* pgp. passing the password together with the normal input through
@@ -418,7 +418,7 @@ Base::runGpg( const char *cmd, const TQString& passphrase, bool onlyReadFromGnuP
const int STD_IN = 2;
int pollstatus;
- if (!passphrase.isNull())
+ if (!passphrase.isEmpty())
{
if (pipe(ppass) < 0) {
// An error occurred
@@ -461,7 +461,7 @@ Base::runGpg( const char *cmd, const TQString& passphrase, bool onlyReadFromGnuP
printf("Something went wrong in libkpgp/kpgpbase.cpp\n");
}
- if (!passphrase.isNull()) {
+ if (!passphrase.isEmpty()) {
if( mVersion >= "1.0.7" ) {
// GnuPG >= 1.0.7 supports the gpg-agent, so we look for it.
if( 0 == getenv("GPG_AGENT_INFO") ) {
@@ -506,7 +506,7 @@ Base::runGpg( const char *cmd, const TQString& passphrase, bool onlyReadFromGnuP
//#warning FIXME: there has to be a better way to do this
/* this is nasty nasty nasty (but it works) */
- if (!passphrase.isNull()) {
+ if (!passphrase.isEmpty()) {
if( mVersion >= "1.0.7" ) {
// GnuPG >= 1.0.7 supports the gpg-agent, so we look for it.
if( 0 == getenv("GPG_AGENT_INFO") ) {
@@ -684,7 +684,7 @@ Base::runGpg( const char *cmd, const TQString& passphrase, bool onlyReadFromGnuP
close(pout[0]);
close(perr[0]);
- if (!passphrase.isNull())
+ if (!passphrase.isEmpty())
close(ppass[0]);
// Did the child exit normally?