[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdepim/messagelist
From: Tobias Koenig <tokoe () kde ! org>
Date: 2010-11-16 10:27:51
Message-ID: 20101116102751.1F45DAC8A0 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1197635 by tokoe:
Get information about signing/encryption from the
item flags.
M +4 -25 storagemodel.cpp
--- trunk/KDE/kdepim/messagelist/storagemodel.cpp #1197634:1197635
@@ -315,38 +315,16 @@
Akonadi::MessageStatus stat;
stat.setStatusFromFlags( item.flags() );
- // FIXME: Attachment and invitation state should be stored on the server as well!
- if ( MessageCore::NodeHelper::isInvitation( mail.get() ) ) {
- stat.setHasInvitation( true );
- }
-
mi->setAkonadiItem( item );
mi->setStatus( stat );
mi->setEncryptionState( Core::MessageItem::EncryptionStateUnknown );
- const KMime::Headers::ContentType * const contentType = mail->contentType();
- if ( contentType->isSubtype( "encrypted" )
- || contentType->isSubtype( "pgp-encrypted" )
- || contentType->isSubtype( "pkcs7-mime" ) ) {
+ if ( stat.isEncrypted() )
mi->setEncryptionState( Core::MessageItem::FullyEncrypted );
- } else if ( mail->mainBodyPart( "multipart/encrypted" )
- || mail->mainBodyPart( "application/pgp-encrypted" )
- || mail->mainBodyPart( "application/pkcs7-mime" ) ) {
- mi->setEncryptionState( Core::MessageItem::PartiallyEncrypted );
- }
mi->setSignatureState( Core::MessageItem::SignatureStateUnknown );
- if ( contentType->isSubtype( "signed" )
- || contentType->isSubtype( "pgp-signature" )
- || contentType->isSubtype( "pkcs7-signature" )
- || contentType->isSubtype( "x-pkcs7-signature" ) ) {
+ if ( stat.isSigned() )
mi->setSignatureState( Core::MessageItem::FullySigned );
- } else if ( mail->mainBodyPart( "multipart/signed" )
- || mail->mainBodyPart( "application/pgp-signature" )
- || mail->mainBodyPart( "application/pkcs7-signature" )
- || mail->mainBodyPart( "application/x-pkcs7-signature" ) ) {
- mi->setSignatureState( Core::MessageItem::PartiallySigned );
- }
mi->invalidateTagCache();
mi->invalidateAnnotationCache();
@@ -358,7 +336,8 @@
Q_UNUSED( mi );
Item item = itemForRow( row );
item.setFlags( status.statusFlags() );
- new ItemModifyJob( item, this );
+ ItemModifyJob *job = new ItemModifyJob( item, this );
+ job->setIgnorePayload( true );
}
QVariant StorageModel::data( const QModelIndex &index, int role ) const
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic