diff options
4 files changed, 14 insertions, 7 deletions
diff --git a/src/qdoc/cppcodeparser.cpp b/src/qdoc/cppcodeparser.cpp index 6a5087583..c60957793 100644 --- a/src/qdoc/cppcodeparser.cpp +++ b/src/qdoc/cppcodeparser.cpp @@ -455,6 +455,7 @@ void CppCodeParser::processQmlProperties(const Doc &doc, NodeList &nodes, DocLis docs.append(doc); for (const auto n : sharedNodes) scn->append(n); + scn->sort(); } } @@ -947,6 +948,8 @@ void CppCodeParser::processTopicArgs(const Doc &doc, const QString &topic, NodeL } } } + for (auto *scn : sharedCommentNodes) + scn->sort(); } } } diff --git a/src/qdoc/node.h b/src/qdoc/node.h index 5a97d194a..739c262b4 100644 --- a/src/qdoc/node.h +++ b/src/qdoc/node.h @@ -952,6 +952,10 @@ public: n->setSharedCommentNode(this); setGenus(n->genus()); } + void sort() + { + std::sort(collective_.begin(), collective_.end(), Node::nodeNameLessThan); + } const QVector<Node *> &collective() const { return collective_; } void setOverloadFlags(); void setRelatedNonmember(bool b) override; diff --git a/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-type.html b/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-type.html index d4c278659..363a4bf16 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-type.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/qml-qdoc-test-type.html @@ -73,12 +73,12 @@ <div class="qmlitem"><div class="fngroup"> <div class="qmlproto"> <div class="table"><table class="qmlname"> -<tr valign="top" class="odd" id="fourth-prop"> -<td class="tblQmlPropNode"><p> -<span class="name">fourth</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr> <tr valign="top" class="odd" id="fifth-prop"> <td class="tblQmlPropNode"><p> <span class="name">fifth</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr> +<tr valign="top" class="odd" id="fourth-prop"> +<td class="tblQmlPropNode"><p> +<span class="name">fourth</span> : <span class="type"><a href="qml-int.html">int</a></span></p></td></tr> </table></div></div> </div><div class="qmldoc"><p>A group of properties sharing a documentation comment.</p> </div></div><!-- @@@ --> @@ -161,12 +161,12 @@ <div class="qmlitem"><div class="fngroup"> <div class="qmlproto"> <div class="table"><table class="qmlname"> -<tr valign="top" class="odd" id="enable-method"> -<td class="tblQmlFuncNode"><p> -<span class="name">enable</span>()</p></td></tr> <tr valign="top" class="odd" id="disable-method"> <td class="tblQmlFuncNode"><p> <span class="name">disable</span>()</p></td></tr> +<tr valign="top" class="odd" id="enable-method"> +<td class="tblQmlFuncNode"><p> +<span class="name">enable</span>()</p></td></tr> </table></div></div> </div><div class="qmldoc"><p>Enables or disables this type.</p> </div></div><!-- @@@ --> diff --git a/tests/auto/qdoc/generatedoutput/expected_output/qmlpropertygroups/qml-qdoc-test-anotherchild-members.html b/tests/auto/qdoc/generatedoutput/expected_output/qmlpropertygroups/qml-qdoc-test-anotherchild-members.html index 557061cc0..aa80b49df 100644 --- a/tests/auto/qdoc/generatedoutput/expected_output/qmlpropertygroups/qml-qdoc-test-anotherchild-members.html +++ b/tests/auto/qdoc/generatedoutput/expected_output/qmlpropertygroups/qml-qdoc-test-anotherchild-members.html @@ -15,9 +15,9 @@ <p>The following members are inherited from <a href="qml-qdoc-test-parent.html">Parent</a>.</p> <ul> <li class="fn"><b><b><a href="qml-qdoc-test-parent.html#group-prop">group</a></b></b><ul> -<li class="fn"><b><b><a href="qml-qdoc-test-parent.html#group.c-prop">group.c</a></b></b> : int</li> <li class="fn"><b><b><a href="qml-qdoc-test-parent.html#group.a-prop">group.a</a></b></b> : int</li> <li class="fn"><b><b><a href="qml-qdoc-test-parent.html#group.b-prop">group.b</a></b></b> : int</li> +<li class="fn"><b><b><a href="qml-qdoc-test-parent.html#group.c-prop">group.c</a></b></b> : int</li> </ul> </li> </ul> |