diff options
author | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-10-17 16:20:40 +0300 |
---|---|---|
committer | Anton Kudryavtsev <antkudr@mail.ru> | 2016-10-27 18:46:49 +0000 |
commit | 462904396454ed0ee931c2a8f2b02c8a6508965a (patch) | |
tree | 163e4b65a0c4d56c3d1f737af5c1de6dca55abca /src/qml/qml/qqmlimport.cpp | |
parent | 3e016891b2870374e7093ad150a08d1d4a27bccc (diff) |
QQmlImportsPrivate: remove homebrew 'greaterThan'
Use std::greater
Change-Id: I30554cd85b05e8c6ce13402d4b318751315cd0e6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlimport.cpp')
-rw-r--r-- | src/qml/qml/qqmlimport.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp index 4c5179dc75..4ded0f93bb 100644 --- a/src/qml/qml/qqmlimport.cpp +++ b/src/qml/qml/qqmlimport.cpp @@ -57,6 +57,7 @@ #include <QtCore/qjsonarray.h> #include <algorithm> +#include <functional> QT_BEGIN_NAMESPACE @@ -1123,17 +1124,13 @@ bool QQmlImportsPrivate::getQmldirContent(const QString &qmldirIdentifier, const QString QQmlImportsPrivate::resolvedUri(const QString &dir_arg, QQmlImportDatabase *database) { - struct I { static bool greaterThan(const QString &s1, const QString &s2) { - return s1 > s2; - } }; - QString dir = dir_arg; if (dir.endsWith(Slash) || dir.endsWith(Backslash)) dir.chop(1); QStringList paths = database->fileImportPath; if (!paths.isEmpty()) - std::sort(paths.begin(), paths.end(), I::greaterThan); // Ensure subdirs preceed their parents. + std::sort(paths.begin(), paths.end(), std::greater<QString>()); // Ensure subdirs preceed their parents. QString stableRelativePath = dir; for (const QString &path : qAsConst(paths)) { |