summaryrefslogtreecommitdiff
path: root/tools/xmlpatterns/qapplicationargumentparser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/xmlpatterns/qapplicationargumentparser.cpp')
-rw-r--r--tools/xmlpatterns/qapplicationargumentparser.cpp23
1 files changed, 4 insertions, 19 deletions
diff --git a/tools/xmlpatterns/qapplicationargumentparser.cpp b/tools/xmlpatterns/qapplicationargumentparser.cpp
index f441b93..8aaae31 100644
--- a/tools/xmlpatterns/qapplicationargumentparser.cpp
+++ b/tools/xmlpatterns/qapplicationargumentparser.cpp
@@ -40,6 +40,8 @@
#include "qapplicationargumentparser_p.h"
+#include <algorithm>
+
QT_BEGIN_NAMESPACE
/*!
@@ -291,23 +293,6 @@ void QApplicationArgumentParserPrivate::displayVersion() const
<< endl;
}
-/*!
- \internal
- \relates QApplicationArgument
-
- qLess() functor for QApplicationArgument that considers the name.
- */
-template<>
-class qLess <QApplicationArgument>
-{
-public:
- inline bool operator()(const QApplicationArgument &o1,
- const QApplicationArgument &o2) const
- {
- return o1.name().compare(o2.name()) < 0;
- }
-};
-
void QApplicationArgumentParserPrivate::displayHelp() const
{
enum Constants
@@ -334,7 +319,7 @@ void QApplicationArgumentParserPrivate::displayHelp() const
/* Sort them, such that we get the nameless options at the end, and it
* generally looks tidy. */
- qSort(args);
+ std::sort(args.begin(), args.end());
/* This is the basic approach:
* Switches:
@@ -353,7 +338,7 @@ void QApplicationArgumentParserPrivate::displayHelp() const
int maxWidth = 0;
QList<QApplicationArgument> nameless(declaredNamelessArguments);
- qSort(nameless);
+ std::sort(nameless.begin(), nameless.end());
/* Note, here the nameless arguments appear last, but are sorted
* with themselves. */