Skip to content

Commit

Permalink
Use qgetenv instead of getenv.
Browse files Browse the repository at this point in the history
Improves portability.  Suggested by krazy.
  • Loading branch information
Dr. Robert Marmorstein authored and mattrdash committed Aug 23, 2011
1 parent b840b45 commit 96392d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/kgpgme.cpp
Expand Up @@ -361,7 +361,7 @@ gpgme_error_t KGpgMe::readToBuffer(gpgme_data_t in, QByteArray* outBuffer) const

bool KGpgMe::isGnuPGAgentAvailable()
{
QString agent_info = getenv("GPG_AGENT_INFO");
QString agent_info = qgetenv("GPG_AGENT_INFO");

if (agent_info.indexOf(':') > 0)
return true;
Expand All @@ -373,7 +373,7 @@ void KGpgMe::setPassphraseCb()
bool agent = false;
QString agent_info;

agent_info = getenv("GPG_AGENT_INFO");
agent_info = qgetenv("GPG_AGENT_INFO");

if (m_useGnuPGAgent) {
if (agent_info.indexOf(':'))
Expand Down

0 comments on commit 96392d1

Please sign in to comment.