]> git.lyx.org Git - lyx.git/commitdiff
Fix Qt deprecation warning for isItemSelected()
authorScott Kostyshak <skostysh@lyx.org>
Fri, 6 Mar 2020 01:36:09 +0000 (20:36 -0500)
committerScott Kostyshak <skostysh@lyx.org>
Fri, 6 Mar 2020 01:38:31 +0000 (20:38 -0500)
These methods are related to the deprecated setItemSelected() and
setItemHidden() methods that were converted at 24926b2e.

src/frontends/qt/GuiRef.cpp

index cb4baf9008ee64ee430c857f3581497bec3639db..c1870bed98770e01980dc8003fcaf4339541bc6a 100644 (file)
@@ -203,7 +203,7 @@ void GuiRef::refHighlighted(QTreeWidgetItem * sel)
 /*     int const cur_item = refsTW->currentRow();
        bool const cur_item_selected = cur_item >= 0 ?
                refsLB->isSelected(cur_item) : false;*/
-       bool const cur_item_selected = refsTW->isItemSelected(sel);
+       bool const cur_item_selected = sel->isSelected();
 
        if (cur_item_selected)
                referenceED->setText(sel->text(0));
@@ -239,7 +239,7 @@ void GuiRef::refSelected(QTreeWidgetItem * sel)
 /*     int const cur_item = refsTW->currentRow();
        bool const cur_item_selected = cur_item >= 0 ?
                refsLB->isSelected(cur_item) : false;*/
-       bool const cur_item_selected = refsTW->isItemSelected(sel);
+       bool const cur_item_selected = sel->isSelected();
 
        if (cur_item_selected)
                referenceED->setText(sel->text(0));