void EncryptEMailTask::Private::slotResult( const EncryptionResult & result ) { const Job * const job = qobject_cast<const Job*>( q->sender() ); if ( result.error().code() ) { output->cancel(); } else { output->finalize(); } q->emitResult( 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") ; }