summaryrefslogtreecommitdiffstats
path: root/src/kgpgme.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-04-07 02:21:44 +0200
committerSlávek Banko <slavek.banko@axis.cz>2020-04-10 12:47:05 +0200
commitb51e232350d31b65a8cd055693c7869f0a896193 (patch)
treea92cf4251003376d27c8621bc5116dd980faf381 /src/kgpgme.cpp
parent360e269df56279904ac6f2913e8f0c3f786aa8fb (diff)
downloadbasket-b51e232350d31b65a8cd055693c7869f0a896193.tar.gz
basket-b51e232350d31b65a8cd055693c7869f0a896193.zip
Added controlled conversions to char* instead of automatic ascii conversions.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit ef3976a6cb843f51333ea43172306a9c8f4954ef)
Diffstat (limited to 'src/kgpgme.cpp')
-rw-r--r--src/kgpgme.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kgpgme.cpp b/src/kgpgme.cpp
index ee4372c..19c8fb8 100644
--- a/src/kgpgme.cpp
+++ b/src/kgpgme.cpp
@@ -382,12 +382,12 @@ void KGpgMe::setPassphraseCb()
if (agent_info.find(':'))
agent = true;
if(agent_info.startsWith("disable:"))
- setenv("GPG_AGENT_INFO", agent_info.mid(8), 1);
+ setenv("GPG_AGENT_INFO", agent_info.mid(8).local8Bit(), 1);
}
else
{
if(!agent_info.startsWith("disable:"))
- setenv("GPG_AGENT_INFO", "disable:" + agent_info, 1);
+ setenv("GPG_AGENT_INFO", "disable:" + agent_info.local8Bit(), 1);
}
if (agent)
gpgme_set_passphrase_cb(m_ctx, 0, 0);