diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2019-04-03 20:21:53 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-12 12:59:17 +0300 |
commit | e3d43b5696d9aede430594fd4304d54d80bd7fac (patch) | |
tree | 48e04f247bb9e148c92075d584b1a86899af2713 /core | |
parent | d19cfec457da8c286a321dd17297237ad8fa8435 (diff) | |
download | subsurface-e3d43b5696d9aede430594fd4304d54d80bd7fac.tar.gz |
replace deprecated qSort() with std::sort()
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
Diffstat (limited to 'core')
-rw-r--r-- | core/downloadfromdcthread.cpp | 8 | ||||
-rw-r--r-- | core/qthelper.cpp | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/core/downloadfromdcthread.cpp b/core/downloadfromdcthread.cpp index e2db8b66e..03268a0f0 100644 --- a/core/downloadfromdcthread.cpp +++ b/core/downloadfromdcthread.cpp @@ -184,8 +184,10 @@ void fill_computer_list() descriptorLookup[QString(vendor) + QString(product)] = descriptor; } dc_iterator_free(iterator); - Q_FOREACH (QString vendor, vendorList) - qSort(productList[vendor]); + Q_FOREACH (QString vendor, vendorList) { + auto &l = productList[vendor]; + std::sort(l.begin(), l.end()); + } #if !defined(Q_OS_ANDROID) && !defined(Q_OS_IOS) /* currently suppress the Uemis Zurich on Q_OS_ANDROID and Q_OS_IOS, @@ -212,7 +214,7 @@ void fill_computer_list() descriptorLookup["UemisZurich"] = (dc_descriptor_t *)mydescriptor; #endif - qSort(vendorList); + std::sort(vendorList.begin(), vendorList.end()); } #define NUMTRANSPORTS 7 diff --git a/core/qthelper.cpp b/core/qthelper.cpp index b3bf23691..35965208c 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -394,7 +394,7 @@ void selectedDivesGasUsed(QVector<QPair<QString, int> > &gasUsedOrdered) Q_FOREACH(const QString& gas, gasUsed.keys()) { gasUsedOrdered.append(qMakePair(gas, gasUsed[gas])); } - qSort(gasUsedOrdered.begin(), gasUsedOrdered.end(), lessThan); + std::sort(gasUsedOrdered.begin(), gasUsedOrdered.end(), lessThan); } QString getUserAgent() |