aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/compiler/qv4compileddata.cpp4
-rw-r--r--src/qml/compiler/qv4regalloc.cpp16
-rw-r--r--src/qml/compiler/qv4ssa.cpp5
-rw-r--r--src/qml/jsruntime/qv4debugging.cpp4
-rw-r--r--src/qml/jsruntime/qv4mm.cpp3
-rw-r--r--src/qml/jsruntime/qv4sequenceobject.cpp6
-rw-r--r--src/qml/qml/qqmlimport.cpp4
-rw-r--r--src/qml/qml/qqmlpropertycache.cpp5
-rw-r--r--src/qmltest/quicktestresult.cpp4
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp12
-rw-r--r--src/quick/util/qquicktimeline.cpp4
-rw-r--r--tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp4
-rw-r--r--tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp12
-rw-r--r--tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp3
-rw-r--r--tools/qmlplugindump/main.cpp3
-rw-r--r--tools/qmlprofiler/qmlprofilerdata.cpp6
16 files changed, 61 insertions, 34 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp
index efe9d70964..d4004ab7f7 100644
--- a/src/qml/compiler/qv4compileddata.cpp
+++ b/src/qml/compiler/qv4compileddata.cpp
@@ -48,6 +48,8 @@
#include <private/qv4regexpobject_p.h>
#include <private/qv4unwindhelper_p.h>
+#include <algorithm>
+
QT_BEGIN_NAMESPACE
namespace QV4 {
@@ -137,7 +139,7 @@ QV4::Function *CompilationUnit::linkToEngine(ExecutionEngine *engine)
#if 0
runtimeFunctionsSortedByAddress.resize(runtimeFunctions.size());
memcpy(runtimeFunctionsSortedByAddress.data(), runtimeFunctions.data(), runtimeFunctions.size() * sizeof(QV4::Function*));
- qSort(runtimeFunctionsSortedByAddress.begin(), runtimeFunctionsSortedByAddress.end(), functionSortHelper);
+ std::sort(runtimeFunctionsSortedByAddress.begin(), runtimeFunctionsSortedByAddress.end(), functionSortHelper);
#endif
return runtimeFunctions[data->indexOfRootFunction];
diff --git a/src/qml/compiler/qv4regalloc.cpp b/src/qml/compiler/qv4regalloc.cpp
index 3b0ea8b171..3fb0d22e66 100644
--- a/src/qml/compiler/qv4regalloc.cpp
+++ b/src/qml/compiler/qv4regalloc.cpp
@@ -41,6 +41,8 @@
#include "qv4regalloc_p.h"
+#include <algorithm>
+
//#define DEBUG_REGALLOC
namespace {
@@ -137,7 +139,7 @@ public:
qout << "RegAllocInfo:" << endl << "Defs/uses:" << endl;
QList<Temp> temps = _defs.keys();
- qSort(temps);
+ std::sort(temps.begin(), temps.end());
foreach (const Temp &t, temps) {
t.dump(qout);
qout << " def at " << _defs[t].defStmt << " ("
@@ -165,7 +167,7 @@ public:
QList<Temp> hinted = _hints.keys();
if (hinted.isEmpty())
qout << "\t(none)" << endl;
- qSort(hinted);
+ std::sort(hinted.begin(), hinted.end());
foreach (const Temp &t, hinted) {
qout << "\t";
t.dump(qout);
@@ -1127,7 +1129,7 @@ void RegisterAllocator::run(Function *function, const Optimizer &opt)
QTextStream qout(stdout, QIODevice::WriteOnly);
qout << "Ranges:" << endl;
QList<LifeTimeInterval> handled = _unhandled;
- qSort(handled.begin(), handled.end(), LifeTimeInterval::lessThanForTemp);
+ std::sort(handled.begin(), handled.end(), LifeTimeInterval::lessThanForTemp);
foreach (const LifeTimeInterval &r, handled) {
r.dump(qout);
qout << endl;
@@ -1150,7 +1152,7 @@ void RegisterAllocator::run(Function *function, const Optimizer &opt)
dump();
#endif // DEBUG_REGALLOC
- qSort(_handled.begin(), _handled.end(), LifeTimeInterval::lessThan);
+ std::sort(_handled.begin(), _handled.end(), LifeTimeInterval::lessThan);
ResolutionPhase(_handled, function, _info.data(), _assignedSpillSlots, _normalRegisters, _fpRegisters).run();
function->tempCount = QSet<int>::fromList(_assignedSpillSlots.values()).size();
@@ -1199,7 +1201,7 @@ void RegisterAllocator::prepareRanges()
if (_fixedFPRegisterRanges[fpReg].isValid())
_active.append(_fixedFPRegisterRanges[fpReg]);
- qSort(_active.begin(), _active.end(), LifeTimeInterval::lessThan);
+ std::sort(_active.begin(), _active.end(), LifeTimeInterval::lessThan);
}
void RegisterAllocator::linearScan()
@@ -1621,7 +1623,7 @@ void RegisterAllocator::dump() const
{
qout << "Ranges:" << endl;
QList<LifeTimeInterval> handled = _handled;
- qSort(handled.begin(), handled.end(), LifeTimeInterval::lessThanForTemp);
+ std::sort(handled.begin(), handled.end(), LifeTimeInterval::lessThanForTemp);
foreach (const LifeTimeInterval &r, handled) {
r.dump(qout);
qout << endl;
@@ -1633,7 +1635,7 @@ void RegisterAllocator::dump() const
QList<Temp> temps = _assignedSpillSlots.keys();
if (temps.isEmpty())
qout << "\t(none)" << endl;
- qSort(temps);
+ std::sort(temps.begin(), temps.end());
foreach (const Temp &t, temps) {
qout << "\t";
t.dump(qout);
diff --git a/src/qml/compiler/qv4ssa.cpp b/src/qml/compiler/qv4ssa.cpp
index 098f6eef10..541793f6ae 100644
--- a/src/qml/compiler/qv4ssa.cpp
+++ b/src/qml/compiler/qv4ssa.cpp
@@ -54,6 +54,7 @@
#include <cmath>
#include <iostream>
#include <cassert>
+#include <algorithm>
#ifdef CONST
#undef CONST
@@ -2576,7 +2577,7 @@ public:
range.setTemp(i.key());
_sortedRanges.append(range);
}
- qSort(_sortedRanges.begin(), _sortedRanges.end(), LifeTimeInterval::lessThan);
+ std::sort(_sortedRanges.begin(), _sortedRanges.end(), LifeTimeInterval::lessThan);
}
QList<LifeTimeInterval> ranges() const { return _sortedRanges; }
@@ -2593,7 +2594,7 @@ public:
foreach (BasicBlock *bb, _liveIn.keys()) {
qout << "L" << bb->index <<" live-in: ";
QList<Temp> live = QList<Temp>::fromSet(_liveIn.value(bb));
- qSort(live);
+ std::sort(live.begin(), live.end());
for (int i = 0; i < live.size(); ++i) {
if (i > 0) qout << ", ";
live[i].dump(qout);
diff --git a/src/qml/jsruntime/qv4debugging.cpp b/src/qml/jsruntime/qv4debugging.cpp
index 10f22a11b8..6879e432e8 100644
--- a/src/qml/jsruntime/qv4debugging.cpp
+++ b/src/qml/jsruntime/qv4debugging.cpp
@@ -46,6 +46,8 @@
#include "qv4instr_moth_p.h"
#include <iostream>
+#include <algorithm>
+
using namespace QV4;
using namespace QV4::Debugging;
@@ -331,7 +333,7 @@ void Debugger::BreakPoints::add(const QString &fileName, int lineNumber)
QList<int> &lines = (*this)[fileName];
if (!lines.contains(lineNumber)) {
lines.append(lineNumber);
- qSort(lines);
+ std::sort(lines.begin(), lines.end());
}
}
diff --git a/src/qml/jsruntime/qv4mm.cpp b/src/qml/jsruntime/qv4mm.cpp
index 874c349c42..67ae5d6888 100644
--- a/src/qml/jsruntime/qv4mm.cpp
+++ b/src/qml/jsruntime/qv4mm.cpp
@@ -55,6 +55,7 @@
#include <iostream>
#include <cstdlib>
+#include <algorithm>
#include "qv4alloca_p.h"
#ifdef V4_USE_VALGRIND
@@ -215,7 +216,7 @@ Managed *MemoryManager::alloc(std::size_t size)
allocation.memory = PageAllocation::allocate(allocSize, OSAllocator::JSGCHeapPages);
allocation.chunkSize = size;
m_d->heapChunks.append(allocation);
- qSort(m_d->heapChunks);
+ std::sort(m_d->heapChunks.begin(), m_d->heapChunks.end());
char *chunk = (char *)allocation.memory.base();
char *end = chunk + allocation.memory.size() - size;
memset(chunk, 0, allocation.memory.size());
diff --git a/src/qml/jsruntime/qv4sequenceobject.cpp b/src/qml/jsruntime/qv4sequenceobject.cpp
index d07277aa5d..058964969c 100644
--- a/src/qml/jsruntime/qv4sequenceobject.cpp
+++ b/src/qml/jsruntime/qv4sequenceobject.cpp
@@ -48,6 +48,8 @@
#include <private/qqmlengine_p.h>
#include <private/qv4scopedvalue_p.h>
+#include <algorithm>
+
QT_BEGIN_NAMESPACE
using namespace QV4;
@@ -376,10 +378,10 @@ public:
if (ctx->argumentCount == 1 && ctx->arguments[0].asFunctionObject()) {
QV4::Value compareFn = ctx->arguments[0];
CompareFunctor cf(ctx, compareFn);
- qSort(m_container.begin(), m_container.end(), cf);
+ std::sort(m_container.begin(), m_container.end(), cf);
} else {
DefaultCompareFunctor cf;
- qSort(m_container.begin(), m_container.end(), cf);
+ std::sort(m_container.begin(), m_container.end(), cf);
}
if (m_isReference)
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp
index 85c6a4246a..e970ffec59 100644
--- a/src/qml/qml/qqmlimport.cpp
+++ b/src/qml/qml/qqmlimport.cpp
@@ -56,6 +56,8 @@
#include <private/qqmlengine_p.h>
#include <private/qfieldlist_p.h>
+#include <algorithm>
+
QT_BEGIN_NAMESPACE
DEFINE_BOOL_CONFIG_OPTION(qmlImportTrace, QML_IMPORT_TRACE)
@@ -835,7 +837,7 @@ QString QQmlImportsPrivate::resolvedUri(const QString &dir_arg, QQmlImportDataba
dir.chop(1);
QStringList paths = database->fileImportPath;
- qSort(paths.begin(), paths.end(), I::greaterThan); // Ensure subdirs preceed their parents.
+ std::sort(paths.begin(), paths.end(), I::greaterThan); // Ensure subdirs preceed their parents.
QString stableRelativePath = dir;
foreach(const QString &path, paths) {
diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp
index a1385e06fc..e498ca5dee 100644
--- a/src/qml/qml/qqmlpropertycache.cpp
+++ b/src/qml/qml/qqmlpropertycache.cpp
@@ -56,6 +56,7 @@
#include <ctype.h> // for toupper
#include <limits.h>
+#include <algorithm>
#ifdef Q_CC_MSVC
// nonstandard extension used : zero-sized array in struct/union.
@@ -1507,8 +1508,8 @@ void QQmlPropertyCache::toMetaObjectBuilder(QMetaObjectBuilder &builder)
Q_ASSERT(properties.count() == propertyIndexCache.count());
Q_ASSERT(methods.count() == methodIndexCache.count());
- qSort(properties.begin(), properties.end(), Sort::lt);
- qSort(methods.begin(), methods.end(), Sort::lt);
+ std::sort(properties.begin(), properties.end(), Sort::lt);
+ std::sort(methods.begin(), methods.end(), Sort::lt);
for (int ii = 0; ii < properties.count(); ++ii) {
QQmlPropertyData *data = properties.at(ii).second;
diff --git a/src/qmltest/quicktestresult.cpp b/src/qmltest/quicktestresult.cpp
index 0385389628..67e80e7a0d 100644
--- a/src/qmltest/quicktestresult.cpp
+++ b/src/qmltest/quicktestresult.cpp
@@ -59,6 +59,8 @@
#include <QtGui/qvector3d.h>
#include <QtQml/private/qqmlglobal_p.h>
+#include <algorithm>
+
QT_BEGIN_NAMESPACE
static const char *globalProgramName = 0;
@@ -625,7 +627,7 @@ static QBenchmarkResult qMedian(const QList<QBenchmarkResult> &container)
return container.at(0);
QList<QBenchmarkResult> containerCopy = container;
- qSort(containerCopy);
+ std::sort(containerCopy.begin(), containerCopy.end());
const int middle = count / 2;
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index cf71489f88..e9d9249bf5 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -46,6 +46,8 @@
#include <QtGui/QGuiApplication>
#include <QtGui/QOpenGLFramebufferObject>
+#include <algorithm>
+
#ifndef GL_DOUBLE
#define GL_DOUBLE 0x140A
#endif
@@ -1256,9 +1258,9 @@ void Renderer::buildRenderListsForTaggedRoots()
qsg_addBackOrphanedElements(m_tmpAlphaElements, m_alphaRenderList);
if (m_opaqueRenderList.size())
- qSort(&m_opaqueRenderList.first(), &m_opaqueRenderList.last() + 1, qsg_sort_element_decreasing_order);
+ std::sort(&m_opaqueRenderList.first(), &m_opaqueRenderList.last() + 1, qsg_sort_element_decreasing_order);
if (m_alphaRenderList.size())
- qSort(&m_alphaRenderList.first(), &m_alphaRenderList.last() + 1, qsg_sort_element_increasing_order);
+ std::sort(&m_alphaRenderList.first(), &m_alphaRenderList.last() + 1, qsg_sort_element_increasing_order);
}
@@ -1284,7 +1286,7 @@ void Renderer::buildRenderListsFromScratch()
*/
void Renderer::cleanupBatches(QDataBuffer<Batch *> *batches) {
if (batches->size()) {
- qSort(&batches->first(), &batches->last() + 1, qsg_sort_batch_is_valid);
+ std::sort(&batches->first(), &batches->last() + 1, qsg_sort_batch_is_valid);
int count = 0;
while (count < batches->size() && batches->at(count)->first)
++count;
@@ -2149,11 +2151,11 @@ void Renderer::render()
// Then sort opaque batches so that we're drawing the batches with the highest
// order first, maximizing the benefit of front-to-back z-ordering.
if (m_opaqueBatches.size())
- qSort(&m_opaqueBatches.first(), &m_opaqueBatches.last() + 1, qsg_sort_batch_decreasing_order);
+ std::sort(&m_opaqueBatches.first(), &m_opaqueBatches.last() + 1, qsg_sort_batch_decreasing_order);
// Sort alpha batches back to front so that they render correctly.
if (m_alphaBatches.size())
- qSort(&m_alphaBatches.first(), &m_alphaBatches.last() + 1, qsg_sort_batch_increasing_order);
+ std::sort(&m_alphaBatches.first(), &m_alphaBatches.last() + 1, qsg_sort_batch_increasing_order);
m_zRange = 1.0 / (m_nextRenderOrder);
diff --git a/src/quick/util/qquicktimeline.cpp b/src/quick/util/qquicktimeline.cpp
index f1d7e19dc2..4667a5856c 100644
--- a/src/quick/util/qquicktimeline.cpp
+++ b/src/quick/util/qquicktimeline.cpp
@@ -51,6 +51,8 @@
#include <QTime>
#include <QtNumeric>
+#include <algorithm>
+
QT_BEGIN_NAMESPACE
struct Update {
@@ -808,7 +810,7 @@ int QQuickTimeLinePrivate::advance(int t)
length -= qMin(length, advanceTime);
syncPoint -= advanceTime;
- qSort(updates.begin(), updates.end());
+ std::sort(updates.begin(), updates.end());
updateQueue = &updates;
for (int ii = 0; ii < updates.count(); ++ii) {
const Update &v = updates.at(ii).second;
diff --git a/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp b/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp
index bf76c07970..634a6e5df1 100644
--- a/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp
+++ b/tests/auto/qml/qqmldirparser/tst_qqmldirparser.cpp
@@ -48,6 +48,8 @@
#include <private/qqmldirparser_p.h>
#include <QDebug>
+#include <algorithm>
+
// Test the parsing of qmldir files
class tst_qqmldirparser : public QQmlDataTest
@@ -104,7 +106,7 @@ namespace {
foreach (const QQmlDirParser::Component &c, components.values())
rv.append(toString(c));
- qSort(rv);
+ std::sort(rv.begin(), rv.end());
return rv;
}
diff --git a/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp b/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp
index 1f7a8029dc..12ae3c273f 100644
--- a/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp
+++ b/tests/auto/quick/qquickxmllistmodel/tst_qquickxmllistmodel.cpp
@@ -58,6 +58,8 @@
#include <QtQml/qqmlcomponent.h>
#include "../../../../src/imports/xmllistmodel/qqmlxmllistmodel_p.h"
+#include <algorithm>
+
typedef QPair<int, int> QQuickXmlListRange;
typedef QList<QVariantList> QQmlXmlModelData;
@@ -608,7 +610,7 @@ void tst_qquickxmllistmodel::useKeys()
}
QList<int> roles = model->roleNames().keys();
- qSort(roles);
+ std::sort(roles.begin(), roles.end());
for (int i=0; i<model->rowCount(); i++) {
QModelIndex index = model->index(i, 0);
for (int j=0; j<roles.count(); j++)
@@ -759,7 +761,7 @@ void tst_qquickxmllistmodel::noKeysValueChanges()
model->setProperty("xml",xml);
QList<int> roles = model->roleNames().keys();
- qSort(roles);
+ std::sort(roles.begin(), roles.end());
// wait for the new xml data to be set, and verify no signals were emitted
QTRY_VERIFY(model->data(model->index(0, 0), roles.at(2)).toString() != QLatin1String("Football"));
QCOMPARE(model->data(model->index(0, 0), roles.at(2)).toString(), QLatin1String("AussieRules"));
@@ -860,21 +862,21 @@ void tst_qquickxmllistmodel::threading()
for (int i=0; i<dataCount; i++) {
QModelIndex index = m1->index(i, 0);
QList<int> roles = m1->roleNames().keys();
- qSort(roles);
+ std::sort(roles.begin(), roles.end());
QCOMPARE(m1->data(index, roles.at(0)).toString(), QString("A" + QString::number(i)));
QCOMPARE(m1->data(index, roles.at(1)).toString(), QString("1" + QString::number(i)));
QCOMPARE(m1->data(index, roles.at(2)).toString(), QString("Football"));
index = m2->index(i, 0);
roles = m2->roleNames().keys();
- qSort(roles);
+ std::sort(roles.begin(), roles.end());
QCOMPARE(m2->data(index, roles.at(0)).toString(), QString("B" + QString::number(i)));
QCOMPARE(m2->data(index, roles.at(1)).toString(), QString("2" + QString::number(i)));
QCOMPARE(m2->data(index, roles.at(2)).toString(), QString("Athletics"));
index = m3->index(i, 0);
roles = m3->roleNames().keys();
- qSort(roles);
+ std::sort(roles.begin(), roles.end());
QCOMPARE(m3->data(index, roles.at(0)).toString(), QString("C" + QString::number(i)));
QCOMPARE(m3->data(index, roles.at(1)).toString(), QString("3" + QString::number(i)));
QCOMPARE(m3->data(index, roles.at(2)).toString(), QString("Curling"));
diff --git a/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp b/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp
index 74845ab954..cb0f44a03e 100644
--- a/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp
+++ b/tests/manual/scenegraph_lancelot/scenegraph/tst_scenegraph.cpp
@@ -47,6 +47,7 @@
#include <QtCore/QProcess>
#include <QtGui/QImage>
+#include <algorithm>
QString blockify(const QByteArray& s)
{
@@ -167,7 +168,7 @@ void tst_Scenegraph::setupTestSuite(const QByteArray& filter)
}
}
- qSort(itemFiles);
+ std::sort(itemFiles.begin(), itemFiles.end());
foreach (const QString &filePath, itemFiles) {
QByteArray itemName = filePath.mid(testSuitePath.length() + 1).toLatin1();
QBaselineTest::newRow(itemName, checksumFileOrDir(filePath)) << filePath;
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index 4337db1689..ead6392d7f 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -58,6 +58,7 @@
#include <QtCore/private/qmetaobject_p.h>
#include <iostream>
+#include <algorithm>
#include "qmlstreamwriter.h"
@@ -330,7 +331,7 @@ public:
// ensure exports are sorted and don't change order when the plugin is dumped again
QStringList exportStrings = exports.keys();
- qSort(exportStrings);
+ std::sort(exportStrings.begin(), exportStrings.end());
qml->writeArrayBinding(QLatin1String("exports"), exportStrings);
// write meta object revisions
diff --git a/tools/qmlprofiler/qmlprofilerdata.cpp b/tools/qmlprofiler/qmlprofilerdata.cpp
index 5d387d6234..038d2177f9 100644
--- a/tools/qmlprofiler/qmlprofilerdata.cpp
+++ b/tools/qmlprofiler/qmlprofilerdata.cpp
@@ -47,6 +47,8 @@
#include <QFile>
#include <QXmlStreamReader>
+#include <algorithm>
+
namespace Constants {
const char TYPE_PAINTING_STR[] = "Painting";
const char TYPE_COMPILING_STR[] = "Compiling";
@@ -437,9 +439,9 @@ void QmlProfilerData::sortStartTimes()
itFrom--;
if (itTo->startTime <= itFrom->startTime)
- qSort(itFrom, itTo + 1, compareStartTimes);
+ std::sort(itFrom, itTo + 1, compareStartTimes);
else
- qSort(itFrom + 1, itTo + 1, compareStartTimes);
+ std::sort(itFrom + 1, itTo + 1, compareStartTimes);
// move to next block
itTo = itFrom;