]> git.lyx.org Git - features.git/commit
Fix Qt deprecation warns for setAutoCompletion()
authorScott Kostyshak <skostysh@lyx.org>
Thu, 19 Mar 2020 01:00:09 +0000 (21:00 -0400)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:54 +0000 (15:48 +0200)
commiteed84455ececc708f3fd56b6fb71ce319d7c87e5
tree7779393337bc3940f8bac6849afcd61cc1e23ae4
parent4dc654811e16cac1964d5cc8973e4cc8c72c138d
Fix Qt deprecation warns for setAutoCompletion()

This commit fixes a few warnings from Qt 5.14 like the following
one:

  error: ‘void QComboBox::setAutoCompletion(bool)’ is deprecated: Use setCompleter() instead. [-Werror=deprecated-declarations]

We only generated setAutoCompletion() from setting the property in
the .ui files. There does not seem to be a .ui file property that
generates setCompleter(). However, the default in both Qt5 [1] and
Qt4 [2] is to enable case-insensitive autocompletion, which seems to
be the same type of autocompletion as when we were relying on
setAutoCompletion(true). Thus, we can remove the properties that set
autocomplete to true. There is only one file, SearchUi.ui, where we
were turning off the autocompletion; we now do so using
setCompleter(0) in GuiSearch::GuiSearch().

[1] https://doc.qt.io/qt-5/qcombobox.html#setCompleter
[2] https://doc.qt.io/archives/qt-4.8/qcombobox.html#setCompleter
src/frontends/qt/GuiSearch.cpp
src/frontends/qt/ui/BibtexUi.ui
src/frontends/qt/ui/ListingsUi.ui
src/frontends/qt/ui/SearchUi.ui
src/frontends/qt/ui/SendtoUi.ui
src/frontends/qt/ui/SpellcheckerUi.ui