diff options
| author | Jonah BrĂ¼chert <jbb.prv@gmx.de> | 2019-05-14 13:10:31 +0000 |
|---|---|---|
| committer | LNJ <lnj@kaidan.im> | 2019-09-03 16:10:51 +0200 |
| commit | be4aee23a4ce3e6791a4a46651e714e74b287def (patch) | |
| tree | b9f2e356cba9f4157edb26726548c4bf68dd5c48 /src | |
| parent | e6eb0b78d0cb17fccd5ddb60966ba2a0a2d2b593 (diff) | |
| download | qxmpp-be4aee23a4ce3e6791a4a46651e714e74b287def.tar.gz | |
Port deprecated qSort invocations to std::sort
Diffstat (limited to 'src')
| -rw-r--r-- | src/base/QXmppDiscoveryIq.cpp | 6 | ||||
| -rw-r--r-- | src/base/QXmppJingleIq.cpp | 2 | ||||
| -rw-r--r-- | src/base/QXmppStun.cpp | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/base/QXmppDiscoveryIq.cpp b/src/base/QXmppDiscoveryIq.cpp index 2f8af810..98fa195e 100644 --- a/src/base/QXmppDiscoveryIq.cpp +++ b/src/base/QXmppDiscoveryIq.cpp @@ -199,9 +199,9 @@ QByteArray QXmppDiscoveryIq::verificationString() const { QString S; QList<QXmppDiscoveryIq::Identity> sortedIdentities = m_identities; - qSort(sortedIdentities.begin(), sortedIdentities.end(), identityLessThan); + std::sort(sortedIdentities.begin(), sortedIdentities.end(), identityLessThan); QStringList sortedFeatures = m_features; - qSort(sortedFeatures); + std::sort(sortedFeatures.begin(), sortedFeatures.end()); sortedFeatures.removeDuplicates(); foreach (const QXmppDiscoveryIq::Identity &identity, sortedIdentities) S += QString("%1/%2/%3/%4<").arg(identity.category(), identity.type(), identity.language(), identity.name()); @@ -219,7 +219,7 @@ QByteArray QXmppDiscoveryIq::verificationString() const S += field.value().toString() + QLatin1String("<"); QStringList keys = fieldMap.keys(); - qSort(keys); + std::sort(keys.begin(), keys.end()); foreach (const QString &key, keys) { const QXmppDataForm::Field field = fieldMap.value(key); S += key + QLatin1String("<"); diff --git a/src/base/QXmppJingleIq.cpp b/src/base/QXmppJingleIq.cpp index c652887e..4fcd5bec 100644 --- a/src/base/QXmppJingleIq.cpp +++ b/src/base/QXmppJingleIq.cpp @@ -576,7 +576,7 @@ QString QXmppJingleIq::Content::toSdp() const QHostAddress localRtpAddress = QHostAddress::Any; quint16 localRtpPort = 0; QList<QXmppJingleCandidate> sortedCandidates = d->transportCandidates; - qSort(sortedCandidates.begin(), sortedCandidates.end(), candidateLessThan); + std::sort(sortedCandidates.begin(), sortedCandidates.end(), candidateLessThan); foreach (const QXmppJingleCandidate &candidate, sortedCandidates) { if (candidate.component() == RTP_COMPONENT) { localRtpAddress = candidate.host(); diff --git a/src/base/QXmppStun.cpp b/src/base/QXmppStun.cpp index 7ab90c8b..7b8a8ad3 100644 --- a/src/base/QXmppStun.cpp +++ b/src/base/QXmppStun.cpp @@ -1834,7 +1834,7 @@ bool QXmppIceComponentPrivate::addRemoteCandidate(const QXmppJingleCandidate &ca fallbackPair = pair; } - qSort(pairs.begin(), pairs.end(), candidatePairPtrLessThan); + std::sort(pairs.begin(), pairs.end(), candidatePairPtrLessThan); return true; } @@ -2184,7 +2184,7 @@ void QXmppIceComponent::handleDatagram(const QByteArray &buffer, const QHostAddr pair->transport = transport; d->pairs << pair; - qSort(d->pairs.begin(), d->pairs.end(), candidatePairPtrLessThan); + std::sort(d->pairs.begin(), d->pairs.end(), candidatePairPtrLessThan); } switch (pair->state()) { @@ -2621,7 +2621,7 @@ bool QXmppIceConnection::bind(const QList<QHostAddress> &addresses) // assign sockets QList<int> keys = d->components.keys(); - qSort(keys); + std::sort(keys.begin(), keys.end()); int s = 0; foreach (int k, keys) { d->components[k]->d->setSockets(sockets.mid(s, addresses.size())); |
