Skip to content

Commit bb84f04

Browse files
committed
Qt6: qSort and qStableSort removed
The suggested replacements are std::stable_sort and std::sort which work (compile) in both Qt5 (5.15LTS) and Qt6. Signed-off-by: John Bowler <jbowler@acm.org>
1 parent 6793f36 commit bb84f04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

generator/generator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void Generator::generate()
6161
return;
6262
}
6363

64-
qStableSort(m_classes);
64+
std::stable_sort(m_classes.begin(), m_classes.end());
6565

6666
foreach (AbstractMetaClass *cls, m_classes) {
6767
if (!shouldGenerate(cls))
@@ -85,7 +85,7 @@ void Generator::printClasses()
8585
QTextStream s(stdout);
8686

8787
AbstractMetaClassList classes = m_classes;
88-
qSort(classes);
88+
std::sort(classes.begin(), classes.end());
8989

9090
foreach (AbstractMetaClass *cls, classes) {
9191
if (!shouldGenerate(cls))

0 commit comments

Comments
 (0)