Changeset View
Changeset View
Standalone View
Standalone View
resources/kolab/pimkolab/kolabformat/mimeobject.cpp
Show All 21 Lines | |||||
22 | #include "conversion/kabcconversion.h" | 22 | #include "conversion/kabcconversion.h" | ||
23 | #include "conversion/commonconversion.h" | 23 | #include "conversion/commonconversion.h" | ||
24 | #include "kolabformat/kolabobject.h" | 24 | #include "kolabformat/kolabobject.h" | ||
25 | #include "kolabformat/xmlobject.h" | 25 | #include "kolabformat/xmlobject.h" | ||
26 | 26 | | |||
27 | #include "kolabformat/v2helpers.h" | 27 | #include "kolabformat/v2helpers.h" | ||
28 | #include "mime/mimeutils.h" | 28 | #include "mime/mimeutils.h" | ||
29 | #include "libkolab-version.h" | 29 | #include "libkolab-version.h" | ||
30 | #include "pimkolab_debug.h" | ||||
31 | | ||||
30 | #include <QString> | 32 | #include <QString> | ||
31 | #include <KRandom> | 33 | #include <KRandom> | ||
32 | #include <boost/algorithm/string/predicate.hpp> | 34 | #include <cstring> | ||
33 | #include "pimkolab_debug.h" | 35 | | ||
34 | Q_DECLARE_METATYPE(Kolab::Event) | 36 | Q_DECLARE_METATYPE(Kolab::Event) | ||
35 | Q_DECLARE_METATYPE(Kolab::Todo) | 37 | Q_DECLARE_METATYPE(Kolab::Todo) | ||
36 | Q_DECLARE_METATYPE(Kolab::Journal) | 38 | Q_DECLARE_METATYPE(Kolab::Journal) | ||
37 | Q_DECLARE_METATYPE(Kolab::Contact) | 39 | Q_DECLARE_METATYPE(Kolab::Contact) | ||
38 | Q_DECLARE_METATYPE(Kolab::DistList) | 40 | Q_DECLARE_METATYPE(Kolab::DistList) | ||
39 | Q_DECLARE_METATYPE(Kolab::Note) | 41 | Q_DECLARE_METATYPE(Kolab::Note) | ||
40 | Q_DECLARE_METATYPE(Kolab::Freebusy) | 42 | Q_DECLARE_METATYPE(Kolab::Freebusy) | ||
41 | Q_DECLARE_METATYPE(Kolab::Configuration) | 43 | Q_DECLARE_METATYPE(Kolab::Configuration) | ||
▲ Show 20 Lines • Show All 88 Lines • ▼ Show 20 Line(s) | 125 | { | |||
130 | } else if (type == contactKolabType()) { | 132 | } else if (type == contactKolabType()) { | ||
131 | return ContactObject; | 133 | return ContactObject; | ||
132 | } else if (type == distlistKolabType() || type == distlistKolabTypeCompat()) { | 134 | } else if (type == distlistKolabType() || type == distlistKolabTypeCompat()) { | ||
133 | return DistlistObject; | 135 | return DistlistObject; | ||
134 | } else if (type == noteKolabType()) { | 136 | } else if (type == noteKolabType()) { | ||
135 | return NoteObject; | 137 | return NoteObject; | ||
136 | } else if (type == freebusyKolabType()) { | 138 | } else if (type == freebusyKolabType()) { | ||
137 | return FreebusyObject; | 139 | return FreebusyObject; | ||
138 | } else if (boost::contains(type, dictKolabType())) { //Previous versions appended the language to the type | 140 | } else if (strstr(type.c_str(), KOLAB_TYPE_DICT)) { //Previous versions appended the language to the type | ||
139 | return DictionaryConfigurationObject; | 141 | return DictionaryConfigurationObject; | ||
140 | } else if (type == relationKolabType()) { | 142 | } else if (type == relationKolabType()) { | ||
141 | return RelationConfigurationObject; | 143 | return RelationConfigurationObject; | ||
142 | } | 144 | } | ||
143 | qCWarning(PIMKOLAB_LOG) <<"Unknown object type: " << type; | 145 | qCWarning(PIMKOLAB_LOG) <<"Unknown object type: " << type; | ||
144 | return Kolab::InvalidObject; | 146 | return Kolab::InvalidObject; | ||
145 | } | 147 | } | ||
146 | 148 | | |||
▲ Show 20 Lines • Show All 674 Lines • Show Last 20 Lines |