Commit e88e13d7 authored by Laurent Montel's avatar Laurent Montel 😁

Port qSort

parent 9240de6e
......@@ -365,7 +365,7 @@ void StoreCompactTest::testCompact()
// The order of items depends on the order of iteration of a QHash in MixedMaildirStore.
// This makes sure that the items are always sorted by collection and offset
qSort(items.begin(), items.end(),
std::sort(items.begin(), items.end(),
[](const Akonadi::Item & left, const Akonadi::Item & right) {
return left.parentCollection().remoteId().compare(right.parentCollection().remoteId()) < 0 ||
(left.parentCollection().remoteId() == right.parentCollection().remoteId() && changedOffset(left) < changedOffset(right));
......
......@@ -158,7 +158,7 @@ QByteArray O1::getRequestBase(const QList<O0RequestParameter> &oauthParams, cons
// Append a sorted+encoded list of all request parameters to the base string
QList<O0RequestParameter> headers(oauthParams);
headers.append(otherParams);
qSort(headers);
std::sort(headers.begin(), headers.end());
base.append(encodeHeaders(headers));
return base;
......@@ -180,7 +180,7 @@ QByteArray O1::buildAuthorizationHeader(const QList<O0RequestParameter> &oauthPa
bool first = true;
QByteArray ret("OAuth ");
QList<O0RequestParameter> headers(oauthParams);
qSort(headers);
std::sort(headers.begin(), headers.end());
for (const O0RequestParameter &h : qAsConst(headers)) {
if (first) {
first = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment