Commit ab4401ef authored by Sergio Luis Martins's avatar Sergio Luis Martins
Browse files

Do cancelTask() before the assert.

andris: should we just remove the assert, and return?

svn path=/trunk/KDE/kdepim/runtime/; revision=1197950
parent 4a835800
...@@ -366,8 +366,10 @@ void KolabProxyResource::itemRemoved( const Item &item ) ...@@ -366,8 +366,10 @@ void KolabProxyResource::itemRemoved( const Item &item )
void KolabProxyResource::collectionAdded(const Akonadi::Collection& collection, const Akonadi::Collection& parent) void KolabProxyResource::collectionAdded(const Akonadi::Collection& collection, const Akonadi::Collection& parent)
{ {
if ( KolabHandler::kolabTypeForCollection( collection ).isEmpty() ) { if ( KolabHandler::kolabTypeForCollection( collection ).isEmpty() ) {
kWarning() << "Collection " << collection.name() << " (" << collection.id() kWarning() << "Collection " << collection.name() << collection.id() << collection.isValid()
<< ") doesn't have kolab type set."; << "doesn't have kolab type set. isValid = "
<< "; parent is " << parent.name() << parent.id() << parent.isValid();
cancelTask( QLatin1String( "Collection doesn't have kolab type." ) );
Q_ASSERT_X( false, "collectionAdded", "Colection doesn't have kolab type set. Crashing..." ); Q_ASSERT_X( false, "collectionAdded", "Colection doesn't have kolab type set. Crashing..." );
} }
......
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