Git commit 8b4f0931454d9ebba19dc7a2e025a34e3412b039 by Christian Mollekopf. Committed on 22/02/2012 at 16:09. Pushed by cmollekopf into branch 'KDE/4.8'. fix ItemFetchScope so collections get indexed (cherry picked from commit 544162347435cb0c63e2c66fe3b6f611c751cf9d) M +2 -7 agents/nepomukfeeder/feederqueue.cpp M +0 -4 agents/nepomukfeeder/feederqueue.h M +0 -1 agents/nepomukfeeder/nepomukfeederagent.cpp http://commits.kde.org/kdepim-runtime/8b4f0931454d9ebba19dc7a2e025a34e3412b= 039 diff --git a/agents/nepomukfeeder/feederqueue.cpp b/agents/nepomukfeeder/fe= ederqueue.cpp index 346ba81..baf3352 100644 --- a/agents/nepomukfeeder/feederqueue.cpp +++ b/agents/nepomukfeeder/feederqueue.cpp @@ -27,6 +27,7 @@ #include = #include +#include = #include #include @@ -274,13 +275,6 @@ const Akonadi::Collection& FeederQueue::currentCollect= ion() return mCurrentCollection; } = -void FeederQueue::setItemFetchScope(ItemFetchScope scope) -{ - mItemFetchScope =3D scope; -} - - - ItemQueue::ItemQueue(int batchSize, int fetchSize, QObject* parent) : QObject(parent), mPendingRemoveDataJobs( 0 ), @@ -338,6 +332,7 @@ bool ItemQueue::processItem() //kDebug() << QString("Fetching %1 items").arg(mItemFetchList.size()); Akonadi::ItemFetchJob *job =3D new Akonadi::ItemFetchJob( mItemFetchLi= st, 0 ); job->fetchScope().fetchFullPayload(); + job->fetchScope().setAncestorRetrieval( ItemFetchScope::Parent ); job->fetchScope().setCacheOnly( true ); job->setProperty("numberOfItems", mItemFetchList.size()); connect( job, SIGNAL(result(KJob*)), SLOT(fetchJobResult(KJob*)) ); diff --git a/agents/nepomukfeeder/feederqueue.h b/agents/nepomukfeeder/feed= erqueue.h index 5cfc3ec..3f5da76 100644 --- a/agents/nepomukfeeder/feederqueue.h +++ b/agents/nepomukfeeder/feederqueue.h @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -114,8 +113,6 @@ public: explicit FeederQueue( QObject* parent =3D 0 ); virtual ~FeederQueue(); = - void setItemFetchScope( Akonadi::ItemFetchScope scope); - ///add the collection to the queue, all items of it will be fetched and = indexed void addCollection(const Akonadi::Collection &); ///adds the item to the highPrioQueue @@ -174,7 +171,6 @@ private: = Akonadi::Collection::List mCollectionQueue; Akonadi::Collection mCurrentCollection; - Akonadi::ItemFetchScope mItemFetchScope; bool mReIndex; bool mOnline; QTimer mProcessItemQueueTimer; diff --git a/agents/nepomukfeeder/nepomukfeederagent.cpp b/agents/nepomukfe= eder/nepomukfeederagent.cpp index 0808ee3..4739ccb 100644 --- a/agents/nepomukfeeder/nepomukfeederagent.cpp +++ b/agents/nepomukfeeder/nepomukfeederagent.cpp @@ -112,7 +112,6 @@ NepomukFeederAgent::NepomukFeederAgent(const QString& i= d) : checkOnline(); QTimer::singleShot( 0, this, SLOT(selfTest()) ); = - mQueue.setItemFetchScope(changeRecorder()->itemFetchScope()); mQueue.setIndexingSpeed( mIdleDetectionDisabled ? FeederQueue::FullSpeed= : FeederQueue::ReducedSpeed ); = connect(&mQueue, SIGNAL(progress(int)), SIGNAL(percent(int)));