summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandro Knauß <mail@sandroknauss.de>2015-02-10 09:59:18 (GMT)
committerSandro Knauß <mail@sandroknauss.de>2015-02-10 09:59:18 (GMT)
commit34edc0a846b87570c06a5942b458adb720a34a9b (patch)
treeec92215a55f0c47ec3b8f2c67dbd80edffa23e41
parent225d9c80075acc7ee3ae72ebfd19398cc1499796 (diff)
downloadlibkolab-dev/fix_generic_tag.tar.gz
Make libkolab compile with upstream kdepimlibsdev/fix_generic_tag
Because GENERIC tags have not entered upstream, we have to test for support. Our integration branch not supports a feature flag to indicate the availability of that feature. KOLAB: #4448
-rw-r--r--CMakeLists.txt5
-rw-r--r--kolabformat/kolabobject.cpp5
2 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 365edac..bd53e27 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,6 +78,11 @@ add_definitions( -DKDEPIMLIBS_VERSION_MAJOR=${KdepimLibs_VERSION_MAJOR} )
add_definitions( -DKDEPIMLIBS_VERSION_MINOR=${KdepimLibs_VERSION_MINOR} )
add_definitions( -DKDEPIMLIBS_VERSION_PATCH=${KdepimLibs_VERSION_PATCH} )
+#Tag::GENERIC is only available at the moment at the kolab/integration branches
+if (KDEPIMLIBS_HAS_GENERIC_TAG)
+ add_definitions( -DKDEPIMLIBS_HAS_GENERIC_TAG)
+endif()
+
if("${KdepimLibs_VERSION}" VERSION_GREATER "4.8.40" OR USE_LIBCALENDARING)
add_definitions(-DKDEPIMLIBS_VERSION_DEVEL)
endif()
diff --git a/kolabformat/kolabobject.cpp b/kolabformat/kolabobject.cpp
index 681b4a5..e5c404d 100644
--- a/kolabformat/kolabobject.cpp
+++ b/kolabformat/kolabobject.cpp
@@ -435,8 +435,11 @@ ObjectType KolabObjectReader::Private::readKolabV3(const KMime::Message::Ptr &ms
mTag = Akonadi::Tag();
mTag.setName(Conversion::fromStdString(relation.name()));
mTag.setGid(Conversion::fromStdString(configuration.uid()).toLatin1());
+#ifdef KDEPIMLIBS_HAS_GENERIC_TAG
mTag.setType(Akonadi::Tag::GENERIC);
-
+#else
+ mTag.setType(Akonadi::Tag::PLAIN);
+#endif
mTagMembers.reserve(relation.members().size());
foreach (const std::string &member, relation.members()) {
mTagMembers << Conversion::fromStdString(member);