[Pkg-kde-extras] Bug#781153: [zanshin] Fix compatibility with zanshin development version

2015-03-30 Thread Samuel Thibault
Just FTR, the upstream patch for easier review.

Samuel
commit 325ebf25a5de3cfeb02c4cd71deacfea3dc767e3
Author: David Faure fa...@kde.org
Date:   Sun Oct 19 23:45:25 2014 +0200

Write zanshin-master-compatible project markers

This makes it easier to test both versions in parallel on the same data.

diff --git a/src/todohelpers.cpp b/src/todohelpers.cpp
index 0db98f3..a4ae190 100644
--- a/src/todohelpers.cpp
+++ b/src/todohelpers.cpp
@@ -89,6 +89,7 @@ void TodoHelpers::addProject(const QString summary, const 
Akonadi::Collection 
 KCalCore::Todo::Ptr todo(new KCalCore::Todo());
 todo-setSummary(summary);
 todo-addComment(X-Zanshin-Project);
+todo-setCustomProperty(Zanshin, Project, 1);
 
 Akonadi::Item item;
 item.setMimeType(application/x-vnd.akonadi.calendar.todo);
@@ -112,6 +113,7 @@ void TodoHelpers::addProject(const QString summary, const 
QModelIndex parentIt
 KCalCore::Todo::Ptr todo(new KCalCore::Todo());
 todo-setSummary(summary);
 todo-addComment(X-Zanshin-Project);
+todo-setCustomProperty(Zanshin, Project, 1);
 
 KCalCore::Todo::Ptr parentTodo = 
parentProject.payloadKCalCore::Todo::Ptr();
 todo-setRelatedTo(parentTodo-uid());
@@ -347,6 +349,7 @@ bool TodoHelpers::promoteTodo(const QModelIndex index)
 }
 
 todo-addComment(X-Zanshin-Project);
+todo-setCustomProperty(Zanshin, Project, 1);
 new Akonadi::ItemModifyJob(item);
 return true;
 }
diff --git a/src/todometadatamodel.cpp b/src/todometadatamodel.cpp
index 60056b2..9250635 100644
--- a/src/todometadatamodel.cpp
+++ b/src/todometadatamodel.cpp
@@ -281,7 +281,7 @@ Zanshin::ItemType TodoMetadataModel::itemTypeFromItem(const 
Akonadi::Item item)
 
 QStringList comments = todo-comments();
 const int childCount = m_childrenMap.contains(todo-uid()) ? 
m_childrenMap[todo-uid()].count() : 0;
-if (comments.contains(X-Zanshin-Project)
+if (comments.contains(X-Zanshin-Project) || 
!todo-customProperty(Zanshin, Project).isEmpty()
  || childCount0) {
 return Zanshin::ProjectTodo;
 } else {
___
pkg-kde-extras mailing list
pkg-kde-extras@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-kde-extras

[Pkg-kde-extras] Bug#781153: [zanshin] Fix compatibility with zanshin development version

2015-03-25 Thread Franz Schrober
Package: zanshin
Version: 0.2.1-1+b2
Severity: grave


I had data loss when using a mix of the Debian version and the current
development version of zanshin. The problem is that the zanshin in Debian
fails to handle the projects of the current development zanshin. This
problem was fixed in
 http://commits.kde.org/zanshin/325ebf25a5de3cfeb02c4cd71deacfea3dc767e3
(the only difference between zanshin 0.2.1 and 0.2.2 - for some reason the
0.2.2 was tagged but never uploaded to http://files.kde.org/zanshin/ )

--- System information. ---
Architecture: amd64
Kernel:   Linux 3.16.0-4-amd64

Debian Release: 8.0
500 testinghttp.debian.net 

--- Package information. ---
Package's Depends field is empty.

Package's Recommends field is empty.

Package's Suggests field is empty.

___
pkg-kde-extras mailing list
pkg-kde-extras@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-kde-extras