aboutsummaryrefslogtreecommitdiff
path: root/lib/bookmarks
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bookmarks')
-rw-r--r--lib/bookmarks/formats/ffjson.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/bookmarks/formats/ffjson.cpp b/lib/bookmarks/formats/ffjson.cpp
index 98f8e60..1fe6a96 100644
--- a/lib/bookmarks/formats/ffjson.cpp
+++ b/lib/bookmarks/formats/ffjson.cpp
@@ -25,6 +25,19 @@ inline void readElementData(const QJsonObject &object, BookmarkItem *item)
item->setData(BookmarkItem::Title, object["title"].toString());
item->setData(BookmarkItem::DateAdded, asDate(object["dateAdded"]));
item->setData(BookmarkItem::LastModified, asDate(object["lastModified"]));
+
+ // tags
+ const auto tags = object["tags"].toString().split(",");
+ if(!tags.isEmpty())
+ item->setData(BookmarkItem::Tags, tags);
+
+ // descriptions
+ for(const auto &a : object["annos"].toArray()) {
+ const auto anno = a.toObject();
+ if(anno["name"] == "bookmarkProperties/description") {
+ item->setData(BookmarkItem::Description, anno["value"].toString());
+ }
+ }
}
void readChildElements(const QJsonObject &object, BookmarkItem *item)