lyx_mirror/src/frontends
Scott Kostyshak 14f369b47f Fix deprecation warnings from use of qSort()
This commit replaces qSort with std::sort to fix warnings from compiling with
Qt 5.14.1. Below is one of the warnings:

  error: ‘void qSort(RandomAccessIterator, RandomAccessIterator, LessThan) [with RandomAccessIterator = QList<lyx::ColorCode>::iterator; LessT$
  an = bool (*)(lyx::ColorCode, lyx::ColorCode)]’ is deprecated: Use std::sort [-Werror=deprecated-declarations]

qSort() has been deprecated since Qt 5.2. Quoting from the ChangeLog [1]:

  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

There are some cases that require more than just a trivial substitution, but
our code does not appear to use any of those cases.

For some discussion on the differences in speed of std::sort() and
qSort(), see the following:

  https://phabricator.kde.org/D10857

These are just warnings now, but will likely be errors with Qt 6:

  https://bugreports.qt.io/browse/QTBUG-73048

I tested that LyX can still be built against Qt 4.8.7 with this commit.

This commit follows 24926b2e, which also fixes some deprecation warnings.

[1]
https://code.qt.io/cgit/qt/qtbase.git/tree/dist/changes-5.2.0/?h=v5.2.0
2020-03-05 12:44:39 -05:00
..
qt Fix deprecation warnings from use of qSort() 2020-03-05 12:44:39 -05:00
tests Update to boost 1.72 2020-01-07 16:27:23 +01:00
.gitignore
alert.h Rename for clarity. 2019-05-12 23:16:25 -04:00
Application.h Rename frontend qt4 to qt 2019-07-20 23:39:40 +02:00
Clipboard.h
CMakeLists.txt Amend c293be56: Cmake part of 'Rename frontend qt4 to qt' 2019-07-21 00:44:17 +02:00
Delegates.h
FontLoader.h
FontMetrics.h Revert "Try to compute row height like it should be done" 2019-05-13 10:47:47 +02:00
KeyModifier.h
KeySymbol.h Do not use GUI language for shortcut info inset if no translation is available 2019-03-09 12:00:40 +01:00
Makefile.am Rename frontend qt4 to qt 2019-07-20 23:39:40 +02:00
mouse_state.h
NullPainter.h Mark insets with invalid buffer() in red in devel-mode. 2019-10-21 17:24:24 +02:00
Painter.h Mark insets with invalid buffer() in red in devel-mode. 2019-10-21 17:24:24 +02:00
Selection.h
WorkArea.h Fix comment 2017-10-25 12:16:16 +02:00
WorkAreaManager.cpp Compute metrics when graphics is updated 2017-09-14 15:50:30 +02:00
WorkAreaManager.h