summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2020-01-28 13:27:19 +0100
committerTopi Reinio <topi.reinio@qt.io>2020-01-29 23:40:22 +0100
commit01dbe9a348f09cfefc927d1de96d82afbd09f995 (patch)
tree4995b9bdd3965f74a12f227fd1652f3abe6fe38b
parent653884ab6988ea72fc0d5cc21675efcef67d0455 (diff)
qdoc: Do not sort nodes based on their address
QDoc generated different output for two consecutive runs because we were sorting nodes based on the addresses of node pointers. Use the existing comparison function for sorting nodes. This makes QDoc's output deterministic. Fixes: QTBUG-81712 Change-Id: I5e80c82d7582d76c4a3ac1e656f8480159d35240 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Levon Sargsyan <levon.sargsyan@qt.io>
-rw-r--r--src/qdoc/node.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qdoc/node.cpp b/src/qdoc/node.cpp
index 5415f14cd..3e43c5644 100644
--- a/src/qdoc/node.cpp
+++ b/src/qdoc/node.cpp
@@ -2213,7 +2213,7 @@ void Aggregate::normalizeOverloads()
const NodeList &Aggregate::nonfunctionList()
{
nonfunctionList_ = nonfunctionMap_.values();
- std::sort(nonfunctionList_.begin(), nonfunctionList_.end());
+ std::sort(nonfunctionList_.begin(), nonfunctionList_.end(), Node::nodeNameLessThan);
nonfunctionList_.erase(std::unique(nonfunctionList_.begin(), nonfunctionList_.end()),
nonfunctionList_.end());
return nonfunctionList_;