Don't crash when quickly switching signed messages.

The problem was that the sub-event loop of KleoJobExecutor would
process user input, which made it possible to switch messages while
the job was being executed. That caused trouble when returning from
the sub-event loop.

Thanks to Volker for the solution.

BUG: 162049

svn path=/trunk/KDE/kdepim/; revision=807341
wilder-work
Thomas McGuire 18 years ago
parent 128d482d83
commit e085ae677f
  1. 8
      kleojobexecutor.cpp

@ -51,7 +51,7 @@ GpgME::VerificationResult KleoJobExecutor::exec(
GpgME::Error err = job->start( signature, signedData );
if ( err )
return VerificationResult( err );
mEventLoop->exec();
mEventLoop->exec( QEventLoop::ExcludeUserInputEvents );
return mVerificationResult;
}
@ -68,7 +68,7 @@ GpgME::VerificationResult KleoJobExecutor::exec(
plainText.clear();
return VerificationResult( err );
}
mEventLoop->exec();
mEventLoop->exec( QEventLoop::ExcludeUserInputEvents );
plainText = mData;
return mVerificationResult;
}
@ -86,7 +86,7 @@ std::pair< GpgME::DecryptionResult, GpgME::VerificationResult > KleoJobExecutor:
plainText.clear();
return std::make_pair( DecryptionResult( err ), VerificationResult( err ) );
}
mEventLoop->exec();
mEventLoop->exec( QEventLoop::ExcludeUserInputEvents );
plainText = mData;
return std::make_pair( mDecryptResult, mVerificationResult );
}
@ -97,7 +97,7 @@ GpgME::ImportResult KleoJobExecutor::exec(Kleo::ImportJob* job, const QByteArray
GpgME::Error err = job->start( certData );
if ( err )
return ImportResult( err );
mEventLoop->exec();
mEventLoop->exec( QEventLoop::ExcludeUserInputEvents );
return mImportResult;
}

Loading…
Cancel
Save