]> 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)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:53 +0000 (15:48 +0200)
commitf3f147f212a969720c701228ced96106deba8e7f
treedd49e2a9f8d32a4e17622a5a63b159c3e2c9c849
parentf245d7b24733e9aa5794034eef56ec8117d0349f
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