diff options
| author | Topi Reinio <topi.reinio@digia.com> | 2014-10-21 10:22:45 +0200 |
|---|---|---|
| committer | Jani Heikkinen <jani.heikkinen@theqtcompany.com> | 2014-11-11 20:42:35 +0100 |
| commit | 1ad78f5f29ef00abae4f718265fa4bc0c35b60f9 (patch) | |
| tree | 00e0a8e87f02971c06747d651c49b920b9fc2ef9 /src/tools/qdoc/cppcodemarker.cpp | |
| parent | 9d38dbde7663a2de8186b32e222ce8fab9cf909d (diff) | |
qdoc: Prepare QDoc for the new style on qt.io
The new template and CSS have some requirements that need changes
in the generated .html:
- Generate a new div 'sidebar' and place the TOC (if one
exists) inside it, allowing the template to extend the
sidebar contents dynamically. Do this for all pages
except index.html.
- Change the DOCTYPE declaration to be html5-compliant
- Replace <tt> tags with <code> to be html5-compliant
- Add a new config variable HTML.prologue - this allows
the template to insert custom html into beginning of
the page, before the page title but after any navigation
or table-of-contents items.
- Wrap tables inside <div> elements. This allows for
better-working CSS design for small-screen devices.
- Write out extra parameters first when outputting
function synopsis to have better styling.
- Inject zero-width-space characters into function
names to allow the browser break up long function
signatures in a nice manner.
- Edit the CSS for the offline style to adapt to
above changes.
Task-number: QTBUG-42086
Change-Id: I3075cdc11bcb07a66150388519263fd721c8002b
Reviewed-by: Martin Smith <martin.smith@digia.com>
Diffstat (limited to 'src/tools/qdoc/cppcodemarker.cpp')
| -rw-r--r-- | src/tools/qdoc/cppcodemarker.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/qdoc/cppcodemarker.cpp b/src/tools/qdoc/cppcodemarker.cpp index 48218da5134..92b6ccca6af 100644 --- a/src/tools/qdoc/cppcodemarker.cpp +++ b/src/tools/qdoc/cppcodemarker.cpp @@ -136,7 +136,7 @@ QString CppCodeMarker::markedUpSynopsis(const Node *node, if ((style == Detailed) && !node->parent()->name().isEmpty() && (node->type() != Node::Property) && !node->isQmlNode()) - name.prepend(taggedNode(node->parent()) + "::"); + name.prepend(taggedNode(node->parent()) + "::​"); switch (node->type()) { case Node::Namespace: @@ -212,7 +212,7 @@ QString CppCodeMarker::markedUpSynopsis(const Node *node, bracketed += "slot"; } if (!bracketed.isEmpty()) - extra += " [" + bracketed.join(' ') + QLatin1Char(']'); + extra += QLatin1Char('[') + bracketed.join(' ') + QStringLiteral("] "); } break; case Node::Enum: @@ -283,13 +283,13 @@ QString CppCodeMarker::markedUpSynopsis(const Node *node, if (style == Summary) { if (node->status() == Node::Preliminary) { - extra += " (preliminary)"; + extra += "(preliminary) "; } else if (node->status() == Node::Deprecated) { - extra += " (deprecated)"; + extra += "(deprecated) "; } else if (node->status() == Node::Obsolete) { - extra += " (obsolete)"; + extra += "(obsolete) "; } } @@ -297,7 +297,7 @@ QString CppCodeMarker::markedUpSynopsis(const Node *node, extra.prepend("<@extra>"); extra.append("</@extra>"); } - return synopsis + extra; + return extra + synopsis; } /*! |
