mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Remove usage of deprecated qSort
This commit is contained in:
committed by
Mat Sutcliffe
parent
7bc20d45cf
commit
c82ff139fe
@@ -25,6 +25,8 @@
|
||||
#include <QMetaMethod>
|
||||
#include <QShortcut>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
using namespace BlackConfig;
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackGui;
|
||||
@@ -469,7 +471,7 @@ namespace BlackGui
|
||||
// if we'd know for sure the indexes are always sorted we can remove the sorting here
|
||||
// Qt docu selectedIndexes: Returns a list of all selected model item indexes. The list contains no duplicates, and is not sorted.
|
||||
QModelIndexList indexes = this->selectionModel()->selectedRows();
|
||||
qSort(indexes);
|
||||
std::sort(indexes.begin(), indexes.end());
|
||||
return indexes;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
#include <Qt>
|
||||
#include <QtGlobal>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
|
||||
namespace BlackMisc
|
||||
@@ -162,7 +164,7 @@ namespace BlackMisc
|
||||
|
||||
QString rows;
|
||||
QList<CommandHtmlHelp> cmds(s_commands);
|
||||
qSort(cmds.begin(), cmds.end(), CommandHtmlHelp::less);
|
||||
std::sort(cmds.begin(), cmds.end(), CommandHtmlHelp::less);
|
||||
|
||||
static const QString cmdCol(QString().fill('-', 20));
|
||||
static const QString textCol(QString().fill('-', 40));
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#include "blackmisc/directoryutils.h"
|
||||
#include "blackmisc/verify.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
namespace Simulation
|
||||
@@ -69,11 +71,11 @@ namespace BlackMisc
|
||||
// to HTML
|
||||
QString html("<table>\n");
|
||||
QStringList airlineIcaos = models.getAirlineVDesignators().toList();
|
||||
qSort(airlineIcaos);
|
||||
airlineIcaos.sort();
|
||||
airlineIcaos.push_front(colorLiveryDesignator);
|
||||
airlineIcaos.push_back(emptyDesignator);
|
||||
QStringList aircraftIcaos = modelsByDesignator.keys();
|
||||
qSort(aircraftIcaos);
|
||||
aircraftIcaos.sort();
|
||||
|
||||
// header
|
||||
html += "<thead><tr>\n";
|
||||
|
||||
Reference in New Issue
Block a user