diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2013-09-12 11:06:59 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-13 01:10:37 +0200 |
commit | 4df73e62a70b73d955ab53faef4615ea03a21a4d (patch) | |
tree | 00acf9163a0447da03298659bc47d2de9da509f7 /tools | |
parent | c1821de0e6ef21f86623572fd54f5cc5451b6077 (diff) |
Remove qSort usages from declarative
QtAlgorithms is getting deprecated,
see http://www.mail-archive.com/development@qt-project.org/msg01603.html
Change-Id: I8fa7d0186cc8f0ba562695974829e37f1eb87f2f
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmlplugindump/main.cpp | 3 | ||||
-rw-r--r-- | tools/qmlprofiler/qmlprofilerdata.cpp | 6 |
2 files changed, 6 insertions, 3 deletions
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; |