Changeset View
Changeset View
Standalone View
Standalone View
src/jsonlddocument.cpp
Show All 16 Lines | 1 | /* | |||
---|---|---|---|---|---|
17 | 02110-1301, USA. | 17 | 02110-1301, USA. | ||
18 | */ | 18 | */ | ||
19 | 19 | | |||
20 | #include "jsonlddocument.h" | 20 | #include "jsonlddocument.h" | ||
21 | #include "jsonldimportfilter.h" | 21 | #include "jsonldimportfilter.h" | ||
22 | #include "logging.h" | 22 | #include "logging.h" | ||
23 | 23 | | |||
24 | #include <KItinerary/Action> | 24 | #include <KItinerary/Action> | ||
25 | #include <KItinerary/Brand> | ||||
25 | #include <KItinerary/BusTrip> | 26 | #include <KItinerary/BusTrip> | ||
26 | #include <KItinerary/Event> | 27 | #include <KItinerary/Event> | ||
27 | #include <KItinerary/Flight> | 28 | #include <KItinerary/Flight> | ||
28 | #include <KItinerary/Organization> | 29 | #include <KItinerary/Organization> | ||
29 | #include <KItinerary/Person> | 30 | #include <KItinerary/Person> | ||
30 | #include <KItinerary/Place> | 31 | #include <KItinerary/Place> | ||
31 | #include <KItinerary/Reservation> | 32 | #include <KItinerary/Reservation> | ||
32 | #include <KItinerary/RentalCar> | 33 | #include <KItinerary/RentalCar> | ||
▲ Show 20 Lines • Show All 124 Lines • ▼ Show 20 Line(s) | 157 | if (type == QLatin1String(#Class)) \ | |||
157 | return createInstance<Class>(obj) | 158 | return createInstance<Class>(obj) | ||
158 | 159 | | |||
159 | static QVariant createInstance(const QJsonObject &obj) | 160 | static QVariant createInstance(const QJsonObject &obj) | ||
160 | { | 161 | { | ||
161 | const auto type = obj.value(QLatin1String("@type")).toString(); | 162 | const auto type = obj.value(QLatin1String("@type")).toString(); | ||
162 | MAKE_FACTORY(Action); | 163 | MAKE_FACTORY(Action); | ||
163 | MAKE_FACTORY(Airline); | 164 | MAKE_FACTORY(Airline); | ||
164 | MAKE_FACTORY(Airport); | 165 | MAKE_FACTORY(Airport); | ||
166 | MAKE_FACTORY(Brand); | ||||
165 | MAKE_FACTORY(BusReservation); | 167 | MAKE_FACTORY(BusReservation); | ||
166 | MAKE_FACTORY(BusStation); | 168 | MAKE_FACTORY(BusStation); | ||
167 | MAKE_FACTORY(BusTrip); | 169 | MAKE_FACTORY(BusTrip); | ||
168 | MAKE_FACTORY(CancelAction); | 170 | MAKE_FACTORY(CancelAction); | ||
169 | MAKE_FACTORY(CheckInAction); | 171 | MAKE_FACTORY(CheckInAction); | ||
170 | MAKE_FACTORY(DownloadAction); | 172 | MAKE_FACTORY(DownloadAction); | ||
171 | MAKE_FACTORY(Event); | 173 | MAKE_FACTORY(Event); | ||
172 | MAKE_FACTORY(EventReservation); | 174 | MAKE_FACTORY(EventReservation); | ||
▲ Show 20 Lines • Show All 215 Lines • Show Last 20 Lines |