aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlimport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlimport.cpp')
-rw-r--r--src/qml/qml/qqmlimport.cpp7
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)) {