aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2024-03-06 15:56:26 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2024-03-06 18:15:11 +0000
commitc063df86ffdbf95393b5f9ca9aab5d54b128a830 (patch)
treeff9d51a2782d392cac79a788c67d92ad0c91b0f4
parente72af74d4cd458a10a707ad6aa248fbcb661de0a (diff)
Documentation/TOC sorting: Also sort Qt functions by the 2nd character
This makes the function table of Qt Core look better. Amends fe62a95fe11cf2b4904fa09c57996089505a9438. Change-Id: I4f7440e2972feb924cdde187002d1520ecec8c7d Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> (cherry picked from commit d294f6c732c72f21673b23fcf01c50e2039c5b18) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp b/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp
index 252b576eb..676bab5eb 100644
--- a/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp
+++ b/sources/shiboken6/generator/qtdoc/qtdocgenerator.cpp
@@ -879,8 +879,8 @@ void QtDocGenerator::writeFunction(TextStream &s, const AbstractMetaClassCPtr &c
static QChar sortKey(const QString &key)
{
const auto size = key.size();
- if (size >= 2 && key.at(0) == u'Q' && key.at(1).isUpper())
- return key.at(1); // "QClass" -> 'C'
+ if (size >= 2 && (key.at(0) == u'Q' || key.at(0) == u'q') && key.at(1).isUpper())
+ return key.at(1); // "QClass" -> 'C', "qSin()" -> 'S'
if (size >= 3 && key.startsWith("Q_"_L1))
return key.at(2).toUpper(); // "Q_ARG" -> 'A'
if (size >= 4 && key.startsWith("QT_"_L1))