From 6621188515200d6c7001b17989e54bb9f59a43c2 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Tue, 24 Sep 2013 14:10:17 +0200 Subject: Doc: Restore QDoc's use of the \since -one argument: assume it is the Qt version -more than one argument: copy verbatim Task-number: QTBUG-32172 Change-Id: Iaf5ec538f23abf4d1dfdf50bffcbbdede56d0b22 Reviewed-by: Lars Knoll Reviewed-by: Martin Smith --- src/tools/qdoc/generator.cpp | 13 +++---------- src/tools/qdoc/htmlgenerator.cpp | 27 ++++++--------------------- 2 files changed, 9 insertions(+), 31 deletions(-) (limited to 'src/tools') diff --git a/src/tools/qdoc/generator.cpp b/src/tools/qdoc/generator.cpp index 0d4e563836..549b3a3918 100644 --- a/src/tools/qdoc/generator.cpp +++ b/src/tools/qdoc/generator.cpp @@ -1120,17 +1120,10 @@ void Generator::generateSince(const Node *node, CodeMarker *marker) QStringList since = node->since().split(QLatin1Char(' ')); if (since.count() == 1) { - // Handle legacy use of \since . - if (project.isEmpty()) - text << "version"; - else - text << Atom(Atom::Link, project) - << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) - << Atom(Atom::String, project) - << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); - text << " " << since[0]; + // If there is only one argument, assume it is the Qt version number. + text << " Qt " << since[0]; } else { - // Reconstruct the string. + // Otherwise, reconstruct the string. text << " " << since.join(' '); } diff --git a/src/tools/qdoc/htmlgenerator.cpp b/src/tools/qdoc/htmlgenerator.cpp index 4a6d5ea9a8..697955629e 100644 --- a/src/tools/qdoc/htmlgenerator.cpp +++ b/src/tools/qdoc/htmlgenerator.cpp @@ -1868,18 +1868,11 @@ void HtmlGenerator::generateRequisites(InnerNode *inner, CodeMarker *marker) text.clear(); QStringList since = inner->since().split(QLatin1Char(' ')); if (since.count() == 1) { - // Handle legacy use of \since . - if (project.isEmpty()) - text << "version"; - else - text << Atom(Atom::Link, project) - << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) - << Atom(Atom::String, project) - << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); - text << " " << since[0]; + // If there is only one argument, assume it is the Qt version number. + text << " Qt " << since[0]; } else { - // Reconstruct the string. + //Otherwise, reconstruct the string. text << " " << since.join(' '); } text << Atom::ParaRight; @@ -2016,19 +2009,11 @@ void HtmlGenerator::generateQmlRequisites(QmlClassNode *qcn, CodeMarker *marker) text.clear(); QStringList since = qcn->since().split(QLatin1Char(' ')); if (since.count() == 1) { - // Handle legacy use of \since . - if (project.isEmpty()) - text << "version"; - else - text << Atom(Atom::Link, project) - << Atom(Atom::FormattingLeft, ATOM_FORMATTING_LINK) - << Atom(Atom::String, project) - << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK); - - text << " " << since[0]; + // If there is only one argument, assume it is the Qt version number. + text << " Qt " << since[0]; } else { - // Reconstruct the string. + //Otherwise, reconstruct the string. text << " " << since.join(' '); } text << Atom::ParaRight; -- cgit v1.2.3