void EncryptEMailTask::Private::slotResult(const EncryptionResult &result) { const QGpgME::Job *const job = qobject_cast<const QGpgME::Job *>(q->sender()); if (result.error().code()) { output->cancel(); } else { output->finalize(); } q->emitResult(std::shared_ptr<Result>(new EncryptEMailResult(result, AuditLog::fromJob(job)))); }
static QString to_information_string(const EncryptionResult &result) { return result.error() ? i18n("Encryption failed: %1").arg(QString::fromLocal8Bit(result.error().asString())) : i18n("Encryption successful") ; }