Skip to content

Commit

Permalink
Qt6: qSort and qStableSort removed
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jbowler committed Oct 3, 2023
1 parent 6793f36 commit bb84f04
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generator/generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void Generator::generate()
return;
}

qStableSort(m_classes);
std::stable_sort(m_classes.begin(), m_classes.end());

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

AbstractMetaClassList classes = m_classes;
qSort(classes);
std::sort(classes.begin(), classes.end());

foreach (AbstractMetaClass *cls, classes) {
if (!shouldGenerate(cls))
Expand Down

0 comments on commit bb84f04

Please sign in to comment.