From 6492b716b372d0f929f98a2965e00e10a0355204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Fri, 30 Nov 2018 16:17:09 +0100 Subject: Improved previous commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko Signed-off-by: Michele Calgaro --- libkpgp/kpgpbase.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'libkpgp/kpgpbase.cpp') 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? -- cgit v1.2.1