summaryrefslogtreecommitdiffstats
path: root/src/assistant/help/qhelpcollectionhandler_p.h
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2018-05-30 16:34:15 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2018-06-05 09:25:40 +0000
commitc8e2e3d98c9fc84e0574385395df958f931d639d (patch)
tree6e892a590499d2d7c0863ba975b43e78dddb628d /src/assistant/help/qhelpcollectionhandler_p.h
parent4c57631f3093cd6817a13d3ba780c9411b9c679e (diff)
Detect doc version number and fix jumping to the proper doc
Add version-name metadata pair for the new documentation generated by qdoc. Use heuristics to detect version number when version inside metadata is not specified (applies to old docs). We do that only for qt documentation (we detect the qtproject prefix inside namespace). In order to match the proper namespace we compare the version numbers of the original location with the version number of the candidate list and pick up the matching one. Otherwise we behave like before. Task-number: QTBUG-59363 Change-Id: Id9f3d7d91e53647e2ad8d485d96888e80ce4f5b2 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/assistant/help/qhelpcollectionhandler_p.h')
-rw-r--r--src/assistant/help/qhelpcollectionhandler_p.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/assistant/help/qhelpcollectionhandler_p.h b/src/assistant/help/qhelpcollectionhandler_p.h
index 57b591a3d..e8cfe3474 100644
--- a/src/assistant/help/qhelpcollectionhandler_p.h
+++ b/src/assistant/help/qhelpcollectionhandler_p.h
@@ -134,6 +134,7 @@ public:
int registerNamespace(const QString &nspace, const QString &fileName);
int registerVirtualFolder(const QString &folderName, int namespaceId);
+ bool registerVersion(const QString &version, int namespaceId);
QMap<QString, QUrl> linksForIdentifier(const QString &id,
const QStringList &filterAttributes) const;
@@ -144,13 +145,14 @@ signals:
void error(const QString &msg) const;
private:
+ QString namespaceVersion(const QString &namespaceName) const;
QMap<QString, QUrl> linksForField(const QString &fieldName,
const QString &fieldValue,
const QStringList &filterAttributes) const;
bool isDBOpened() const;
bool createTables(QSqlQuery *query);
void closeDB();
- bool createIndexAndNamespaceFilterTables(QSqlQuery *query);
+ bool recreateIndexAndNamespaceFilterTables(QSqlQuery *query);
bool registerIndexAndNamespaceFilterTables(const QString &nameSpace);
bool registerFilterAttributes(const QList<QStringList> &attributeSets, int nsId);
bool registerFileAttributeSets(const QList<QStringList> &attributeSets, int nsId);