From 4d593220a8521c75821609560a3f7e09e28988c5 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Thu, 24 Sep 2009 16:45:08 +0200 Subject: qdoc: test only for major and minor version when generating "since" lists. This solution might need a bit of more thinking, the "\sincelist" command might need a parameter so that we can have the "new since 4.6" list also in Qt 4.7 documentation. Rev-by: TrustMe --- tools/qdoc3/htmlgenerator.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index f9d0ba2..13e3b4d 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -3519,6 +3519,11 @@ void HtmlGenerator::findAllClasses(const InnerNode *node) */ void HtmlGenerator::findAllSince(const InnerNode *node, QString version) { + const QRegExp versionSeparator("[\\-\\.]"); + const int minorIndex = version.indexOf(versionSeparator); + const int patchIndex = version.indexOf(versionSeparator, minorIndex+1); + version = version.left(patchIndex); + NodeList::const_iterator c = node->childNodes().constBegin(); while (c != node->childNodes().constEnd()) { if (((*c)->access() != Node::Private) && ((*c)->since() == version)) { -- cgit v0.12