Hello community, here is the log from the commit of package kdepimlibs4 for openSUSE:Factory checked in at 2014-04-18 11:35:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kdepimlibs4 (Old) and /work/SRC/openSUSE:Factory/.kdepimlibs4.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kdepimlibs4" Changes: -------- --- /work/SRC/openSUSE:Factory/kdepimlibs4/kdepimlibs4.changes 2014-03-30 08:17:34.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.kdepimlibs4.new/kdepimlibs4.changes 2014-04-18 12:37:41.000000000 +0200 @@ -1,0 +2,7 @@ +Fri Apr 11 16:43:37 UTC 2014 - [email protected] + +- Update to 4.13.0 + * KDE 4.13 release + * See http://www.kde.org/announcements/4.13/ + +------------------------------------------------------------------- Old: ---- kdepimlibs-4.12.97.tar.xz New: ---- kdepimlibs-4.13.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdepimlibs4.spec ++++++ --- /var/tmp/diff_new_pack.j5amgi/_old 2014-04-18 12:37:42.000000000 +0200 +++ /var/tmp/diff_new_pack.j5amgi/_new 2014-04-18 12:37:42.000000000 +0200 @@ -17,7 +17,7 @@ Name: kdepimlibs4 -Version: 4.12.97 +Version: 4.13.0 Release: 0 Summary: KDE PIM Libraries License: LGPL-2.1+ ++++++ kdepimlibs-4.12.97.tar.xz -> kdepimlibs-4.13.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/CMakeLists.txt new/kdepimlibs-4.13.0/CMakeLists.txt --- old/kdepimlibs-4.12.97/CMakeLists.txt 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/CMakeLists.txt 2014-04-09 12:18:48.000000000 +0200 @@ -6,8 +6,8 @@ ############### The kdepimlibs version (used e.g. in KdepimLibsConfig.cmake) ############### set(KDEPIMLIBS_VERSION_MAJOR 4) -set(KDEPIMLIBS_VERSION_MINOR 12) -set(KDEPIMLIBS_VERSION_PATCH 97) +set(KDEPIMLIBS_VERSION_MINOR 13) +set(KDEPIMLIBS_VERSION_PATCH 0) set(KDEPIMLIBS_VERSION ${KDEPIMLIBS_VERSION_MAJOR}.${KDEPIMLIBS_VERSION_MINOR}.${KDEPIMLIBS_VERSION_PATCH}) @@ -79,7 +79,7 @@ if (NOT KDEPIM_ONLY_KLEO) #FindAkonadi.cmake is only there for compatibility reasons, but we don't want to use that. - set(Akonadi_MIN_VERSION "1.11.80") + set(Akonadi_MIN_VERSION "1.12.1") find_package(Akonadi ${Akonadi_MIN_VERSION} QUIET NO_MODULE) set_package_properties(Akonadi PROPERTIES DESCRIPTION "Akonadi server libraries" URL "http://pim.kde.org/akonadi" TYPE REQUIRED PURPOSE "Access to PIM storage and services") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/collectionfetchjob.cpp new/kdepimlibs-4.13.0/akonadi/collectionfetchjob.cpp --- old/kdepimlibs-4.12.97/akonadi/collectionfetchjob.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/collectionfetchjob.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -51,7 +51,6 @@ mEmitTimer->setSingleShot( true ); mEmitTimer->setInterval( 100 ); q_ptr->connect( mEmitTimer, SIGNAL(timeout()), q_ptr, SLOT(timeout()) ); - q_ptr->connect( q_ptr, SIGNAL(result(KJob*)), q_ptr, SLOT(timeout()) ); } Q_DECLARE_PUBLIC( CollectionFetchJob ) @@ -66,6 +65,11 @@ bool mBasePrefetch; Collection::List mPrefetchList; + void aboutToFinish() + { + timeout(); + } + void timeout() { Q_Q( CollectionFetchJob ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/collectionrequester.cpp new/kdepimlibs-4.13.0/akonadi/collectionrequester.cpp --- old/kdepimlibs-4.12.97/akonadi/collectionrequester.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/collectionrequester.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -49,12 +49,14 @@ { } - QString fetchCollection(const Collection &collection); + void fetchCollection(const Collection &collection); void init(); // slots void _k_slotOpenDialog(); + void _k_collectionReceived( KJob *job ); + void _k_collectionsNamesReceived( KJob *job ); CollectionRequester *q; Collection collection; @@ -63,25 +65,53 @@ CollectionDialog *collectionDialog; }; -QString CollectionRequester::Private::fetchCollection(const Collection &collection) +void CollectionRequester::Private::fetchCollection(const Collection &collection) { - QString result; - Akonadi::CollectionFetchJob *job = new Akonadi::CollectionFetchJob( collection, Akonadi::CollectionFetchJob::Base, q ); - job->fetchScope().setAncestorRetrieval( Akonadi::CollectionFetchScope::Parent ); - if (job->exec()) { - if (job->collections().size() == 1) { - Akonadi::Collection col = job->collections().at(0); - if (col != Akonadi::Collection::root()) { - const QString tmp = fetchCollection(Akonadi::Collection(col.parent())); - if (tmp.isEmpty()) { - result = col.displayName(); - } else { - result = fetchCollection(Akonadi::Collection(col.parent())) + QLatin1Char('/') + col.displayName(); - } - } - } + Akonadi::CollectionFetchJob *job = new Akonadi::CollectionFetchJob( collection, Akonadi::CollectionFetchJob::Base, q ); + job->setProperty( "OriginalCollectionId", collection.id() ); + job->fetchScope().setAncestorRetrieval( CollectionFetchScope::All ); + connect( job, SIGNAL(finished(KJob*)), + q, SLOT(_k_collectionReceived(KJob*)) ); +} + +void CollectionRequester::Private::_k_collectionReceived( KJob *job ) +{ + CollectionFetchJob *fetch = qobject_cast<CollectionFetchJob*>( job ); + Collection::List chain; + if ( fetch->collections().size() == 1 ) { + Collection currentCollection = fetch->collections().first(); + while ( currentCollection.isValid() ) { + chain << currentCollection; + currentCollection = Collection( currentCollection.parentCollection() ); } - return result; + + CollectionFetchJob *namesFetch = new CollectionFetchJob( chain, CollectionFetchJob::Base, q ); + namesFetch->setProperty( "OriginalCollectionId", job->property( "OriginalCollectionId" ) ); + namesFetch->fetchScope().setAncestorRetrieval( CollectionFetchScope::Parent ); + connect( namesFetch, SIGNAL(finished(KJob*)), + q, SLOT(_k_collectionsNamesReceived(KJob *)) ); + } else { + _k_collectionsNamesReceived( job ); + } +} + +void CollectionRequester::Private::_k_collectionsNamesReceived( KJob *job ) +{ + CollectionFetchJob *fetch = qobject_cast<CollectionFetchJob*>( job ); + const qint64 originalId = fetch->property( "OriginalCollectionId" ).toLongLong(); + + QMap<qint64, Collection> names; + Q_FOREACH ( const Collection &collection, fetch->collections() ) { + names.insert( collection.id(), collection ); + } + + QStringList namesList; + Collection currentCollection = names.take( originalId ); + while ( currentCollection.isValid() ) { + namesList.prepend( currentCollection.displayName() ); + currentCollection = names.take( currentCollection.parent() ); + } + edit->setText( namesList.join( QLatin1String( "/" ) ) ); } void CollectionRequester::Private::init() @@ -167,8 +197,8 @@ d->edit->setText( name ); emit collectionChanged( collection ); - const QString result = d->fetchCollection(collection); - d->edit->setText( result ); + d->edit->setText( collection.displayName() ); + d->fetchCollection( collection ); } void CollectionRequester::setMimeTypeFilter( const QStringList &mimeTypes ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/collectionrequester.h new/kdepimlibs-4.13.0/akonadi/collectionrequester.h --- old/kdepimlibs-4.12.97/akonadi/collectionrequester.h 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/collectionrequester.h 2014-04-09 12:18:48.000000000 +0200 @@ -136,6 +136,8 @@ Private * const d; Q_PRIVATE_SLOT( d, void _k_slotOpenDialog() ) + Q_PRIVATE_SLOT( d, void _k_collectionReceived( KJob *job ) ) + Q_PRIVATE_SLOT( d, void _k_collectionsNamesReceived( KJob *job ) ); }; } // namespace Akonadi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/collectionsync.cpp new/kdepimlibs-4.13.0/akonadi/collectionsync.cpp --- old/kdepimlibs-4.12.97/akonadi/collectionsync.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/collectionsync.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -643,7 +643,7 @@ void execute() { kDebug() << Q_FUNC_INFO << "localListDone: " << localListDone << " deliveryDone: " << deliveryDone; - if ( !localListDone ) { + if ( !localListDone || !deliveryDone ) { return; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/entityannotationsattribute.h new/kdepimlibs-4.13.0/akonadi/entityannotationsattribute.h --- old/kdepimlibs-4.12.97/akonadi/entityannotationsattribute.h 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/entityannotationsattribute.h 2014-04-09 12:18:48.000000000 +0200 @@ -34,7 +34,7 @@ * The attribute is inspired by RFC5257(IMAP ANNOTATION) and RFC5464(IMAP METADATA), but serves * the purpose of RFC5257. * - * For a private note annoation the entry name is: + * For a private note annotation the entry name is: * /private/comment * for a shared note: * /shared/comment diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/entitytreemodel_p.cpp new/kdepimlibs-4.13.0/akonadi/entitytreemodel_p.cpp --- old/kdepimlibs-4.12.97/akonadi/entitytreemodel_p.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/entitytreemodel_p.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -182,7 +182,6 @@ itemJob->setFetchScope( scope ); itemJob->fetchScope().setAncestorRetrieval( ItemFetchScope::All ); itemJob->fetchScope().setIgnoreRetrievalErrors( true ); - itemJob->setDeliveryOption( ItemFetchJob::EmitItemsInBatches ); return itemJob; } @@ -1137,7 +1136,10 @@ return; } - m_items[ item.id() ].apply( item ); + //otherwise this overwrites the copy of the real collection with one of the virtual collectoin + if (!item.parentCollection().isVirtual()) { + m_items[ item.id() ].apply( item ); + } const QModelIndexList indexes = indexesForItem( item ); foreach ( const QModelIndex &index, indexes ) { @@ -1698,6 +1700,9 @@ end = childEntities.end(); } m_populatedCols.remove(id); + //if an empty collection is purged and we leave it in here, itemAdded will be ignored for the collection + //and the collection is never populated by fetchMore (but maybe by statistics changed?) + m_collectionsWithoutItems.remove(id); } void EntityTreeModelPrivate::dataChanged( const QModelIndex &top, const QModelIndex &bottom ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/itemfetchjob.cpp new/kdepimlibs-4.13.0/akonadi/itemfetchjob.cpp --- old/kdepimlibs-4.12.97/akonadi/itemfetchjob.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/itemfetchjob.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -61,14 +61,18 @@ mEmitTimer->setSingleShot( true ); mEmitTimer->setInterval( 100 ); q->connect( mEmitTimer, SIGNAL(timeout()), q, SLOT(timeout()) ); - q->connect( q, SIGNAL(result(KJob*)), q, SLOT(timeout()) ); + } + + void aboutToFinish() + { + timeout(); } void timeout() { Q_Q( ItemFetchJob ); - mEmitTimer->stop(); // in case we are called by result() + mEmitTimer->stop(); // in case we are called by aboutToFinish() if ( !mPendingItems.isEmpty() ) { if ( !q->error() ) emit q->itemsReceived( mPendingItems ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/itemfetchscope.cpp new/kdepimlibs-4.13.0/akonadi/itemfetchscope.cpp --- old/kdepimlibs-4.12.97/akonadi/itemfetchscope.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/itemfetchscope.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -95,7 +95,7 @@ bool ItemFetchScope::isEmpty() const { - return d->mPayloadParts.isEmpty() && d->mAttributes.isEmpty() && !d->mFullPayload && !d->mAllAttributes; + return d->mPayloadParts.isEmpty() && d->mAttributes.isEmpty() && !d->mFullPayload && !d->mAllAttributes && !d->mFetchTags; } bool ItemFetchScope::cacheOnly() const diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/itemsearchjob.cpp new/kdepimlibs-4.13.0/akonadi/itemsearchjob.cpp --- old/kdepimlibs-4.12.97/akonadi/itemsearchjob.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/itemsearchjob.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -34,7 +34,7 @@ { public: ItemSearchJobPrivate( ItemSearchJob *parent, const SearchQuery &query ) - : JobPrivate( parent ), mQuery( query ), mRecursive( false ), mRemote( true ), mEmitTimer( 0 ) + : JobPrivate( parent ), mQuery( query ), mRecursive( false ), mRemote( false ), mEmitTimer( 0 ) { } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/itemsearchjob.h new/kdepimlibs-4.13.0/akonadi/itemsearchjob.h --- old/kdepimlibs-4.12.97/akonadi/itemsearchjob.h 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/itemsearchjob.h 2014-04-09 12:18:48.000000000 +0200 @@ -223,7 +223,7 @@ * be searched. With remote search, even those emails can be included in search * results. * - * This feature is enabled by default. + * This feature is disabled by default. * * Results are streamed back to client as they are received from queried sources, * so this job can take some time to finish, but will deliver initial results diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/itemsync.cpp new/kdepimlibs-4.13.0/akonadi/itemsync.cpp --- old/kdepimlibs-4.12.97/akonadi/itemsync.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/itemsync.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -20,6 +20,7 @@ #include "itemsync.h" +#include "job_p.h" #include "collection.h" #include "item.h" #include "item_p.h" @@ -39,12 +40,12 @@ /** * @internal */ -class ItemSync::Private +class Akonadi::ItemSyncPrivate : public JobPrivate { public: - Private( ItemSync *parent ) : - q( parent ), - mTransactionMode( SingleTransaction ), + ItemSyncPrivate( ItemSync *parent ) : + JobPrivate( parent ), + mTransactionMode( ItemSync::SingleTransaction ), mCurrentTransaction( 0 ), mTransactionJobs( 0 ), mPendingJobs( 0 ), @@ -72,8 +73,9 @@ void deleteItems( const Item::List &items ); void slotTransactionResult( KJob *job ); Job* subjobParent() const; + QString jobDebuggingString() const /*Q_DECL_OVERRIDE*/; - ItemSync *q; + Q_DECLARE_PUBLIC( ItemSync ) Collection mSyncCollection; QHash<Item::Id, Akonadi::Item> mLocalItemsById; QHash<QString, Akonadi::Item> mLocalItemsByRemoteId; @@ -105,8 +107,9 @@ bool mFinished; }; -void ItemSync::Private::createLocalItem( const Item & item ) +void ItemSyncPrivate::createLocalItem( const Item & item ) { + Q_Q( ItemSync ); // don't try to do anything in error state if ( q->error() ) return; @@ -115,8 +118,9 @@ q->connect( create, SIGNAL(result(KJob*)), q, SLOT(slotLocalChangeDone(KJob*)) ); } -void ItemSync::Private::checkDone() +void ItemSyncPrivate::checkDone() { + Q_Q( ItemSync ); q->setProcessedAmount( KJob::Bytes, mProgress ); if ( mPendingJobs > 0 || !mDeliveryDone || mTransactionJobs > 0 ) return; @@ -128,19 +132,19 @@ } ItemSync::ItemSync( const Collection &collection, QObject *parent ) : - Job( parent ), - d( new Private( this ) ) + Job( new ItemSyncPrivate( this ), parent ) { + Q_D( ItemSync ); d->mSyncCollection = collection; } ItemSync::~ItemSync() { - delete d; } void ItemSync::setFullSyncItems( const Item::List &items ) { + Q_D( ItemSync ); Q_ASSERT( !d->mIncremental ); if ( !d->mStreaming ) d->mDeliveryDone = true; @@ -155,6 +159,7 @@ void ItemSync::setTotalItems( int amount ) { + Q_D( ItemSync ); Q_ASSERT( !d->mIncremental ); Q_ASSERT( amount >= 0 ); setStreamingEnabled( true ); @@ -169,6 +174,7 @@ void ItemSync::setIncrementalSyncItems( const Item::List &changedItems, const Item::List &removedItems ) { + Q_D( ItemSync ); d->mIncremental = true; if ( !d->mStreaming ) d->mDeliveryDone = true; @@ -183,16 +189,19 @@ void ItemSync::setFetchScope( ItemFetchScope &fetchScope ) { + Q_D( ItemSync ); d->mFetchScope = fetchScope; } ItemFetchScope &ItemSync::fetchScope() { + Q_D( ItemSync ); return d->mFetchScope; } void ItemSync::doStart() { + Q_D( ItemSync ); ItemFetchJob* job = new ItemFetchJob( d->mSyncCollection, this ); job->setFetchScope( d->mFetchScope ); @@ -204,6 +213,7 @@ bool ItemSync::updateItem( const Item &storedItem, Item &newItem ) { + Q_D( ItemSync ); // we are in error state, better not change anything at all anymore if ( error() ) return false; @@ -254,7 +264,7 @@ return false; } -void ItemSync::Private::slotLocalListDone( KJob * job ) +void ItemSyncPrivate::slotLocalListDone( KJob * job ) { if ( !job->error() ) { const Item::List list = static_cast<ItemFetchJob*>( job )->items(); @@ -271,8 +281,16 @@ execute(); } -void ItemSync::Private::execute() +QString ItemSyncPrivate::jobDebuggingString() const /*Q_DECL_OVERRIDE*/ { + // TODO: also print out mIncremental and mTotalItemsProcessed, but they are set after the job + // started, so this requires passing jobDebuggingString to jobEnded(). + return QString::fromLatin1("Collection %1 (%2)").arg( mSyncCollection.id() ).arg( mSyncCollection.name() ); +} + +void ItemSyncPrivate::execute() +{ + Q_Q( ItemSync ); if ( !mLocalListDone ) return; @@ -281,16 +299,16 @@ if ( !mDeliveryDone && mRemoteItems.isEmpty() ) return; - if ( (mTransactionMode == SingleTransaction && !mCurrentTransaction) || mTransactionMode == MultipleTransactions) { + if ( (mTransactionMode == ItemSync::SingleTransaction && !mCurrentTransaction) || mTransactionMode == ItemSync::MultipleTransactions) { ++mTransactionJobs; mCurrentTransaction = new TransactionSequence( q ); mCurrentTransaction->setAutomaticCommittingEnabled( false ); - connect( mCurrentTransaction, SIGNAL(result(KJob*)), q, SLOT(slotTransactionResult(KJob*)) ); + QObject::connect( mCurrentTransaction, SIGNAL(result(KJob*)), q, SLOT(slotTransactionResult(KJob*)) ); } processItems(); if ( !mDeliveryDone ) { - if ( mTransactionMode == MultipleTransactions && mCurrentTransaction ) { + if ( mTransactionMode == ItemSync::MultipleTransactions && mCurrentTransaction ) { mCurrentTransaction->commit(); mCurrentTransaction = 0; } @@ -316,8 +334,9 @@ checkDone(); } -void ItemSync::Private::processItems() +void ItemSyncPrivate::processItems() { + Q_Q( ItemSync ); // added / updated foreach ( Item remoteItem, mRemoteItems ) { //krazy:exclude=foreach non-const is needed here #ifndef NDEBUG @@ -353,8 +372,9 @@ mRemoteItems.clear(); } -void ItemSync::Private::deleteItems( const Item::List &items ) +void ItemSyncPrivate::deleteItems( const Item::List &items ) { + Q_Q( ItemSync ); // if in error state, better not change anything anymore if ( q->error() ) return; @@ -398,7 +418,7 @@ } } -void ItemSync::Private::slotLocalDeleteDone( KJob* ) +void ItemSyncPrivate::slotLocalDeleteDone( KJob* ) { mPendingJobs--; mProgress++; @@ -406,7 +426,7 @@ checkDone(); } -void ItemSync::Private::slotLocalChangeDone( KJob * job ) +void ItemSyncPrivate::slotLocalChangeDone( KJob * job ) { Q_UNUSED( job ); mPendingJobs--; @@ -415,7 +435,7 @@ checkDone(); } -void ItemSync::Private::slotTransactionResult( KJob *job ) +void ItemSyncPrivate::slotTransactionResult( KJob *job ) { --mTransactionJobs; if ( mCurrentTransaction == job ) @@ -424,20 +444,23 @@ checkDone(); } -Job * ItemSync::Private::subjobParent() const +Job * ItemSyncPrivate::subjobParent() const { - if ( mCurrentTransaction && mTransactionMode != NoTransaction ) + Q_Q( const ItemSync ); + if ( mCurrentTransaction && mTransactionMode != ItemSync::NoTransaction ) return mCurrentTransaction; - return q; + return const_cast<ItemSync *>( q ); } void ItemSync::setStreamingEnabled(bool enable) { + Q_D( ItemSync ); d->mStreaming = enable; } void ItemSync::deliveryDone() { + Q_D( ItemSync ); Q_ASSERT( d->mStreaming ); d->mDeliveryDone = true; d->execute(); @@ -460,6 +483,7 @@ void ItemSync::rollback() { + Q_D( ItemSync ); setError( UserCanceled ); if ( d->mCurrentTransaction ) d->mCurrentTransaction->rollback(); @@ -469,6 +493,7 @@ void ItemSync::setTransactionMode(ItemSync::TransactionMode mode) { + Q_D( ItemSync ); d->mTransactionMode = mode; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/itemsync.h new/kdepimlibs-4.13.0/akonadi/itemsync.h --- old/kdepimlibs-4.12.97/akonadi/itemsync.h 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/itemsync.h 2014-04-09 12:18:48.000000000 +0200 @@ -29,6 +29,7 @@ class Collection; class ItemFetchScope; +class ItemSyncPrivate; /** * @short Syncs between items known to a client (usually a resource) and the Akonadi storage. @@ -184,13 +185,13 @@ private: //@cond PRIVATE - class Private; - Private* const d; + Q_DECLARE_PRIVATE( ItemSync ) + ItemSyncPrivate * dummy; // for BC. KF5 TODO: REMOVE. - Q_PRIVATE_SLOT( d, void slotLocalListDone( KJob* ) ) - Q_PRIVATE_SLOT( d, void slotLocalDeleteDone( KJob* ) ) - Q_PRIVATE_SLOT( d, void slotLocalChangeDone( KJob* ) ) - Q_PRIVATE_SLOT( d, void slotTransactionResult( KJob* ) ) + Q_PRIVATE_SLOT( d_func(), void slotLocalListDone( KJob* ) ) + Q_PRIVATE_SLOT( d_func(), void slotLocalDeleteDone( KJob* ) ) + Q_PRIVATE_SLOT( d_func(), void slotLocalChangeDone( KJob* ) ) + Q_PRIVATE_SLOT( d_func(), void slotTransactionResult( KJob* ) ) //@endcond }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/job.cpp new/kdepimlibs-4.13.0/akonadi/job.cpp --- old/kdepimlibs-4.12.97/akonadi/job.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/job.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -149,9 +149,15 @@ } } +void JobPrivate::aboutToFinish() +{ + // Dummy +} + void JobPrivate::delayedEmitResult() { Q_Q( Job ); + aboutToFinish(); q->emitResult(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/job_p.h new/kdepimlibs-4.13.0/akonadi/job_p.h --- old/kdepimlibs-4.12.97/akonadi/job_p.h 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/job_p.h 2014-04-09 12:18:48.000000000 +0200 @@ -93,6 +93,15 @@ */ virtual void doUpdateItemRevision( Akonadi::Item::Id, int oldRevision, int newRevision ); + /** + * This method is called right before result() and finished() signals are emitted. + * Overwrite this method in your job if you need to emit some signals or process + * some data before the job finishes. + * + * Default implementation does nothing. + */ + virtual void aboutToFinish(); + int protocolVersion() const; Job *q_ptr; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/searchcreatejob.cpp new/kdepimlibs-4.13.0/akonadi/searchcreatejob.cpp --- old/kdepimlibs-4.12.97/akonadi/searchcreatejob.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/searchcreatejob.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -38,7 +38,7 @@ , mName( name ) , mQuery( query ) , mRecursive( false ) - , mRemote( true ) + , mRemote( false ) { } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/searchcreatejob.h new/kdepimlibs-4.13.0/akonadi/searchcreatejob.h --- old/kdepimlibs-4.12.97/akonadi/searchcreatejob.h 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/searchcreatejob.h 2014-04-09 12:18:48.000000000 +0200 @@ -141,7 +141,7 @@ * be searched. With remote search, even those emails can be included in search * results. * - * This feature is enabled by default. + * This feature is disabled by default. * * @param enabled Whether remote search is enabled * @since 4.13 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/servermanager.cpp new/kdepimlibs-4.13.0/akonadi/servermanager.cpp --- old/kdepimlibs-4.12.97/akonadi/servermanager.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/servermanager.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -66,8 +66,19 @@ delete instance; } - void serviceOwnerChanged( const QString&, const QString&, const QString& ) + void serviceOwnerChanged( const QString &name, const QString &oldOwner, const QString &newOwner ) { + if ( name == ServerManager::serviceName( ServerManager::ControlLock ) && !oldOwner.isEmpty() && newOwner.isEmpty() ) { + // Control.Lock has disappeared during startup, which means that akonadi_control + // has terminated, most probably because it was not able to start akonadiserver + // process. Don't wait 30 seconds for sefetyTimeout, but go into Broken state + // immediately. + if ( mState == ServerManager::Starting ) { + setState( ServerManager::Broken ); + return; + } + } + serverProtocolVersion = -1, checkStatusChanged(); } @@ -129,6 +140,7 @@ DBusConnectionPool::threadConnection(), QDBusServiceWatcher::WatchForOwnerChange, this ); watcher->addWatchedService( ServerManager::serviceName( ServerManager::Control ) ); + watcher->addWatchedService( ServerManager::serviceName( ServerManager::ControlLock ) ); watcher->addWatchedService( ServerManager::serviceName( ServerManager::UpgradeIndicator ) ); // this (and also the two connects below) are queued so that they trigger after AgentManager is done loading diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/session.cpp new/kdepimlibs-4.13.0/akonadi/session.cpp --- old/kdepimlibs-4.12.97/akonadi/session.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/session.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -358,8 +358,16 @@ void SessionPrivate::serverStateChanged( ServerManager::State state ) { - if ( state == ServerManager::Running && !connected ) + if ( state == ServerManager::Running && !connected ) { reconnect(); + } else if ( !connected && state == ServerManager::Broken ) { + // If the server is broken, cancel all pending jobs, otherwise they will be + // blocked forever and applications waiting for them to finish would be stuck + Q_FOREACH ( Job *job, queue ) { + job->setError( Job::ConnectionFailed ); + job->kill( KJob::EmitResult ); + } + } } void SessionPrivate::itemRevisionChanged( Akonadi::Item::Id itemId, int oldRevision, int newRevision ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/tagfetchjob.cpp new/kdepimlibs-4.13.0/akonadi/tagfetchjob.cpp --- old/kdepimlibs-4.12.97/akonadi/tagfetchjob.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/tagfetchjob.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -44,7 +44,11 @@ mEmitTimer->setSingleShot(true); mEmitTimer->setInterval(100); q->connect(mEmitTimer, SIGNAL(timeout()), q, SLOT(timeout())); - q->connect(q, SIGNAL(result(KJob*)), q, SLOT(timeout())); + } + + void aboutToFinish() + { + timeout(); } void timeout() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/tests/CMakeLists.txt new/kdepimlibs-4.13.0/akonadi/tests/CMakeLists.txt --- old/kdepimlibs-4.12.97/akonadi/tests/CMakeLists.txt 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/tests/CMakeLists.txt 2014-04-09 12:18:48.000000000 +0200 @@ -137,7 +137,9 @@ add_akonadi_isolated_test(itemsynctest.cpp) add_akonadi_isolated_test(linktest.cpp) add_akonadi_isolated_test(cachetest.cpp) -add_akonadi_isolated_test(servermanagertest.cpp) +# starting/stopping the server in the testenvironment doesn't seem to work, +# and the test is not very critical (we'll notice if we can't start the server), so we disable it for now. +# add_akonadi_isolated_test(servermanagertest.cpp) add_akonadi_isolated_test(collectioncreator.cpp) add_akonadi_isolated_test(itembenchmark.cpp) add_akonadi_isolated_test(gidtest.cpp) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/tests/collectionsynctest.cpp new/kdepimlibs-4.13.0/akonadi/tests/collectionsynctest.cpp --- old/kdepimlibs-4.12.97/akonadi/tests/collectionsynctest.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/tests/collectionsynctest.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -127,7 +127,7 @@ QCOMPARE( spy.count(), 0 ); } syncer->retrievalDone(); - QTest::qWait( 1000 ); // let it finish its job + QTRY_COMPARE( spy.count(), 1 ); QCOMPARE( spy.count(), 1 ); KJob *job = spy.at( 0 ).at( 0 ).value<KJob*>(); QCOMPARE( job, syncer ); @@ -219,8 +219,7 @@ QCOMPARE( spy.count(), 0 ); } syncer->retrievalDone(); - QTest::qWait( 1000 ); // let it finish its job - QCOMPARE( spy.count(), 1 ); + QTRY_COMPARE(spy.count(), 1); KJob *job = spy.at( 0 ).at( 0 ).value<KJob*>(); QCOMPARE( job, syncer ); QCOMPARE( job->errorText(), QString() ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/tests/entitycachetest.cpp new/kdepimlibs-4.13.0/akonadi/tests/entitycachetest.cpp --- old/kdepimlibs-4.12.97/akonadi/tests/entitycachetest.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/tests/entitycachetest.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -48,8 +48,7 @@ QVERIFY( cache.isRequested( 1 ) ); QVERIFY( !cache.retrieve( 1 ).isValid() ); - QTest::qWait( 1000 ); - QCOMPARE( spy.count(), 1 ); + QTRY_COMPARE( spy.count(), 1 ); QVERIFY( cache.isCached( 1 ) ); QVERIFY( cache.isRequested( 1 ) ); const T e1 = cache.retrieve( 1 ); @@ -68,8 +67,7 @@ cache.invalidate( 2 ); - QTest::qWait( 1000 ); - QCOMPARE( spy.count(), 2 ); + QTRY_COMPARE( spy.count(), 2 ); QVERIFY( cache.isCached( 2 ) ); QVERIFY( cache.isCached( 3 ) ); @@ -99,8 +97,7 @@ QVERIFY( !cache.isCached( 3 ) ); QVERIFY( cache.isRequested( 3 ) ); - QTest::qWait( 1000 ); - QCOMPARE( spy.count(), 3 ); + QTRY_COMPARE( spy.count(), 3 ); QVERIFY( cache.isCached( 3 ) ); QVERIFY( cache.retrieve( 3 ).isValid() ); } @@ -143,8 +140,7 @@ scope.fetchFullPayload( true ); cache.request( 1, scope ); - QTest::qWait( 1000 ); - QCOMPARE( spy.count(), 1 ); + QTRY_COMPARE( spy.count(), 1 ); QVERIFY( cache.isCached( 1 ) ); QVERIFY( cache.isRequested( 1 ) ); const Item item = cache.retrieve( 1 ); @@ -161,13 +157,11 @@ QVERIFY( spy.isValid() ); cache.request( QList<Entity::Id>() << 1 << 2 << 3, scope ); - QTest::qWait( 1000 ); - QCOMPARE( spy.count(), 1 ); + QTRY_COMPARE( spy.count(), 1 ); QVERIFY( cache.isCached( QList<Entity::Id>() << 1 << 2 << 3 ) ); cache.ensureCached( QList<Entity::Id>() << 1 << 2 << 3 << 4, scope ); - QTest::qWait( 1000 ); - QCOMPARE( spy.count(), 2 ); + QTRY_COMPARE( spy.count(), 2 ); QVERIFY( cache.isCached( QList<Entity::Id>() << 1 << 2 << 3 << 4 ) ); } }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/tests/itemappendtest.cpp new/kdepimlibs-4.13.0/akonadi/tests/itemappendtest.cpp --- old/kdepimlibs-4.12.97/akonadi/tests/itemappendtest.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/tests/itemappendtest.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -134,8 +134,11 @@ AKVERIFYEXEC( fjob ); QCOMPARE( fjob->items().count(), 1 ); Item item2 = fjob->items().first(); - QVERIFY( item2.hasPayload() ); - QCOMPARE( item2.payload<QByteArray>(), data ); + //akonadi does not distinguish empty and no payload + QCOMPARE( item2.hasPayload(), !data.isEmpty() ); + if( item2.hasPayload() ) { + QCOMPARE( item2.payload<QByteArray>(), data ); + } ItemDeleteJob *djob = new ItemDeleteJob( ref, this ); AKVERIFYEXEC( djob ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/tests/itemsynctest.cpp new/kdepimlibs-4.13.0/akonadi/tests/itemsynctest.cpp --- old/kdepimlibs-4.12.97/akonadi/tests/itemsynctest.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/tests/itemsynctest.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -100,8 +100,7 @@ QCOMPARE( spy.count(), 0 ); } } - QTest::qWait( 1000 ); // let it finish its job - QCOMPARE( spy.count(), 1 ); + QTRY_COMPARE( spy.count(), 1 ); KJob *job = spy.at( 0 ).at( 0 ).value<KJob*>(); QCOMPARE( job, syncer ); QCOMPARE( job->error(), 0 ); @@ -168,8 +167,7 @@ QCOMPARE( spy.count(), 0 ); } syncer->deliveryDone(); - QTest::qWait( 1000 ); // let it finish its job - QCOMPARE( spy.count(), 1 ); + QTRY_COMPARE( spy.count(), 1 ); KJob *job = spy.at( 0 ).at( 0 ).value<KJob*>(); QCOMPARE( job, syncer ); QCOMPARE( job->error(), 0 ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/tests/lazypopulationtest.cpp new/kdepimlibs-4.13.0/akonadi/tests/lazypopulationtest.cpp --- old/kdepimlibs-4.12.97/akonadi/tests/lazypopulationtest.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/tests/lazypopulationtest.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -68,6 +68,15 @@ */ void testItemAddedBeforeFetch(); + /* + * We purge an empty collection and make sure it can be fetched later on. + * * reference collection to remember empty status + * * purge collection + * * add item (it should not be added since not monitored) + * * reference collection and make sure items are added + */ + void testPurgeEmptyCollection(); + private: Collection res3; static const int numberOfRootCollections = 4; @@ -78,6 +87,7 @@ void LazyPopulationTest::initTestCase() { + qRegisterMetaType<Akonadi::Collection::Id>("Akonadi::Collection::Id"); AkonadiTest::checkTestIsIsolated(); AkonadiTest::setAllResourcesOffline(); @@ -292,6 +302,66 @@ QVERIFY(waitForPopulation(monitorIndex, model, 2)); } +void LazyPopulationTest::testPurgeEmptyCollection() +{ + const QString mainCollectionName("main3"); + Collection monitorCol; + { + monitorCol.setParentCollection(res3); + monitorCol.setName(mainCollectionName); + CollectionCreateJob *create = new CollectionCreateJob(monitorCol, this); + AKVERIFYEXEC(create); + monitorCol = create->collection(); + } + //Monitor without referencing so we get all signals + Monitor *monitor = new Monitor(this); + monitor->setCollectionMonitored(Collection::root()); + + ChangeRecorder *changeRecorder = new ChangeRecorder(this); + changeRecorder->setCollectionMonitored(Collection::root()); + InspectableETM *model = new InspectableETM( changeRecorder, this ); + model->setItemPopulationStrategy(Akonadi::EntityTreeModel::LazyPopulation); + + //Wait for initial listing to complete + QVERIFY(waitForPopulation(QModelIndex(), model, numberOfRootCollections)); + + const QModelIndex res3Index = getIndex("res3", model); + QVERIFY(waitForPopulation(res3Index, model, bufferSize + 1)); + + QModelIndex monitorIndex = getIndex(mainCollectionName, model); + QVERIFY(monitorIndex.isValid()); + + //fetch the collection so we remember the empty status + QSignalSpy populatedSpy(model, SIGNAL(collectionPopulated(Akonadi::Collection::Id))); + model->setData(monitorIndex, QVariant(), EntityTreeModel::CollectionRefRole); + model->fetchMore(monitorIndex); + //Wait for collection to be fetched + QTRY_VERIFY(populatedSpy.count() >= 1); + + //get the collection purged + model->setData(monitorIndex, QVariant(), EntityTreeModel::CollectionDerefRole); + referenceCollections(model, bufferSize); + + //create an item + { + QSignalSpy addedSpy(monitor, SIGNAL(itemAdded(Akonadi::Item,Akonadi::Collection))); + QVERIFY(addedSpy.isValid()); + Item item1; + item1.setMimeType("application/octet-stream"); + ItemCreateJob *append = new ItemCreateJob(item1, monitorCol, this); + AKVERIFYEXEC(append); + QTRY_VERIFY(addedSpy.count() >= 1); + } + + //ensure it's not in the model + //fetch the collection + QVERIFY(model->etmPrivate()->canFetchMore(monitorIndex)); + + model->fetchMore(monitorIndex); + //Wait for collection to be fetched + QVERIFY(waitForPopulation(monitorIndex, model, 1)); +} + #include "lazypopulationtest.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/tests/linktest.cpp new/kdepimlibs-4.13.0/akonadi/tests/linktest.cpp --- old/kdepimlibs-4.12.97/akonadi/tests/linktest.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/tests/linktest.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -75,9 +75,9 @@ LinkJob *link = new LinkJob( col, items, this ); AKVERIFYEXEC( link ); - QTest::qWait( 1000 ); + QTRY_COMPARE( lspy.count(), 3 ); + QTest::qWait( 100 ); QVERIFY( uspy.isEmpty() ); - QCOMPARE( lspy.count(), 3 ); QList<QVariant> arg = lspy.takeFirst(); Item item = arg.at( 0 ).value<Item>(); @@ -96,9 +96,9 @@ UnlinkJob *unlink = new UnlinkJob( col, items, this ); AKVERIFYEXEC( unlink ); - QTest::qWait( 1000 ); + QTRY_COMPARE( uspy.count(), 3 ); + QTest::qWait( 100 ); QVERIFY( lspy.isEmpty() ); - QCOMPARE( uspy.count(), 3 ); fetch = new ItemFetchJob( col ); AKVERIFYEXEC( fetch ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/tests/resourcetest.cpp new/kdepimlibs-4.13.0/akonadi/tests/resourcetest.cpp --- old/kdepimlibs-4.12.97/akonadi/tests/resourcetest.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/tests/resourcetest.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -66,8 +66,7 @@ AgentManager::self()->removeInstance( instance ); AgentManager::self()->removeInstance( instance2 ); - QTest::qWait( 2000 ); - QCOMPARE( spyRemoveInstance.count(), 2 ); + QTRY_COMPARE( spyRemoveInstance.count(), 2 ); QVERIFY( !AgentManager::self()->instances().contains( instance ) ); QVERIFY( !AgentManager::self()->instances().contains( instance2 ) ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/tests/searchjobtest.cpp new/kdepimlibs-4.13.0/akonadi/tests/searchjobtest.cpp --- old/kdepimlibs-4.12.97/akonadi/tests/searchjobtest.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/tests/searchjobtest.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -55,6 +55,7 @@ // Create collection SearchCreateJob *create = new SearchCreateJob( "search123456", query, this ); + create->setRemoteSearchEnabled(false); AKVERIFYEXEC( create ); const Collection created = create->createdCollection(); QVERIFY( created.isValid() ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/tests/servermanagertest.cpp new/kdepimlibs-4.13.0/akonadi/tests/servermanagertest.cpp --- old/kdepimlibs-4.12.97/akonadi/tests/servermanagertest.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/tests/servermanagertest.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -57,15 +57,21 @@ QVERIFY( startSpy.isEmpty() ); QVERIFY( stopSpy.isEmpty() ); - QVERIFY( ServerManager::stop() ); - QVERIFY( QTest::kWaitForSignal( ServerManager::self(), SIGNAL(stopped()), 5000 ) ); + { + QSignalSpy spy(ServerManager::self(), SIGNAL(stopped())); + QVERIFY( ServerManager::stop() ); + QTRY_VERIFY(spy.count() >= 1); + } QVERIFY( !ServerManager::isRunning() ); QVERIFY( startSpy.isEmpty() ); QCOMPARE( stopSpy.count(), 1 ); QVERIFY( !ServerManager::stop() ); - QVERIFY( ServerManager::start() ); - QVERIFY( QTest::kWaitForSignal( ServerManager::self(), SIGNAL(started()), 5000 ) ); + { + QSignalSpy spy(ServerManager::self(), SIGNAL(started())); + QVERIFY( ServerManager::start() ); + QTRY_VERIFY(spy.count() >= 1); + } QVERIFY( ServerManager::isRunning() ); QCOMPARE( startSpy.count(), 1 ); QCOMPARE( stopSpy.count(), 1 ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/tests/tagtest.cpp new/kdepimlibs-4.13.0/akonadi/tests/tagtest.cpp --- old/kdepimlibs-4.12.97/akonadi/tests/tagtest.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/tests/tagtest.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -266,6 +266,7 @@ void TagTest::testTagItem() { Akonadi::Monitor monitor; + monitor.itemFetchScope().setFetchTags(true); monitor.setAllMonitored(true); const Collection res3 = Collection( collectionIdFromPath( "res3" ) ); Tag tag; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/akonadi/tests/testsearchplugin/akonaditestsearchplugin.desktop new/kdepimlibs-4.13.0/akonadi/tests/testsearchplugin/akonaditestsearchplugin.desktop --- old/kdepimlibs-4.12.97/akonadi/tests/testsearchplugin/akonaditestsearchplugin.desktop 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/akonadi/tests/testsearchplugin/akonaditestsearchplugin.desktop 2014-04-09 12:18:48.000000000 +0200 @@ -11,12 +11,16 @@ Name[fi]=Akonadin hakuliitännäinen testaustarkoituksiin Name[fr]=Module externe de test pour les recherches Akonadi Name[hu]=Akonadi teszt keresés bővítmény +Name[ia]=Plug-in de cerca de essayo de Akonadi +Name[it]=Plugin di ricerca di test per Akonadi Name[ko]=Akonadi 테스트 검색 플러그인 +Name[nb]=Akonadi test-tillegg for søk Name[nds]=Akonadi-Testsöökmoduul Name[nl]=Akonadi-plug-in voor test met zoeken Name[pl]=Wtyczka próbna znajdywania dla Akonadi Name[pt]='Plugin' de Testes de Pesquisa do Akonadi Name[pt_BR]=Plugin de teste de pesquisa do Akonadi +Name[ru]=Тестовый модуль поиска по данным Akonadi Name[sk]=Testovací plugin hľadania Akonadi Name[sr]=Пробни прикључак за претрагу над Аконадијем Name[sr@ijekavian]=Пробни прикључак за претрагу над Аконадијем diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/kabc/vcardparser/testroundtrip.qrc new/kdepimlibs-4.13.0/kabc/vcardparser/testroundtrip.qrc --- old/kdepimlibs-4.12.97/kabc/vcardparser/testroundtrip.qrc 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/kabc/vcardparser/testroundtrip.qrc 2014-04-09 12:18:48.000000000 +0200 @@ -10,6 +10,7 @@ <file>tests/vcard7.vcf</file> <file>tests/vcard8.vcf</file> <file>tests/vcard9.vcf</file> + <file>tests/vcard10.vcf</file> </qresource> <!-- output files formatted for vcard version 2.1 --> @@ -28,5 +29,6 @@ <file>tests/vcard7.vcf.ref</file> <file>tests/vcard8.vcf.ref</file> <file>tests/vcard9.vcf.ref</file> + <file>tests/vcard10.vcf.ref</file> </qresource> </RCC> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/kabc/vcardparser/tests/vcard10.vcf new/kdepimlibs-4.13.0/kabc/vcardparser/tests/vcard10.vcf --- old/kdepimlibs-4.12.97/kabc/vcardparser/tests/vcard10.vcf 1970-01-01 01:00:00.000000000 +0100 +++ new/kdepimlibs-4.13.0/kabc/vcardparser/tests/vcard10.vcf 2014-04-09 12:18:48.000000000 +0200 @@ -0,0 +1,56 @@ +BEGIN:VCARD +VERSION:2.1 +UID:bfa5fdc5-fbfc-4ce2-8196-29ca0deb3bd3 +ADR;WORK;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:;;=44=44=44=44=44=44=44=44=44=44=44=44=44=44=44=2D=53=74=61=C3=9F=65=20= +=32=0A=30=30=30=30=30=20=44=44=44=44=44=44=44=44=44=44;;;; +ORG:Bike Shop +Note:This one has a funny character at the end in the contact list +END:VCARD +BEGIN:VCARD +VERSION:2.1 +UID:f8361311-b25c-4237-a94e-3015d8fe19de +N:;Broken;;; +FN:Field after Address broken +ADR;HOME;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:;;=41=41=41=41=41=41=41=2D=41=C3=A4=41=41=41=41=41=20= +=31=31;=55=72=74;;=30=30=30=30=30; +URL:http://some-webseite.com +NOTE:This one's URL field is truncated (see contact's edit form). Remove the linebreak in the VCF's address field and the URL will will be correct. +END:VCARD +BEGIN:VCARD +VERSION:2.1 +UID:462269fd-607c-4284-998b-6771143b63a7 +N:;Broken;;; +FN:Field after Address not broken +ADR;HOME;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:;;=41=41=41=41=41=41=41=2D=41=C3=A4=41=41=41=41=41=20= +=31=31;=55=72=74;;=30=30=30=30=30; +NOTE:this is identical to "Website broken", but with Note and URL swapped. The Note field does not get truncated as the URL field does. +URL:http://some-webseite.com +END:VCARD +BEGIN:VCARD +VERSION:2.1 +UID:b4fc4930-043f-446a-9a76-cf0b548368d8 +N:Name;Surname;;Dr. med.; +FN:Dr. med. Surname Name +TITLE;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=46=61=63=68=61=72=7A=74=20=66=C3=BC=72=20=41=6C=6C=67=65=6D=65=69=6E= +=6D=65=64=69=7A=69=6E +NOTE;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=53=70=72=65=63=68=7A=65=69=74=65=6E=3A=0A=4D=6F=20=20=20=38=E2=80=93= +=31=32=2C=20=31=35=E2=80=93=31=38=0A=44=69=20=20=20=20=20=38=E2=80=93= +=31=32=0A=4D=69=20=20=20=20=38=E2=80=93=31=32=2C=20=31=34=E2=80=93=31= +=35=0A=44=6F=20=31=34=E2=80=93=31=39=0A=46=72=20=20=20=20=20=38=E2=80= +=93=31=32 +END:VCARD +BEGIN:VCARD +VERSION:2.1 +UID:941b057d-e959-4644-b41f-e122b26c3807 +N:Doctor;Second;;; +FN:Second Doctor +ADR;WORK;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:;;=44=44=44=44=44=44=44=44=44=44=44=73=74=72=61=C3=9F=65=20=32=36=0A=30= +=30=30=30=30=20=44=44=44=44=44=44=44=44=44=44=44=44=44=44=44=44=44;;;; +ORG: +TITLE:Dentist +NOTE;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=53=70=72=65=63=68=7A=65=69=74=65=6E=3A=0A=4D=6F=20=20=20=38=E2=80=93= +=31=33=0A=44=69=20=20=20=31=30=E2=80=93=31=32=2C=20=31=33=E2=80=93=31= +=38=0A=4D=69=20=20=31=30=E2=80=93=31=32=2C=20=31=33=E2=80=93=31=38=0A= +=44=6F=20=20=31=33=E2=80=93=31=38=0A=46=72=20=20=20=20=20=20=38=E2=80= +=93=31=32 +END:VCARD diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/kabc/vcardparser/tests/vcard10.vcf.ref new/kdepimlibs-4.13.0/kabc/vcardparser/tests/vcard10.vcf.ref --- old/kdepimlibs-4.12.97/kabc/vcardparser/tests/vcard10.vcf.ref 1970-01-01 01:00:00.000000000 +0100 +++ new/kdepimlibs-4.13.0/kabc/vcardparser/tests/vcard10.vcf.ref 2014-04-09 12:18:48.000000000 +0200 @@ -0,0 +1,52 @@ +BEGIN:VCARD +ADR;TYPE=work:;;DDDDDDDDDDDDDDD-Staße 2\n00000 DDDDDDDDDD;;;; +N:;;;; +NOTE:This one has a funny character at the end in the contact list +ORG:Bike Shop +UID:bfa5fdc5-fbfc-4ce2-8196-29ca0deb3bd3 +VERSION:3.0 +END:VCARD + +BEGIN:VCARD +ADR;TYPE=home:;;AAAAAAA-AäAAAAA 11;Urt;;00000; +FN:Field after Address broken +N:;Broken;;; +NOTE:This one's URL field is truncated (see contact's edit form). Remove th + e linebreak in the VCF's address field and the URL will will be correct. +UID:f8361311-b25c-4237-a94e-3015d8fe19de +URL:http://some-webseite.com +VERSION:3.0 +END:VCARD + +BEGIN:VCARD +ADR;TYPE=home:;;AAAAAAA-AäAAAAA 11;Urt;;00000; +FN:Field after Address not broken +N:;Broken;;; +NOTE:this is identical to "Website broken"\, but with Note and URL swapped. + The Note field does not get truncated as the URL field does. +UID:462269fd-607c-4284-998b-6771143b63a7 +URL:http://some-webseite.com +VERSION:3.0 +END:VCARD + +BEGIN:VCARD +FN:Dr. med. Surname Name +N:Name;Surname;;Dr. med.; +NOTE:Sprechzeiten:\nMo 8–12\, 15–18\nDi 8–12\nMi 8–12\, 14 + –15\nDo 14–19\nFr 8–12 +TITLE:Facharzt für Allgemeinmedizin +UID:b4fc4930-043f-446a-9a76-cf0b548368d8 +VERSION:3.0 +END:VCARD + +BEGIN:VCARD +ADR;TYPE=work:;;DDDDDDDDDDDstraße 26\n00000 DDDDDDDDDDDDDDDDD;;;; +FN:Second Doctor +N:Doctor;Second;;; +NOTE:Sprechzeiten:\nMo 8–13\nDi 10–12\, 13–18\nMi 10–12\, 13 + –18\nDo 13–18\nFr 8–12 +TITLE:Dentist +UID:941b057d-e959-4644-b41f-e122b26c3807 +VERSION:3.0 +END:VCARD + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdepimlibs-4.12.97/kabc/vcardparser/vcardparser.cpp new/kdepimlibs-4.13.0/kabc/vcardparser/vcardparser.cpp --- old/kdepimlibs-4.12.97/kabc/vcardparser/vcardparser.cpp 2014-03-26 08:20:40.000000000 +0100 +++ new/kdepimlibs-4.13.0/kabc/vcardparser/vcardparser.cpp 2014-04-09 12:18:48.000000000 +0200 @@ -178,6 +178,10 @@ value.chop( 1 ); // remove the '=' value.append( *it ); ++it; + // remove the trailing \r, left from \r\n + if ( (*it).endsWith('\r') ) { + (*it).chop(1); + } } KCodecs::quotedPrintableDecode( value, output ); } else if ( encoding == QLatin1String( "8bit" ) ) { -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
