registry: Support docset keywords provided in metadata (fixes #604)

This commit is contained in:
Oleg Shparber 2016-11-16 03:45:22 -05:00
parent 6f322602f0
commit 7d48602bd0

View File

@ -31,6 +31,7 @@
#include <QDir>
#include <QFile>
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <QRegularExpression>
@ -366,6 +367,11 @@ void Docset::loadMetadata()
if (extra.contains(QStringLiteral("indexFilePath"))) {
m_indexFileUrl = createPageUrl(extra[QStringLiteral("indexFilePath")].toString());
}
if (extra.contains(QStringLiteral("keywords"))) {
for (const QJsonValue &kw : extra[QStringLiteral("keywords")].toArray())
m_keywords << kw.toString();
}
}
}