[SCM] KDE PIM Libraries module packaging branch, master, updated. debian/4.8.4-2-16-g5b78dc7

Maximiliano Curia maxy at alioth.debian.org
Fri Jun 28 18:11:18 UTC 2013


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-sc/kdepimlibs.git;a=commitdiff;h=85be656

The following commit has been merged in the master branch:
commit 85be656449c88ad64c9fdf4426ab294c136b744e
Author: Maximiliano Curia <maxy at debian.org>
Date:   Fri Jun 28 16:08:48 2013 +0200

    Add requestItemDeliveryV2 support to link against akonadi versions greater than 1.8.1.
---
 debian/changelog                                   |    6 +
 debian/patches/series                              |    1 +
 ...m_e1861658fe4b4ec75998c5d08b26e6fbfbe0cdf9.diff |  150 ++++++++++++++++++++
 3 files changed, 157 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 685aa97..c01cb3b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,12 @@ kdepimlibs (4:4.8.4-3) UNRELEASED; urgency=low
   * Add myself to Uploaders.
   * Confirm symbols files with 4:4.8.4's build logs.
 
+  [ Maximiliano Curia ]
+  * Add requestItemDeliveryV2 support to link against akonadi versions
+    greater than 1.8.1;
+    patch upstream_e1861658fe4b4ec75998c5d08b26e6fbfbe0cdf9.diff.
+    (Closes: #710647)
+
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Fri, 28 Jun 2013 15:09:44 +0200
 
 kdepimlibs (4:4.8.4-2) unstable; urgency=low
diff --git a/debian/patches/series b/debian/patches/series
index a17eb0d..1ae0732 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 crash_when_marking_folder_read.diff
 upstream_b92782580756b3858f0381a5200b79688ab0b0a2.diff
 03_hide_akonadi_progressbar.diff
+upstream_e1861658fe4b4ec75998c5d08b26e6fbfbe0cdf9.diff
diff --git a/debian/patches/upstream_e1861658fe4b4ec75998c5d08b26e6fbfbe0cdf9.diff b/debian/patches/upstream_e1861658fe4b4ec75998c5d08b26e6fbfbe0cdf9.diff
new file mode 100644
index 0000000..2c5563b
--- /dev/null
+++ b/debian/patches/upstream_e1861658fe4b4ec75998c5d08b26e6fbfbe0cdf9.diff
@@ -0,0 +1,150 @@
+commit e1861658fe4b4ec75998c5d08b26e6fbfbe0cdf9
+Author: Andras Mantia <amantia at kde.org>
+Date:   Sun Sep 30 13:58:35 2012 +0300
+
+    Add a new requestItemDeliveryV2 that returns the error message. It needed some refactoring in how the error is sent through dbus.
+    Mark some strings to be translated that were not marked before.
+    
+    REVIEW: 106629
+    (cherry picked from commit 14ec9116e0c2059c424751ca25a1ae88de972281)
+
+diff --git a/akonadi/resourcebase.cpp b/akonadi/resourcebase.cpp
+index 575dac0..e4c44cc 100644
+--- a/akonadi/resourcebase.cpp
++++ b/akonadi/resourcebase.cpp
+@@ -466,7 +466,7 @@ void ResourceBase::itemRetrieved( const Item &item )
+   Q_D( ResourceBase );
+   Q_ASSERT( d->scheduler->currentTask().type == ResourceScheduler::FetchItem );
+   if ( !item.isValid() ) {
+-    d->scheduler->currentTask().sendDBusReplies( false );
++    d->scheduler->currentTask().sendDBusReplies( i18nc( "@info", "Invalid item retrieved" ) );
+     d->scheduler->taskDone();
+     return;
+   }
+@@ -490,9 +490,9 @@ void ResourceBasePrivate::slotDeliveryDone(KJob * job)
+   Q_Q( ResourceBase );
+   Q_ASSERT( scheduler->currentTask().type == ResourceScheduler::FetchItem );
+   if ( job->error() ) {
+-    emit q->error( QLatin1String( "Error while creating item: " ) + job->errorString() );
++    emit q->error( i18nc( "@info", "Error while creating item: %1" ).arg( job->errorString() ) );
+   }
+-  scheduler->currentTask().sendDBusReplies( !job->error() );
++  scheduler->currentTask().sendDBusReplies( job->error() ? job->errorString() : QString() );
+   scheduler->taskDone();
+ }
+ 
+@@ -515,7 +515,7 @@ void ResourceBasePrivate::slotCollectionAttributesSyncDone(KJob * job)
+   Q_Q( ResourceBase );
+   Q_ASSERT( scheduler->currentTask().type == ResourceScheduler::SyncCollectionAttributes );
+   if ( job->error() ) {
+-    emit q->error( QLatin1String( "Error while updating collection: " ) + job->errorString() );
++    emit q->error( i18nc( "@info", "Error while updating collection: %1" ).arg( job->errorString() ) );
+   }
+   emit q->attributesSynchronized( scheduler->currentTask().collection.id() );
+   scheduler->taskDone();
+@@ -591,13 +591,19 @@ void ResourceBasePrivate::changeCommittedResult( KJob *job )
+   changeProcessed();
+ }
+ 
+-bool ResourceBase::requestItemDelivery( qint64 uid, const QString & remoteId,
+-                                        const QString &mimeType, const QStringList &_parts )
++bool ResourceBase::requestItemDelivery( qint64 uid, const QString &remoteId,
++                                        const QString &mimeType, const QStringList &parts )
++{
++  return requestItemDeliveryV2( uid, remoteId, mimeType, parts ).isEmpty();
++}
++
++QString ResourceBase::requestItemDeliveryV2(qint64 uid, const QString &remoteId, const QString &mimeType, const QStringList &_parts)
+ {
+   Q_D( ResourceBase );
+   if ( !isOnline() ) {
+-    emit error( i18nc( "@info", "Cannot fetch item in offline mode." ) );
+-    return false;
++    const QString errorMsg = i18nc( "@info", "Cannot fetch item in offline mode." );
++    emit error( errorMsg );
++    return errorMsg;
+   }
+ 
+   setDelayedReply( true );
+@@ -610,9 +616,10 @@ bool ResourceBase::requestItemDelivery( qint64 uid, const QString & remoteId,
+   Q_FOREACH( const QString &str, _parts )
+     parts.insert( str.toLatin1() );
+ 
+-  d->scheduler->scheduleItemFetch( item, parts, message().createReply() );
++  d->scheduler->scheduleItemFetch( item, parts, message() );
++
++  return QString();
+ 
+-  return true;
+ }
+ 
+ void ResourceBase::collectionsRetrieved( const Collection::List & collections )
+diff --git a/akonadi/resourcebase.h b/akonadi/resourcebase.h
+index d453d6c..2e112b5 100644
+--- a/akonadi/resourcebase.h
++++ b/akonadi/resourcebase.h
+@@ -627,6 +627,8 @@ class AKONADI_EXPORT ResourceBase : public AgentBase
+ 
+     bool requestItemDelivery( qint64 uid, const QString &remoteId, const QString &mimeType, const QStringList &parts );
+ 
++    QString requestItemDeliveryV2( qint64 uid, const QString &remoteId, const QString &mimeType, const QStringList &parts );
++
+   private:
+     Q_DECLARE_PRIVATE( ResourceBase )
+ 
+diff --git a/akonadi/resourcescheduler.cpp b/akonadi/resourcescheduler.cpp
+index ca0611b..76e6f9d 100644
+--- a/akonadi/resourcescheduler.cpp
++++ b/akonadi/resourcescheduler.cpp
+@@ -386,12 +386,12 @@ void ResourceScheduler::setOnline(bool state)
+     TaskList& itemFetchQueue = queueForTaskType( FetchItem );
+     for ( QList< Task >::iterator it = itemFetchQueue.begin(); it != itemFetchQueue.end(); ) {
+       if ( (*it).type == FetchItem ) {
+-        (*it).sendDBusReplies( false );
++        (*it).sendDBusReplies( i18nc( "@info", "Job canceled." ) );
+         it = itemFetchQueue.erase( it );
+         if ( s_resourcetracker ) {
+           QList<QVariant> argumentList;
+           argumentList << QString::number( mCurrentTask.serial )
+-                       << QLatin1String( "Job canceled." );
++                       << i18nc( "@info", "Job canceled." );
+           s_resourcetracker->asyncCallWithArgumentList( QLatin1String( "jobEnded" ), argumentList );
+         }
+       } else {
+@@ -435,11 +435,20 @@ void ResourceScheduler::collectionRemoved( const Akonadi::Collection &collection
+   }
+ }
+ 
+-void ResourceScheduler::Task::sendDBusReplies( bool success )
++void ResourceScheduler::Task::sendDBusReplies( const QString &errorMsg )
+ {
+   Q_FOREACH( const QDBusMessage &msg, dbusMsgs ) {
+-    QDBusMessage reply( msg );
+-    reply << success;
++    QDBusMessage reply( msg.createReply() );
++    const QString methodName = msg.member();
++    if (methodName == QLatin1String("requestItemDelivery")) {
++      reply << errorMsg.isEmpty();
++    } else if (methodName == QLatin1String("requestItemDeliveryV2")) {
++      reply << errorMsg;
++    } else if (methodName.isEmpty()) {
++      continue; // unittest calls scheduleItemFetch with empty QDBusMessage
++    } else {
++      kFatal() << "Got unexpected member:" << methodName;
++    }
+     DBusConnectionPool::threadConnection().send( reply );
+   }
+ }
+diff --git a/akonadi/resourcescheduler_p.h b/akonadi/resourcescheduler_p.h
+index aadd930..16ec454 100644
+--- a/akonadi/resourcescheduler_p.h
++++ b/akonadi/resourcescheduler_p.h
+@@ -79,7 +79,7 @@ class ResourceScheduler : public QObject
+         QByteArray methodName;
+         QVariant argument;
+ 
+-        void sendDBusReplies( bool success );
++        void sendDBusReplies( const QString &errorMsg );
+ 
+         bool operator==( const Task &other ) const
+         {

-- 
KDE PIM Libraries module packaging



More information about the pkg-kde-commits mailing list