qSort()
has been deprecated since Qt 5.2. Quoting from the ChangeLog:
With STL no longer being optional for building and using Qt, a number
of parts of QtAlgorithms no longer make sense, and have therefore been
deprecated.
Replacements are available in the STL, and generally have much
better performance, but are not instantly source-compatible in all
cases. For instance, specialization of qLess or qSwap means that a
direct port to std::sort from qSort may not be possible, as
std::sort does not use any of them; a possible workaround is... [see
link for more info].
Note that as the ChangeLog mentions, there are cases where a trivial find/replace is not sufficient.
For some discussion on the differences in speed of std::sort()
and qSort()
, see here.
These are just warnings now, but will likely be errors with Qt 6.