]> git.lyx.org Git - lyx.git/commit
Fix a few deprecation warnings in Qt 5.14.1
authorScott Kostyshak <skostysh@lyx.org>
Thu, 5 Mar 2020 16:11:09 +0000 (11:11 -0500)
committerScott Kostyshak <skostysh@lyx.org>
Thu, 5 Mar 2020 16:12:31 +0000 (11:12 -0500)
commit24926b2e2399624ca6a1290349e9070a0d880dee
treea018f76bbf2845321324d4d9f3f02ca9c850bd00
parentc1357cbd01e6abbd7b3dcfe5e97f78d738843776
Fix a few deprecation warnings in Qt 5.14.1

These changes fix a few instances of the following type of warning:

  error: ‘void QListWidget::setItemSelected(const QListWidgetItem*, bool)’ is deprecated: Use QListWidgetItem::setSelected() instead [-Werror=deprecated-declarations]

as well as similar warnings for setItemHidden() and
setItemExpanded(). These are just warnings now, but it is planned to
remove the methods for 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. Indeed, these methods have been deprecated for a while (it
is just that QT_DEPRECATED_WARNINGS was only turned on by default
starting with 5.13.0). See, e.g.,

  https://doc.qt.io/archives/qt-4.7/qlistwidget-obsolete.html
src/frontends/qt/BulletsModule.cpp
src/frontends/qt/GuiBranches.cpp
src/frontends/qt/GuiIndices.cpp
src/frontends/qt/GuiPrefs.cpp
src/frontends/qt/GuiRef.cpp