diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-02-25 09:51:06 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-02-25 09:56:07 +0000 |
commit | 4cc0830f5adc6bfc892442a80339c701f156d6d9 (patch) | |
tree | ae8b2e6ec495ed919242ed17a1eb1bd86aa536a3 | |
parent | 0097ffe65c542c0f02d81a299db737e3606d99c0 (diff) |
pyrcc: Fix deprecation warnings appearing in 5.13
Use std::sort() instead of qSort(), fixing:
sources/pyside2-tools/pyrcc/rcc.cpp:502:68: warning: ‘void qSort(RandomAccessIterator, RandomAccessIterator, LessThan) [with RandomAccessIterator = QList<RCCFileInfo*>::iterator; LessThan = bool (*)(const RCCFileInfo*, const RCCFileInfo*)]’ is deprecated: Use std::sort [-Wdeprecated-declarations]
sources/pyside2-tools/pyrcc/rcc.cpp:521:68: warning: ‘void qSort(RandomAccessIterator, RandomAccessIterator, LessThan) [with RandomAccessIterator = QList<RCCFileInfo*>::iterator; LessThan = bool (*)(const RCCFileInfo*, const RCCFileInfo*)]’ is deprecated: Use std::sort [-Wdeprecated-declarations]
Change-Id: I557acb659dbd85ed91023fffdf88a2510cb539be
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r-- | pyrcc/rcc.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pyrcc/rcc.cpp b/pyrcc/rcc.cpp index aa7451e..927070e 100644 --- a/pyrcc/rcc.cpp +++ b/pyrcc/rcc.cpp @@ -37,6 +37,8 @@ #include <qdom.h> #include "rcc.h" +#include <algorithm> + static bool qt_rcc_write_number(FILE *out, quint32 number, int width) { int dividend = 1; @@ -499,7 +501,7 @@ RCCResourceLibrary::writeDataStructure(FILE *out) //sort by hash value for binary lookup QList<RCCFileInfo*> children = file->children.values(); - qSort(children.begin(), children.end(), qt_rcc_compare_hash); + std::sort(children.begin(), children.end(), qt_rcc_compare_hash); //write out the actual data now for(int i = 0; i < children.size(); ++i) { @@ -518,7 +520,7 @@ RCCResourceLibrary::writeDataStructure(FILE *out) //sort by hash value for binary lookup QList<RCCFileInfo*> children = file->children.values(); - qSort(children.begin(), children.end(), qt_rcc_compare_hash); + std::sort(children.begin(), children.end(), qt_rcc_compare_hash); //write out the actual data now for(int i = 0; i < children.size(); ++i) { |