Changeset View
Changeset View
Standalone View
Standalone View
devel/qt5-qdoc/files/extrapatch-src_qdoc_qdocindexfiles.cpp
There is a bug [1] in the old gcc used on FreeBSD 9.3, which makes | There is a bug [1] in the old gcc used on FreeBSD 9.3, which makes | ||||
qdoc segfault on sorting while generating its index sections. | qdoc segfault on sorting while generating its index sections. | ||||
As mentioned in [2] by Michael Hansen, we can circument this by using | As mentioned in [2] by Michael Hansen, we can circument this by using | ||||
qSort instead of std::sort on FreeBSD 9.x. | qSort instead of std::sort on FreeBSD 9.x. | ||||
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59391 | [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59391 | ||||
[2] https://bugreports.qt.io/browse/QTBUG-43057 | [2] https://bugreports.qt.io/browse/QTBUG-43057 | ||||
--- src/qdoc/qdocindexfiles.cpp.orig 2016-10-02 07:52:39 UTC | --- src/qdoc/qdocindexfiles.cpp.orig 2016-10-09 21:13:42.831072000 +0200 | ||||
+++ src/qdoc/qdocindexfiles.cpp | +++ src/qdoc/qdocindexfiles.cpp 2016-10-09 21:13:56.153968000 +0200 | ||||
@@ -1476,7 +1476,7 @@ void QDocIndexFiles::generateIndexSectio | @@ -1412,7 +1412,7 @@ | ||||
const Aggregate* inner = static_cast<const Aggregate*>(node); | const Aggregate* inner = static_cast<const Aggregate*>(node); | ||||
NodeList cnodes = inner->childNodes(); | NodeList cnodes = inner->childNodes(); | ||||
- std::sort(cnodes.begin(), cnodes.end(), compareNodes); | - std::sort(cnodes.begin(), cnodes.end(), Node::nodeNameLessThan); | ||||
+ qSort(cnodes.begin(), cnodes.end(), compareNodes); | + qSort(cnodes.begin(), cnodes.end(), Node::nodeNameLessThan); | ||||
foreach (Node* child, cnodes) { | foreach (Node* child, cnodes) { | ||||
generateIndexSections(writer, child, generateInternalNodes); | generateIndexSections(writer, child, generateInternalNodes); |