[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/akonadi-ports
From: Volker Krause <vkrause () kde ! org>
Date: 2009-09-08 9:00:30
Message-ID: 1252400430.316071.12742.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1021125 by vkrause:
Remove ItemFetchJob::collection() in favor of Item::parentCollection().
M +10 -10 kdepim/korganizer/akonadicalendar_p.h
M +1 -0 kdepimlibs/akonadi/item.h
M +1 -0 kdepimlibs/akonadi/itemcreatejob.cpp
M +0 -7 kdepimlibs/akonadi/itemfetchjob.cpp
M +0 -6 kdepimlibs/akonadi/itemfetchjob.h
--- branches/work/akonadi-ports/kdepim/korganizer/akonadicalendar_p.h \
#1021124:1021125 @@ -108,6 +108,7 @@
, m_incidenceBeingChanged()
{
m_monitor->itemFetchScope().fetchFullPayload();
+ m_monitor->itemFetchScope().setAncestorRetrieval( \
Akonadi::ItemFetchScope::Parent ); m_monitor->ignoreSession( m_session );
connect( m_monitor, SIGNAL(itemChanged( const Akonadi::Item&, const \
QSet<QByteArray>& )), @@ -115,7 +116,7 @@
connect( m_monitor, SIGNAL(itemMoved( const Akonadi::Item&, const \
Akonadi::Collection&, const Akonadi::Collection& )),
this, SLOT(itemMoved( const Akonadi::Item&, const \
Akonadi::Collection&, const Akonadi::Collection& ) ) );
connect( m_monitor, SIGNAL(itemAdded( const Akonadi::Item&, const \
Akonadi::Collection& )),
- this, SLOT(itemAdded( const Akonadi::Item&, const \
Akonadi::Collection& )) ); + this, SLOT(itemAdded( const Akonadi::Item& \
)) ); connect( m_monitor, SIGNAL(itemRemoved( const Akonadi::Item& )),
this, SLOT(itemRemoved( const Akonadi::Item& )) );
/*
@@ -237,7 +238,7 @@
emit q->signalErrorMessage( job->errorString() );
return;
}
- itemsAdded( fetchjob->items(), fetchjob->collection() );
+ itemsAdded( fetchjob->items() );
}
void agentCreated( KJob *job )
@@ -274,7 +275,7 @@
Akonadi::ItemCreateJob *createjob = static_cast<Akonadi::ItemCreateJob*>( \
job );
if ( m_collectionMap.contains( createjob->item().parentCollection().id() ) ) \
{ // yes, adding to an un-viewed collection happens
- itemAdded( createjob->item(), createjob->item().parentCollection() );
+ itemAdded( createjob->item() );
} else {
// FIXME show dialog indicating that the creation worked, but the \
incidence will // not show, since the collection isn't
@@ -345,17 +346,16 @@
if( m_collectionMap.contains(colSrc.id()) && ! \
m_collectionMap.contains(colDst.id()) ) itemRemoved( item );
else if( m_collectionMap.contains(colDst.id()) && ! \
m_collectionMap.contains(colSrc.id()) )
- itemAdded( item, colDst );
+ itemAdded( item );
}
- void itemsAdded( const Akonadi::Item::List &items, const Akonadi::Collection \
&collection ) + void itemsAdded( const Akonadi::Item::List &items )
{
kDebug();
assertInvariants();
- Q_ASSERT( collection.isValid() );
- if ( !m_collectionMap.contains( collection.id() ) ) // collection got \
deselected again in the meantime
- return;
foreach( const Akonadi::Item &item, items ) {
+ if ( !m_collectionMap.contains( item.parentCollection().id() ) ) // \
collection got deselected again in the meantime + continue;
Q_ASSERT( item.isValid() );
if ( !item.hasPayload<KCal::Incidence::Ptr>() )
continue;
@@ -388,12 +388,12 @@
assertInvariants();
}
- void itemAdded( const Akonadi::Item &item, const Akonadi::Collection &collection \
) + void itemAdded( const Akonadi::Item &item )
{
kDebug();
Q_ASSERT( item.isValid() );
if( ! m_itemMap.contains( item.id() ) ) {
- itemsAdded( Akonadi::Item::List() << item, collection );
+ itemsAdded( Akonadi::Item::List() << item );
}
}
--- branches/work/akonadi-ports/kdepimlibs/akonadi/item.h #1021124:1021125
@@ -341,6 +341,7 @@
private:
//@cond PRIVATE
+ friend class ItemCreateJob;
friend class ItemModifyJob;
friend class ProtocolHelper;
PayloadBase* payloadBase() const;
--- branches/work/akonadi-ports/kdepimlibs/akonadi/itemcreatejob.cpp #1021124:1021125
@@ -162,6 +162,7 @@
item.setRevision( 0 );
item.setModificationTime( d->mDatetime );
item.setParentCollection( d->mCollection );
+ item.setStorageCollectionId( d->mCollection.id() );
return item;
}
--- branches/work/akonadi-ports/kdepimlibs/akonadi/itemfetchjob.cpp #1021124:1021125
@@ -194,13 +194,6 @@
return d->mFetchScope;
}
-Collection ItemFetchJob::collection() const
-{
- Q_D( const ItemFetchJob );
-
- return d->mCollection;
-}
-
void ItemFetchJob::setCollection(const Akonadi::Collection& collection)
{
Q_D( ItemFetchJob );
--- branches/work/akonadi-ports/kdepimlibs/akonadi/itemfetchjob.h #1021124:1021125
@@ -136,12 +136,6 @@
ItemFetchScope &fetchScope();
/**
- * Returns the collection passed in on in the constructor or set with the
- * setCollection method.
- */
- Collection collection() const;
-
- /**
* Specifies the collection the item is in.
* This is only required when retrieving an item based on its remote id which \
might not be
* unique globally.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic