diff options
author | Kai Koehne <kai.koehne@qt.io> | 2020-11-17 14:38:18 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2020-11-24 07:53:37 +0000 |
commit | e2c263a1b980636b62dbfd2037e70ee665a0ad39 (patch) | |
tree | 1aaf0ba947a817891ae805bbfa4e7aa363ae21c6 | |
parent | 4fdc343817de03fcf32c6bc3fe2f6b7807150b33 (diff) |
qdoc: Fix example attributes being incorrectly applied
Once an example had an attribute associated - for instance isHighlighted
- all the other examples afterward got the attribute too.
This caused a (more or less) random list of examples to be highlighted
in Qt Creator.
Pick-to: 6.0 dev
Change-Id: Id09c232f56328d345deb9521651af40ecf750a36
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
-rw-r--r-- | src/qdoc/manifestwriter.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qdoc/generatedoutput/expected_output/examples-manifest.xml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/qdoc/manifestwriter.cpp b/src/qdoc/manifestwriter.cpp index 00a970a91..5c3b76e2f 100644 --- a/src/qdoc/manifestwriter.cpp +++ b/src/qdoc/manifestwriter.cpp @@ -217,8 +217,8 @@ void ManifestWriter::generateManifestFile(const QString &manifest, const QString writer.writeAttribute("module", m_project); writer.writeStartElement(manifest); - QMap<QString, QString> usedAttributes; for (const auto &example : exampleNodeMap.values()) { + QMap<QString, QString> usedAttributes; if (demos != example->name().startsWith("demos")) continue; m_tags.clear(); diff --git a/tests/auto/qdoc/generatedoutput/expected_output/examples-manifest.xml b/tests/auto/qdoc/generatedoutput/expected_output/examples-manifest.xml index f17fd0b79..4d8a61cfb 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/examples-manifest.xml +++ b/tests/auto/qdoc/generatedoutput/expected_output/examples-manifest.xml @@ -6,7 +6,7 @@ <tags>cmake,project,test</tags> <fileToOpen mainFile="true">test/cmaketest/main.cpp</fileToOpen> </example> - <example docUrl="qthelp://org.qt-project.test.001/test/test-componentset-example.html" imageUrl="qthelp://org.qt-project.test.001/test/images/leonardo-da-vinci.png" isTest="true" name="QML Documentation Example" projectPath="tutorials/componentset/componentset.pro"> + <example docUrl="qthelp://org.qt-project.test.001/test/test-componentset-example.html" isTest="true" name="QML Documentation Example" projectPath="tutorials/componentset/componentset.pro"> <description><![CDATA[Example for documenting QML types.]]></description> <tags>documentation,qml,sample,test</tags> <fileToOpen mainFile="true">tutorials/componentset/componentset.qml</fileToOpen> |