summaryrefslogtreecommitdiffstats
path: root/kmail/keyresolver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/keyresolver.cpp')
-rw-r--r--kmail/keyresolver.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/kmail/keyresolver.cpp b/kmail/keyresolver.cpp
index fcd2f279..c0b0cf69 100644
--- a/kmail/keyresolver.cpp
+++ b/kmail/keyresolver.cpp
@@ -335,7 +335,7 @@ static std::vector<GpgME::Key> trustedOrConfirmed( const std::vector<GpgME::Key>
}
namespace {
- struct IsNotForFormat : public std::unary_function<GpgME::Key,bool> {
+ struct IsNotForFormat : public std::function<bool(GpgME::Key)> {
IsNotForFormat( Kleo::CryptoMessageFormat f ) : format( f ) {}
bool operator()( const GpgME::Key & key ) const {
@@ -347,7 +347,7 @@ namespace {
const Kleo::CryptoMessageFormat format;
};
- struct IsForFormat : std::unary_function<GpgME::Key,bool> {
+ struct IsForFormat : std::function<bool(GpgME::Key)> {
explicit IsForFormat( Kleo::CryptoMessageFormat f )
: protocol( isOpenPGP( f ) ? GpgME::Context::OpenPGP :
isSMIME( f ) ? GpgME::Context::CMS :
@@ -364,7 +364,7 @@ namespace {
-class Kleo::KeyResolver::SigningPreferenceCounter : public std::unary_function<Kleo::KeyResolver::Item,void> {
+class Kleo::KeyResolver::SigningPreferenceCounter : public std::function<void(Kleo::KeyResolver::Item)> {
public:
SigningPreferenceCounter()
: mTotal( 0 ),
@@ -409,7 +409,7 @@ void Kleo::KeyResolver::SigningPreferenceCounter::operator()( const Kleo::KeyRes
-class Kleo::KeyResolver::EncryptionPreferenceCounter : public std::unary_function<Item,void> {
+class Kleo::KeyResolver::EncryptionPreferenceCounter : public std::function<void(Item)> {
const Kleo::KeyResolver * _this;
public:
EncryptionPreferenceCounter( const Kleo::KeyResolver * kr, EncryptionPreference defaultPreference )
@@ -476,7 +476,7 @@ void Kleo::KeyResolver::EncryptionPreferenceCounter::operator()( Item & item ) {
namespace {
- class FormatPreferenceCounterBase : public std::unary_function<Kleo::KeyResolver::Item,void> {
+ class FormatPreferenceCounterBase : public std::function<void(Kleo::KeyResolver::Item)> {
public:
FormatPreferenceCounterBase()
: mTotal( 0 ),
@@ -1701,8 +1701,8 @@ std::vector<GpgME::Key> Kleo::KeyResolver::lookup( const TQStringList & patterns
std::vector<GpgME::Key> result;
if ( mCryptoMessageFormats & (InlineOpenPGPFormat|OpenPGPMIMEFormat) )
if ( const Kleo::CryptoBackend::Protocol * p = Kleo::CryptoBackendFactory::instance()->openpgp() ) {
- std::auto_ptr<Kleo::KeyListJob> job( p->keyListJob( false, false, true ) ); // use validating keylisting
- if ( job.get() ) {
+ std::unique_ptr<Kleo::KeyListJob> job( p->keyListJob( false, false, true ) ); // use validating keylisting
+ if ( job ) {
std::vector<GpgME::Key> keys;
job->exec( patterns, secret, keys );
result.insert( result.end(), keys.begin(), keys.end() );
@@ -1710,8 +1710,8 @@ std::vector<GpgME::Key> Kleo::KeyResolver::lookup( const TQStringList & patterns
}
if ( mCryptoMessageFormats & (SMIMEFormat|SMIMEOpaqueFormat) )
if ( const Kleo::CryptoBackend::Protocol * p = Kleo::CryptoBackendFactory::instance()->smime() ) {
- std::auto_ptr<Kleo::KeyListJob> job( p->keyListJob( false, false, true ) ); // use validating keylisting
- if ( job.get() ) {
+ std::unique_ptr<Kleo::KeyListJob> job( p->keyListJob( false, false, true ) ); // use validating keylisting
+ if ( job ) {
std::vector<GpgME::Key> keys;
job->exec( patterns, secret, keys );
result.insert( result.end(), keys.begin(), keys.end() );