summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@nokia.com>2009-09-24 16:45:08 +0200
committerVolker Hilsheimer <volker.hilsheimer@nokia.com>2009-09-24 16:46:23 +0200
commit4d593220a8521c75821609560a3f7e09e28988c5 (patch)
tree1714532296f18c7caee8416fa7461dc769409203 /tools
parent82f4ac8fdb726caae69ba0b199b18baadfe57575 (diff)
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
Diffstat (limited to 'tools')
-rw-r--r--tools/qdoc3/htmlgenerator.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index f9d0ba2ea3..13e3b4d0e0 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)) {