summaryrefslogtreecommitdiff
path: root/kolabformat/kolabobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kolabformat/kolabobject.cpp')
-rw-r--r--kolabformat/kolabobject.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/kolabformat/kolabobject.cpp b/kolabformat/kolabobject.cpp
index 4a9fc5e..9aed0b7 100644
--- a/kolabformat/kolabobject.cpp
+++ b/kolabformat/kolabobject.cpp
@@ -166,8 +166,10 @@ public:
Version mOverrideVersion;
bool mDoOverrideVersion;
-#ifdef HAVE_TAG_H
+#ifdef HAVE_RELATION_H
Akonadi::Relation mRelation;
+#endif
+#ifdef HAVE_TAG_H
Akonadi::Tag mTag;
QStringList mTagMembers;
#endif
@@ -428,6 +430,7 @@ ObjectType KolabObjectReader::Private::readKolabV3(const KMime::Message::Ptr &ms
mTagMembers << Conversion::fromStdString(member);
}
} else if (relation.type() == "generic") {
+#ifdef HAVE_RELATION_H
if (relation.members().size() == 2) {
mRelation = Akonadi::Relation();
mRelation.setRemoteId(Conversion::fromStdString(configuration.uid()).toLatin1());
@@ -438,6 +441,7 @@ ObjectType KolabObjectReader::Private::readKolabV3(const KMime::Message::Ptr &ms
Critical() << "generic relation had wrong number of members:" << relation.members().size();
printMessageDebugInfo(msg);
}
+#endif
} else {
Critical() << "unknown configuration object type" << relation.type();
printMessageDebugInfo(msg);
@@ -577,24 +581,26 @@ bool KolabObjectReader::isTag() const
return d->mTag.isValid();
}
-bool KolabObjectReader::isRelation() const
+Akonadi::Tag KolabObjectReader::getTag() const
{
- return d->mRelation.isValid();
+ return d->mTag;
}
-Akonadi::Relation KolabObjectReader::getRelation() const
+QStringList KolabObjectReader::getTagMembers() const
{
- return d->mRelation;
+ return d->mTagMembers;
}
+#endif
-Akonadi::Tag KolabObjectReader::getTag() const
+#ifdef HAVE_RELATION_H
+bool KolabObjectReader::isRelation() const
{
- return d->mTag;
+ return d->mRelation.isValid();
}
-QStringList KolabObjectReader::getTagMembers() const
+Akonadi::Relation KolabObjectReader::getRelation() const
{
- return d->mTagMembers;
+ return d->mRelation;
}
#endif