]> git.lyx.org Git - features.git/commit
Fix Qt deprecation warn for QList::fromSet()
authorScott Kostyshak <skostysh@lyx.org>
Sat, 7 Mar 2020 02:04:15 +0000 (21:04 -0500)
committerScott Kostyshak <skostysh@lyx.org>
Sat, 7 Mar 2020 03:36:12 +0000 (22:36 -0500)
commit690c671b1d74aea566f7b4c952059afef2d4904a
tree56045db387d117a7ab1b954f47547e49b42781e5
parent5e21a8fbf78babfb69d3e9f236cfe6aaffd1c465
Fix Qt deprecation warn for QList::fromSet()

Fix the following warning from Qt 5.14.1:

  error: ‘static QList<T> QList<T>::fromSet(const QSet<T>&) [with T = QString]’ is deprecated: Use QList<T>(set.begin(), set.end()) instead. [-Werror=deprecated-declarations]

Regarding QList::fromSet(), the documentation now states the
following [1]:

  Since Qt 5.14, range constructors are available for Qt's generic
  container classes and should be used in place of this method.

[1] https://doc.qt.io/qt-5/qlist.html
src/frontends/qt/qt_helpers.cpp