Commit cecc3193 authored by Tobias Koenig's avatar Tobias Koenig
Browse files

Use flag constants from Akonadi::MessageFlags namespace

svn path=/trunk/KDE/kdepim/runtime/; revision=1194666
parent 3802e8c4
......@@ -31,6 +31,7 @@
#include <Akonadi/ItemFetchJob>
#include <Akonadi/ItemFetchScope>
#include <Akonadi/ItemModifyJob>
#include <akonadi/kmime/messageflags.h>
#include <akonadi/resourcesynchronizationjob.h>
#include <akonadi/specialcollections.h>
#include <akonadi/specialcollectionsrequestjob.h>
......@@ -208,7 +209,7 @@ void InvitationsAgentItem::fetchItemDone( KJob *job )
Item modifiedItem = fetchJob->items().first();
Q_ASSERT( modifiedItem.isValid() );
modifiedItem.setFlag( "invitation" );
modifiedItem.setFlag( Akonadi::MessageFlags::HasInvitation );
ItemModifyJob *modifyJob = new ItemModifyJob( modifiedItem, this );
connect( modifyJob, SIGNAL( result( KJob* ) ), this, SLOT( modifyItemDone( KJob* ) ) );
modifyJob->start();
......
......@@ -32,6 +32,7 @@
#include <Akonadi/ItemFetchScope>
#include <Akonadi/Monitor>
#include <akonadi/kmime/addressattribute.h>
#include <akonadi/kmime/messageflags.h>
#include <akonadi/kmime/specialmailcollections.h>
#include <akonadi/kmime/specialmailcollectionsrequestjob.h>
......@@ -153,8 +154,8 @@ void OutboxQueue::Private::addIfComplete( const Item &item )
return;
}
if ( !item.hasFlag( "queued" ) ) {
kDebug() << "Item" << item.id() << "has no 'queued' flag.";
if ( !item.hasFlag( Akonadi::MessageFlags::Queued ) ) {
kDebug() << "Item" << item.id() << "has no '$QUEUED' flag.";
return;
}
......
......@@ -22,6 +22,7 @@
#include <Akonadi/Item>
#include <Akonadi/ItemFetchJob>
#include <Akonadi/ItemModifyJob>
#include <akonadi/kmime/messageflags.h>
#include <KDebug>
#include <KLocalizedString>
#include <mailtransport/errorattribute.h>
......@@ -72,11 +73,11 @@ void StoreResultJob::Private::fetchDone( KJob *job )
// Store result in item.
Item item = fetchJob->items().first();
if ( success ) {
item.clearFlag( "queued" );
item.setFlag( "sent" );
item.setFlag( "\\SEEN" );
item.clearFlag( Akonadi::MessageFlags::Queued );
item.setFlag( Akonadi::MessageFlags::Sent );
item.setFlag( Akonadi::MessageFlags::Seen );
} else {
item.setFlag( "error" );
item.setFlag( Akonadi::MessageFlags::HasError );
ErrorAttribute *errorAttribute = new ErrorAttribute( message );
item.addAttribute( errorAttribute );
......
......@@ -35,6 +35,7 @@
#include <Akonadi/Monitor>
#include <akonadi/qtest_akonadi.h>
#include <akonadi/private/collectionpathresolver_p.h>
#include <akonadi/kmime/messageflags.h>
#include <akonadi/kmime/specialmailcollections.h>
#include <akonadi/kmime/specialmailcollectionsrequestjob.h>
......@@ -175,8 +176,8 @@ void AbortTest::testAbort()
// "Fix" the item and send again, this time with the default (Akonadi) transport.
item.removeAttribute<ErrorAttribute>();
item.clearFlag( "error" );
item.setFlag( "queued" );
item.clearFlag( Akonadi::MessageFlags::HasError );
item.setFlag( Akonadi::MessageFlags::Queued );
TransportAttribute *newTA = new TransportAttribute( akoTid );
item.addAttribute( newTA );
ItemModifyJob *cjob = new ItemModifyJob( item );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment