summaryrefslogtreecommitdiffstats
path: root/kmail
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2024-01-23 10:13:00 +0900
committerMichele Calgaro <[email protected]>2024-01-23 10:13:00 +0900
commitd2f343cc239e1fa25c9581cf35bada96692c41db (patch)
tree52a60c0c804e42a990ffb27ca69c54d7467ea814 /kmail
parent3b3f9ec8f31978030c17309fae48335bea5c1587 (diff)
downloadtdepim-d2f343cc239e1fa25c9581cf35bada96692c41db.tar.gz
tdepim-d2f343cc239e1fa25c9581cf35bada96692c41db.zip
Replace auto_ptr
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'kmail')
-rw-r--r--kmail/keyresolver.cpp8
-rw-r--r--kmail/kmcommands.cpp4
-rw-r--r--kmail/kmcomposewin.cpp4
-rw-r--r--kmail/messagecomposer.cpp16
-rw-r--r--kmail/objecttreeparser.cpp10
5 files changed, 21 insertions, 21 deletions
diff --git a/kmail/keyresolver.cpp b/kmail/keyresolver.cpp
index fcd2f2792..68187d2a2 100644
--- a/kmail/keyresolver.cpp
+++ b/kmail/keyresolver.cpp
@@ -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() );
diff --git a/kmail/kmcommands.cpp b/kmail/kmcommands.cpp
index 26e62f7ed..833144a86 100644
--- a/kmail/kmcommands.cpp
+++ b/kmail/kmcommands.cpp
@@ -3239,8 +3239,8 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
if ( !chiasmus )
return;
- const STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> listjob( chiasmus->specialJob( "x-obtain-keys", TQStringVariantMap() ) );
- if ( !listjob.get() ) {
+ const STD_NAMESPACE_PREFIX unique_ptr<Kleo::SpecialJob> listjob( chiasmus->specialJob( "x-obtain-keys", TQStringVariantMap() ) );
+ if ( !listjob ) {
const TQString msg = i18n( "Chiasmus backend does not offer the "
"\"x-obtain-keys\" function. Please report this bug." );
KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
diff --git a/kmail/kmcomposewin.cpp b/kmail/kmcomposewin.cpp
index 794aa67c8..f83ac714f 100644
--- a/kmail/kmcomposewin.cpp
+++ b/kmail/kmcomposewin.cpp
@@ -5310,8 +5310,8 @@ void KMComposeWin::slotEncryptChiasmusToggled( bool on ) {
return;
}
- STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-obtain-keys", TQStringVariantMap() ) );
- if ( !job.get() ) {
+ STD_NAMESPACE_PREFIX unique_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-obtain-keys", TQStringVariantMap() ) );
+ if ( !job ) {
const TQString msg = i18n( "Chiasmus backend does not offer the "
"\"x-obtain-keys\" function. Please report this bug." );
KMessageBox::error( this, msg, i18n( "Chiasmus Backend Error" ) );
diff --git a/kmail/messagecomposer.cpp b/kmail/messagecomposer.cpp
index c98289e0c..1cc0cd33f 100644
--- a/kmail/messagecomposer.cpp
+++ b/kmail/messagecomposer.cpp
@@ -552,8 +552,8 @@ bool MessageComposer::encryptWithChiasmus( const Kleo::CryptoBackend::Protocol *
const TQByteArray& body,
TQByteArray& resultData )
{
- std::auto_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-encrypt", TQStringVariantMap() ) );
- if ( !job.get() ) {
+ std::unique_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-encrypt", TQStringVariantMap() ) );
+ if ( !job ) {
const TQString msg = i18n( "Chiasmus backend does not offer the "
"\"x-encrypt\" function. Please report this bug." );
KMessageBox::error( mComposeWin, msg, i18n( "Chiasmus Backend Error" ) );
@@ -2162,10 +2162,10 @@ void MessageComposer::pgpSignedMsg( const TQByteArray& cText, Kleo::CryptoMessag
= isSMIME( format ) ? cpf->smime() : cpf->openpgp() ;
assert( proto ); /// hmmm.....?
- std::auto_ptr<Kleo::SignJob> job( proto->signJob( armor( format ),
+ std::unique_ptr<Kleo::SignJob> job( proto->signJob( armor( format ),
textMode( format ) ) );
- if ( !job.get() ) {
+ if ( !job ) {
KMessageBox::sorry( mComposeWin,
i18n("This message could not be signed, "
"since the chosen backend does not seem to support "
@@ -2218,9 +2218,9 @@ Kpgp::Result MessageComposer::pgpEncryptedMsg( TQByteArray & encryptedBody,
= isSMIME( format ) ? cpf->smime() : cpf->openpgp() ;
assert( proto ); // hmmmm....?
- std::auto_ptr<Kleo::EncryptJob> job( proto->encryptJob( armor( format ),
+ std::unique_ptr<Kleo::EncryptJob> job( proto->encryptJob( armor( format ),
textMode( format ) ) );
- if ( !job.get() ) {
+ if ( !job ) {
KMessageBox::sorry( mComposeWin,
i18n("This message could not be encrypted, "
"since the chosen backend does not seem to support "
@@ -2266,9 +2266,9 @@ Kpgp::Result MessageComposer::pgpSignedAndEncryptedMsg( TQByteArray & encryptedB
= isSMIME( format ) ? cpf->smime() : cpf->openpgp() ;
assert( proto ); // hmmmm....?
- std::auto_ptr<Kleo::SignEncryptJob> job( proto->signEncryptJob( armor( format ),
+ std::unique_ptr<Kleo::SignEncryptJob> job( proto->signEncryptJob( armor( format ),
textMode( format ) ) );
- if ( !job.get() ) {
+ if ( !job ) {
KMessageBox::sorry( mComposeWin,
i18n("This message could not be signed and encrypted, "
"since the chosen backend does not seem to support "
diff --git a/kmail/objecttreeparser.cpp b/kmail/objecttreeparser.cpp
index 39b7ac001..3d0593cc3 100644
--- a/kmail/objecttreeparser.cpp
+++ b/kmail/objecttreeparser.cpp
@@ -1652,7 +1652,7 @@ namespace KMail {
const TQByteArray certData = node->msgPart().bodyDecodedBinary();
- const STD_NAMESPACE_PREFIX auto_ptr<Kleo::ImportJob> import( smimeCrypto->importJob() );
+ const STD_NAMESPACE_PREFIX unique_ptr<Kleo::ImportJob> import( smimeCrypto->importJob() );
const GpgME::ImportResult res = import->exec( certData );
if ( res.error() ) {
htmlWriter()->queue( i18n( "Sorry, certificate could not be imported.<br>"
@@ -1853,8 +1853,8 @@ bool ObjectTreeParser::decryptChiasmus( const TQByteArray& data, TQByteArray& bo
if ( !chiasmus )
return false;
- const STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> listjob( chiasmus->specialJob( "x-obtain-keys", TQStringVariantMap() ) );
- if ( !listjob.get() ) {
+ const STD_NAMESPACE_PREFIX unique_ptr<Kleo::SpecialJob> listjob( chiasmus->specialJob( "x-obtain-keys", TQStringVariantMap() ) );
+ if ( !listjob ) {
errorText = i18n( "Chiasmus backend does not offer the "
"\"x-obtain-keys\" function. Please report this bug." );
return false;
@@ -1892,8 +1892,8 @@ bool ObjectTreeParser::decryptChiasmus( const TQByteArray& data, TQByteArray& bo
GlobalSettings::setChiasmusDecryptionKey( selectorDlg.key() );
assert( !GlobalSettings::chiasmusDecryptionKey().isEmpty() );
- const STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-decrypt", TQStringVariantMap() ) );
- if ( !job.get() ) {
+ const STD_NAMESPACE_PREFIX unique_ptr<Kleo::SpecialJob> job( chiasmus->specialJob( "x-decrypt", TQStringVariantMap() ) );
+ if ( !job ) {
errorText = i18n( "Chiasmus backend does not offer the "
"\"x-decrypt\" function. Please report this bug." );
return false;