Changeset View
Changeset View
Standalone View
Standalone View
src/contentlist/ContentListerBase.cpp
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | 46 | { | |||
---|---|---|---|---|---|
59 | if (data.hasAttribute("peruse.currentPage")) { | 59 | if (data.hasAttribute("peruse.currentPage")) { | ||
60 | int currentPage = data.attribute("peruse.currentPage").toInt(); | 60 | int currentPage = data.attribute("peruse.currentPage").toInt(); | ||
61 | metadata["currentPage"] = QVariant::fromValue<int>(currentPage); | 61 | metadata["currentPage"] = QVariant::fromValue<int>(currentPage); | ||
62 | } | 62 | } | ||
63 | if (data.hasAttribute("peruse.totalPages")) { | 63 | if (data.hasAttribute("peruse.totalPages")) { | ||
64 | int totalPages = data.attribute("peruse.totalPages").toInt(); | 64 | int totalPages = data.attribute("peruse.totalPages").toInt(); | ||
65 | metadata["totalPages"] = QVariant::fromValue<int>(totalPages); | 65 | metadata["totalPages"] = QVariant::fromValue<int>(totalPages); | ||
66 | } | 66 | } | ||
67 | if (!data.tags().isEmpty()) { | ||||
68 | metadata["tags"] = QVariant::fromValue<QStringList>(data.tags()); | ||||
69 | } | ||||
70 | if (!data.userComment().isEmpty()) { | ||||
71 | metadata["comment"] = QVariant::fromValue<QString>(data.userComment()); | ||||
72 | } | ||||
73 | metadata["rating"] = QVariant::fromValue<int>(data.rating()); | ||||
67 | 74 | | |||
68 | return metadata; | 75 | return metadata; | ||
69 | } | 76 | } |