~ubuntu-branches/ubuntu/quantal/kdepimlibs/quantal-proposed

« back to all changes in this revision

Viewing changes to akonadi/itemmodel.cpp

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-14 14:37:07 UTC
  • mto: This revision was merged to the branch mainline in revision 112.
  • Revision ID: package-import@ubuntu.com-20111214143707-m0qplh3hsd957ukv
Tags: upstream-4.7.90
ImportĀ upstreamĀ versionĀ 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
 
71
71
      monitor->ignoreSession( session );
72
72
 
73
 
      mParent->connect( monitor, SIGNAL( itemChanged( const Akonadi::Item&, const QSet<QByteArray>& ) ),
74
 
                        mParent, SLOT( itemChanged( const Akonadi::Item&, const QSet<QByteArray>& ) ) );
75
 
      mParent->connect( monitor, SIGNAL( itemMoved( const Akonadi::Item&, const Akonadi::Collection&, const Akonadi::Collection& ) ),
76
 
                        mParent, SLOT( itemMoved( const Akonadi::Item&, const Akonadi::Collection&, const Akonadi::Collection& ) ) );
77
 
      mParent->connect( monitor, SIGNAL( itemAdded( const Akonadi::Item&, const Akonadi::Collection& ) ),
78
 
                        mParent, SLOT( itemAdded( const Akonadi::Item& ) ) );
79
 
      mParent->connect( monitor, SIGNAL( itemRemoved( const Akonadi::Item& ) ),
80
 
                        mParent, SLOT( itemRemoved( const Akonadi::Item& ) ) );
81
 
      mParent->connect( monitor, SIGNAL( itemLinked( const Akonadi::Item&, const Akonadi::Collection& ) ),
82
 
                        mParent, SLOT( itemAdded( const Akonadi::Item& ) ) );
83
 
      mParent->connect( monitor, SIGNAL( itemUnlinked( const Akonadi::Item&, const Akonadi::Collection& ) ),
84
 
                        mParent, SLOT( itemRemoved( const Akonadi::Item& ) ) );
 
73
      mParent->connect( monitor, SIGNAL(itemChanged(Akonadi::Item,QSet<QByteArray>)),
 
74
                        mParent, SLOT(itemChanged(Akonadi::Item,QSet<QByteArray>)) );
 
75
      mParent->connect( monitor, SIGNAL(itemMoved(Akonadi::Item,Akonadi::Collection,Akonadi::Collection)),
 
76
                        mParent, SLOT(itemMoved(Akonadi::Item,Akonadi::Collection,Akonadi::Collection)) );
 
77
      mParent->connect( monitor, SIGNAL(itemAdded(Akonadi::Item,Akonadi::Collection)),
 
78
                        mParent, SLOT(itemAdded(Akonadi::Item)) );
 
79
      mParent->connect( monitor, SIGNAL(itemRemoved(Akonadi::Item)),
 
80
                        mParent, SLOT(itemRemoved(Akonadi::Item)) );
 
81
      mParent->connect( monitor, SIGNAL(itemLinked(Akonadi::Item,Akonadi::Collection)),
 
82
                        mParent, SLOT(itemAdded(Akonadi::Item)) );
 
83
      mParent->connect( monitor, SIGNAL(itemUnlinked(Akonadi::Item,Akonadi::Collection)),
 
84
                        mParent, SLOT(itemRemoved(Akonadi::Item)) );
85
85
    }
86
86
 
87
87
    ~Private()
168
168
    return container->row;
169
169
  else { // Slow solution if the fist one has not succeeded
170
170
    int row = -1;
171
 
    for ( int i = 0; i < items.size(); ++i ) {
 
171
    const int numberOfItems( items.size() );
 
172
    for ( int i = 0; i < numberOfItems; ++i ) {
172
173
      if ( items.at( i )->item == item ) {
173
174
        row = i;
174
175
        break;
335
336
  if ( collection.isValid() && collection.contentMimeTypes().isEmpty() )
336
337
  {
337
338
    CollectionFetchJob* job = new CollectionFetchJob( collection, CollectionFetchJob::Base, this );
338
 
    connect( job, SIGNAL( result( KJob* ) ), this, SLOT( collectionFetchResult( KJob* ) ) );
 
339
    connect( job, SIGNAL(result(KJob*)), this, SLOT(collectionFetchResult(KJob*)) );
339
340
    return;
340
341
  }
341
342
 
357
358
  if ( d->collectionIsCompatible() ) {
358
359
    ItemFetchJob* job = new ItemFetchJob( collection, session() );
359
360
    job->setFetchScope( d->monitor->itemFetchScope() );
360
 
    connect( job, SIGNAL( itemsReceived( const Akonadi::Item::List& ) ),
361
 
             SLOT( itemsAdded( const Akonadi::Item::List& ) ) );
362
 
    connect( job, SIGNAL( result( KJob* ) ), SLOT( listingDone( KJob* ) ) );
 
361
    connect( job, SIGNAL(itemsReceived(Akonadi::Item::List)),
 
362
             SLOT(itemsAdded(Akonadi::Item::List)) );
 
363
    connect( job, SIGNAL(result(KJob*)), SLOT(listingDone(KJob*)) );
363
364
  }
364
365
 
365
366
  emit collectionChanged( collection );