From cc1929d53abaefe5179dd8bb0f91fe2d4af02a86 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 14 May 2025 14:39:54 +0200 Subject: QDoc: Sort non-function nodes by name then erase duplicates The order of node information in index files could change between runs of QDoc. This appears to be due to the sorting method used before erasing duplicate non-function nodes. Task-number: QTBUG-136483 Change-Id: Ia58585c19e1c22172ee4c58c3ba054ec5d14a0d5 Pick-to: 6.9 Reviewed-by: Paul Wicking --- src/qdoc/qdoc/src/qdoc/aggregate.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/qdoc/qdoc/src/qdoc/aggregate.cpp b/src/qdoc/qdoc/src/qdoc/aggregate.cpp index ebdf881d5..0a1aa2606 100644 --- a/src/qdoc/qdoc/src/qdoc/aggregate.cpp +++ b/src/qdoc/qdoc/src/qdoc/aggregate.cpp @@ -303,13 +303,11 @@ void Aggregate::normalizeOverloads() const NodeList &Aggregate::nonfunctionList() { m_nonfunctionList = m_nonfunctionMap.values(); + // Sort based on node name + std::sort(m_nonfunctionList.begin(), m_nonfunctionList.end(), Node::nodeNameLessThan); // Erase duplicates - std::sort(m_nonfunctionList.begin(), m_nonfunctionList.end()); m_nonfunctionList.erase(std::unique(m_nonfunctionList.begin(), m_nonfunctionList.end()), m_nonfunctionList.end()); - - // Sort based on node name - std::sort(m_nonfunctionList.begin(), m_nonfunctionList.end(), Node::nodeNameLessThan); return m_nonfunctionList; } -- cgit v1.2.3