From 462904396454ed0ee931c2a8f2b02c8a6508965a Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Mon, 17 Oct 2016 16:20:40 +0300 Subject: QQmlImportsPrivate: remove homebrew 'greaterThan' Use std::greater Change-Id: I30554cd85b05e8c6ce13402d4b318751315cd0e6 Reviewed-by: Ulf Hermann --- src/qml/qml/qqmlimport.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/qml') 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 #include +#include 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()); // Ensure subdirs preceed their parents. QString stableRelativePath = dir; for (const QString &path : qAsConst(paths)) { -- cgit v1.2.3