Remove qSort from QtWidgets
QtAlgorithms is getting deprecated, see http://www.mail-archive.com/development@qt-project.org/msg01603.html Change-Id: Iec5c10fc4c3b4e684b51f6223bf3cb56acc42b58 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
This commit is contained in:
parent
c6d3fa1dcf
commit
a78699e7f3
@ -1669,7 +1669,7 @@ void QFileSystemModelPrivate::_q_directoryChanged(const QString &directory, cons
|
||||
return;
|
||||
QStringList toRemove;
|
||||
QStringList newFiles = files;
|
||||
qSort(newFiles.begin(), newFiles.end());
|
||||
std::sort(newFiles.begin(), newFiles.end());
|
||||
QHash<QString, QFileSystemNode*>::const_iterator i = parentNode->children.constBegin();
|
||||
while (i != parentNode->children.constEnd()) {
|
||||
QStringList::iterator iterator;
|
||||
@ -1874,7 +1874,7 @@ void QFileSystemModelPrivate::_q_fileSystemChanged(const QString &path, const QL
|
||||
}
|
||||
|
||||
// bundle up all of the changed signals into as few as possible.
|
||||
qSort(rowsToUpdate.begin(), rowsToUpdate.end());
|
||||
std::sort(rowsToUpdate.begin(), rowsToUpdate.end());
|
||||
QString min;
|
||||
QString max;
|
||||
for (int i = 0; i < rowsToUpdate.count(); ++i) {
|
||||
|
@ -93,6 +93,8 @@
|
||||
#include <QtCore/qpair.h>
|
||||
#include <QtGui/qmatrix.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QGraphicsItemAnimationPrivate
|
||||
@ -179,7 +181,7 @@ void QGraphicsItemAnimationPrivate::insertUniquePair(qreal step, qreal value, QL
|
||||
result->value = value;
|
||||
else {
|
||||
*binList << pair;
|
||||
qSort(binList->begin(), binList->end());
|
||||
std::sort(binList->begin(), binList->end());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -46,10 +46,10 @@
|
||||
#include "qwidget.h"
|
||||
|
||||
#include <qlist.h>
|
||||
#include <qalgorithms.h>
|
||||
|
||||
#include <qdebug.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
//#define QLAYOUT_EXTRA_DEBUG
|
||||
@ -134,7 +134,7 @@ void qGeomCalc(QVector<QLayoutStruct> &chain, int start, int count,
|
||||
for (i = start; i < start + count; i++)
|
||||
list << chain.at(i).minimumSize;
|
||||
|
||||
qSort(list);
|
||||
std::sort(list.begin(), list.end());
|
||||
|
||||
int space_left = space - sumSpacing;
|
||||
|
||||
|
@ -53,6 +53,7 @@
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
#include <algorithm>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -2337,7 +2338,7 @@ QDebug operator<<(QDebug debug, QStyle::State state)
|
||||
if (state & QStyle::State_Top) states << QLatin1String("Top");
|
||||
if (state & QStyle::State_UpArrow) states << QLatin1String("UpArrow");
|
||||
|
||||
qSort(states);
|
||||
std::sort(states.begin(), states.end());
|
||||
debug << states.join(QLatin1String(" | "));
|
||||
debug << ')';
|
||||
#else
|
||||
|
@ -72,6 +72,8 @@
|
||||
#include <qvarlengtharray.h>
|
||||
#include <qdebug.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
// Runtime resolved theme engine function calls
|
||||
@ -4306,7 +4308,7 @@ void QWindowsXPStylePrivate::showProperties(XPThemeData &themeData)
|
||||
}
|
||||
}
|
||||
}
|
||||
qSort(all_props);
|
||||
std::sort(all_props.begin(), all_props.end());
|
||||
|
||||
{// List all properties
|
||||
printf("part properties count = %d:\n", all_props.count());
|
||||
|
@ -52,6 +52,8 @@
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#define AUTO_REPEAT_DELAY 300
|
||||
@ -231,7 +233,7 @@ void QButtonGroup::addButton(QAbstractButton *button, int id)
|
||||
if (ids.isEmpty())
|
||||
d->mapping[button] = -2;
|
||||
else {
|
||||
qSort(ids);
|
||||
std::sort(ids.begin(), ids.end());
|
||||
d->mapping[button] = ids.first()-1;
|
||||
}
|
||||
} else {
|
||||
|
@ -178,6 +178,8 @@
|
||||
#include <qmath.h>
|
||||
#include <private/qlayoutengine_p.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace QMdi;
|
||||
@ -465,9 +467,9 @@ void MinOverlapPlacer::getCandidatePlacements(const QSize &size, const QList<QRe
|
||||
}
|
||||
|
||||
QList<int> xlist = xset.values();
|
||||
qSort(xlist.begin(), xlist.end());
|
||||
std::sort(xlist.begin(), xlist.end());
|
||||
QList<int> ylist = yset.values();
|
||||
qSort(ylist.begin(), ylist.end());
|
||||
std::sort(ylist.begin(), ylist.end());
|
||||
|
||||
foreach (int y, ylist)
|
||||
foreach (int x, xlist)
|
||||
|
Loading…
Reference in New Issue
Block a user