aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-02-08 09:32:59 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-02-08 14:18:54 +0100
commit95e3b2c7256c71b274be5f16e216116e5876ee87 (patch)
treeae4e8c59bf63e643a386b82087196f19d9ec612c /sources/shiboken6
parent1e501c49bfa0832fd4a36903bc88a20f88565cf7 (diff)
shiboken6/Documentation: Fix the sorting of classes
Sort classes before writing the TOC. Apparently, the order was reversed by 7626f04ac855a56d4b364eac7b8350bdd561fef0. Pick-to: 6.0 Change-Id: I76c6326df8bd6b182cf617901bb4c37a0f443897 Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken6')
-rw-r--r--sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp b/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp
index 755ad8adb..dbd32d816 100644
--- a/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp
+++ b/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp
@@ -797,11 +797,7 @@ static void writeFancyToc(TextStream& s, const QStringList& items, int cols = 2)
QString currentColData;
int i = 0;
TextStream ss(&currentColData);
- QMutableMapIterator<QChar, QStringList> it(tocMap);
- while (it.hasNext()) {
- it.next();
- std::sort(it.value().begin(), it.value().end());
-
+ for (auto it = tocMap.cbegin(), end = tocMap.cend(); it != end; ++it) {
if (i)
ss << '\n';
@@ -846,6 +842,8 @@ void QtDocGenerator::writeModuleDocumentation()
{
QMap<QString, QStringList>::iterator it = m_packages.begin();
for (; it != m_packages.end(); ++it) {
+ std::sort(it.value().begin(), it.value().end());
+
QString key = it.key();
key.replace(QLatin1Char('.'), QLatin1Char('/'));
QString outputDir = outputDirectory() + QLatin1Char('/') + key;