mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
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
(manually cherry picked from commit 27ba830b8e
)
This commit is contained in:
parent
847312daea
commit
0f17c6a98f
@ -62,6 +62,9 @@ GuiSearch::GuiSearch(GuiView & lv)
|
||||
bc().addReadOnly(replacePB);
|
||||
bc().addReadOnly(replaceallPB);
|
||||
|
||||
findCO->setCompleter(0);
|
||||
replaceCO->setCompleter(0);
|
||||
|
||||
replacePB->setEnabled(false);
|
||||
replaceallPB->setEnabled(false);
|
||||
}
|
||||
|
@ -135,9 +135,6 @@
|
||||
<property name="editable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoCompletion">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="duplicatesEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
@ -171,9 +171,6 @@
|
||||
<property name="editable" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="autoCompletion" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="duplicatesEnabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -217,9 +214,6 @@
|
||||
<property name="editable" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="autoCompletion" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="duplicatesEnabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -254,9 +248,6 @@
|
||||
<property name="editable" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="autoCompletion" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="duplicatesEnabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
@ -52,9 +52,6 @@
|
||||
<property name="insertPolicy">
|
||||
<enum>QComboBox::InsertAtTop</enum>
|
||||
</property>
|
||||
<property name="autoCompletion">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="duplicatesEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -87,9 +84,6 @@
|
||||
<property name="insertPolicy">
|
||||
<enum>QComboBox::InsertAtTop</enum>
|
||||
</property>
|
||||
<property name="autoCompletion">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="duplicatesEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
@ -50,9 +50,6 @@
|
||||
<property name="insertPolicy" >
|
||||
<enum>QComboBox::NoInsert</enum>
|
||||
</property>
|
||||
<property name="autoCompletion" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="duplicatesEnabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
@ -110,9 +110,6 @@
|
||||
<property name="insertPolicy" >
|
||||
<enum>QComboBox::InsertAtTop</enum>
|
||||
</property>
|
||||
<property name="autoCompletion" >
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="duplicatesEnabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
Loading…
Reference in New Issue
Block a user