diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-06-20 17:40:45 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-06-29 21:58:36 +0200 |
commit | ff2b2032a089d74975da4a3fac7c7c90989e6dc5 (patch) | |
tree | 2c2930d5e38fb3f94a936e5a0c8bc2c4e5259dbb /util | |
parent | fabf9239e0e6231f09d4a324bfe85ffcc529da3d (diff) |
Remove usages of deprecated APIs from QtAlgorithms
Task-number: QTBUG-76491
Change-Id: I9dab736a0cbd2e86588919640c26e8ce6b3674d0
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Diffstat (limited to 'util')
-rw-r--r-- | util/glgen/codegenerator.cpp | 2 | ||||
-rw-r--r-- | util/glgen/legacyspecparser.cpp | 2 | ||||
-rw-r--r-- | util/lexgen/generator.cpp | 6 | ||||
-rw-r--r-- | util/lexgen/nfa.cpp | 2 | ||||
-rw-r--r-- | util/unicode/codecs/big5/main.cpp | 4 | ||||
-rw-r--r-- | util/unicode/main.cpp | 4 |
6 files changed, 10 insertions, 10 deletions
diff --git a/util/glgen/codegenerator.cpp b/util/glgen/codegenerator.cpp index 4627daa48b..08327a62f5 100644 --- a/util/glgen/codegenerator.cpp +++ b/util/glgen/codegenerator.cpp @@ -184,7 +184,7 @@ void CodeGenerator::writeCoreFactoryImplementation(const QString &fileName) cons // Get the set of version functions classes we need to create QList<Version> versions = m_parser->versions(); - qSort(versions.begin(), versions.end(), qGreater<Version>()); + std::sort(m_versions.begin(), m_versions.end(), std::greater<Version>()); // Outout the #include statements stream << QStringLiteral("#if !defined(QT_OPENGL_ES_2)") << endl; diff --git a/util/glgen/legacyspecparser.cpp b/util/glgen/legacyspecparser.cpp index 0f4d085bba..ab2c9495e7 100644 --- a/util/glgen/legacyspecparser.cpp +++ b/util/glgen/legacyspecparser.cpp @@ -291,7 +291,7 @@ void LegacySpecParser::parseFunctions(QTextStream &stream) } m_versions = versions.toList(); - qSort(m_versions); + std::sort(m_versions.begin(), m_versions.end()); } bool LegacySpecParser::inDeprecationException(const QString &functionName) const diff --git a/util/lexgen/generator.cpp b/util/lexgen/generator.cpp index 481d586e73..3b966e025b 100644 --- a/util/lexgen/generator.cpp +++ b/util/lexgen/generator.cpp @@ -183,7 +183,7 @@ Generator::Generator(const DFA &_dfa, const Config &config) : dfa(_dfa), cfg(config) { QList<InputType> lst = cfg.maxInputSet.toList(); - qSort(lst); + std::sort(lst.begin(), lst.end()); minInput = lst.first(); maxInput = lst.last(); @@ -230,7 +230,7 @@ static QVector<Generator::TransitionSequence> convertToSequences(const Transitio return sequences; QList<InputType> keys = transitions.keys(); - qSort(keys); + std::sort(keys.begin(), keys.end()); int i = 0; Generator::TransitionSequence sequence; sequence.first = keys.at(0); @@ -359,7 +359,7 @@ void Generator::generateTransitions(CodeBlock &body, const TransitionMap &transi } } else { QList<InputType> keys = transitions.keys(); - qSort(keys); + std::sort(keys.begin(), keys.end()); body << "switch (ch.unicode()) {"; body.indent(); diff --git a/util/lexgen/nfa.cpp b/util/lexgen/nfa.cpp index 9047a17fde..f6e3a5c355 100644 --- a/util/lexgen/nfa.cpp +++ b/util/lexgen/nfa.cpp @@ -384,7 +384,7 @@ QSet<int> NFA::epsilonClosure(const QSet<int> &initialClosure) const QStack<int> stateStack; stateStack.resize(closure.count()); - qCopy(closure.constBegin(), closure.constEnd(), stateStack.begin()); + std::copy(closure.constBegin(), closure.constEnd(), stateStack.begin()); while (!stateStack.isEmpty()) { int t = stateStack.pop(); diff --git a/util/unicode/codecs/big5/main.cpp b/util/unicode/codecs/big5/main.cpp index 142db74ffd..54d3839755 100644 --- a/util/unicode/codecs/big5/main.cpp +++ b/util/unicode/codecs/big5/main.cpp @@ -128,7 +128,7 @@ int main(int argc, char **argv) list += QByteArray(" { 0x" + QByteArray::number(m.b5, 16) + ", 0x" + QByteArray::number(m.uc, 16) + " }\n");; } QByteArray ba; - qSort(list); + std::sort(list.begin(), list.end()); foreach(QByteArray a, list) ba += a; qDebug() << "struct B5Map b5_to_uc_map = {\n" << ba + "\n};"; @@ -138,7 +138,7 @@ int main(int argc, char **argv) if (!b5_ok.contains(m.uc)) list += QByteArray(" { 0x" + QByteArray::number(m.uc, 16) + ", 0x" + QByteArray::number(m.b5, 16) + " }\n");; ba = QByteArray(); - qSort(list); + std::sort(list.begin(), list.end());; foreach(QByteArray a, list) ba += a; qDebug() << "struct B5Map uc_to_b5_map = {\n" << ba + "\n};"; diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp index 8576f00e35..ec84667ee5 100644 --- a/util/unicode/main.cpp +++ b/util/unicode/main.cpp @@ -2832,7 +2832,7 @@ static QByteArray createLigatureInfo() QList<Ligature> l = ligatureHashes.value(uc); if (!l.isEmpty()) { Q_ASSERT(!QChar::requiresSurrogates(uc)); - qSort(l); // needed for bsearch in ligatureHelper code + std::sort(l.begin(), l.end()); // needed for bsearch in ligatureHelper code ligatures.append(l.size()); for (int j = 0; j < l.size(); ++j) { @@ -2864,7 +2864,7 @@ static QByteArray createLigatureInfo() QList<Ligature> l = ligatureHashes.value(uc); if (!l.isEmpty()) { Q_ASSERT(QChar::requiresSurrogates(uc)); - qSort(l); // needed for bsearch in ligatureHelper code + std::sort(l.begin(), l.end()); // needed for bsearch in ligatureHelper code ligatures.append(l.size()); for (int j = 0; j < l.size(); ++j) { |