summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2016-06-08 13:51:00 +0200
committerMontel Laurent <[email protected]>2016-06-08 13:51:00 +0200
commit13c570c9196afc1b10ba3b16a2484abcb4fdc4cf (patch)
tree74eb6aeab33cc26ee6465fe085b45c2368a10506
parent08068a31233235ec747a227f355f88636331155a (diff)
Use qobject_cast when possible
-rw-r--r--mimetreeparser/src/job/kleojobexecutor.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/mimetreeparser/src/job/kleojobexecutor.cpp b/mimetreeparser/src/job/kleojobexecutor.cpp
index 8040258..bb6d7ca 100644
--- a/mimetreeparser/src/job/kleojobexecutor.cpp
+++ b/mimetreeparser/src/job/kleojobexecutor.cpp
@@ -106,7 +106,7 @@ Error KleoJobExecutor::auditLogError() const
void KleoJobExecutor::verificationResult(const GpgME::VerificationResult &result)
{
qCDebug(MIMETREEPARSER_LOG) << "Detached verification job finished";
- Kleo::Job *job = dynamic_cast<Kleo::Job *>(sender());
+ Kleo::Job *job = qobject_cast<Kleo::Job *>(sender());
assert(job);
mVerificationResult = result;
mAuditLogError = job->auditLogError();
@@ -117,7 +117,7 @@ void KleoJobExecutor::verificationResult(const GpgME::VerificationResult &result
void KleoJobExecutor::verificationResult(const GpgME::VerificationResult &result, const QByteArray &plainText)
{
qCDebug(MIMETREEPARSER_LOG) << "Opaque verification job finished";
- Kleo::Job *job = dynamic_cast<Kleo::Job *>(sender());
+ Kleo::Job *job = qobject_cast<Kleo::Job *>(sender());
assert(job);
mVerificationResult = result;
mData = plainText;
@@ -132,7 +132,7 @@ void KleoJobExecutor::decryptResult(
const QByteArray &plainText)
{
qCDebug(MIMETREEPARSER_LOG) << "Decryption job finished";
- Kleo::Job *job = dynamic_cast<Kleo::Job *>(sender());
+ Kleo::Job *job = qobject_cast<Kleo::Job *>(sender());
assert(job);
mVerificationResult = verificationresult;
mDecryptResult = decryptionresult;
@@ -144,7 +144,7 @@ void KleoJobExecutor::decryptResult(
void KleoJobExecutor::importResult(const GpgME::ImportResult &result)
{
- Kleo::Job *job = dynamic_cast<Kleo::Job *>(sender());
+ Kleo::Job *job = qobject_cast<Kleo::Job *>(sender());
assert(job);
mImportResult = result;
mAuditLogError = job->auditLogError();