Commit 75f8a896 authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Set file name of encrypted data if a single file is encrypted

GnuPG-bug-id: 6056
parent 89eff4de
......@@ -122,6 +122,7 @@ endif()
if (QGpgme_VERSION VERSION_GREATER_EQUAL "1.17.2")
set(QGPGME_SUPPORTS_KEY_REVOCATION 1)
set(QGPGME_SUPPORTS_KEY_REFRESH 1)
set(QGPGME_SUPPORTS_SET_FILENAME 1)
endif()
# Kdepimlibs packages
......
......@@ -53,3 +53,6 @@
/* Defined if QGpgME supports refreshing keys */
#cmakedefine QGPGME_SUPPORTS_KEY_REFRESH 1
/* Defined if QGpgME supports setting the file name of encrypted data */
#cmakedefine QGPGME_SUPPORTS_SET_FILENAME 1
......@@ -468,6 +468,11 @@ void SignEncryptTask::doStart()
if (d->sign) {
std::unique_ptr<QGpgME::SignEncryptJob> job = d->createSignEncryptJob(protocol());
kleo_assert(job.get());
#ifdef QGPGME_SUPPORTS_SET_FILENAME
if (d->inputFileNames.size() == 1) {
job->setFileName(d->inputFileNames.front());
}
#endif
job->start(d->signers, d->recipients,
d->input->ioDevice(), d->output->ioDevice(), flags);
......@@ -476,6 +481,11 @@ void SignEncryptTask::doStart()
} else {
std::unique_ptr<QGpgME::EncryptJob> job = d->createEncryptJob(protocol());
kleo_assert(job.get());
#ifdef QGPGME_SUPPORTS_SET_FILENAME
if (d->inputFileNames.size() == 1) {
job->setFileName(d->inputFileNames.front());
}
#endif
job->start(d->recipients, d->input->ioDevice(), d->output->ioDevice(), flags);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment