Skip to content

Commit

Permalink
Qt6: qSort and qStableSort removed (#117)
Browse files Browse the repository at this point in the history
* replace qSort and qStableSort by 
std::stable_sort and std::sort
  • Loading branch information
jbowler authored and mrbean-bremen committed Nov 2, 2023
1 parent 89815e2 commit 93dcba0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions generator/generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
**
****************************************************************************/

#include <algorithm> // for std::stable_sort, std::sort
#include "generator.h"
#include "reporthandler.h"
#include "fileout.h"
Expand All @@ -61,7 +62,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 +86,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 93dcba0

Please sign in to comment.