From: Scott Kostyshak Date: Fri, 6 Mar 2020 01:36:09 +0000 (-0500) Subject: Fix Qt deprecation warning for isItemSelected() X-Git-Tag: lyx-2.4.0dev-acb2ca7b~1154 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b38a452efb81cd0f4429aed7ae0fbe947e7e348e;p=lyx.git Fix Qt deprecation warning for isItemSelected() These methods are related to the deprecated setItemSelected() and setItemHidden() methods that were converted at 24926b2e. --- diff --git a/src/frontends/qt/GuiRef.cpp b/src/frontends/qt/GuiRef.cpp index cb4baf9008..c1870bed98 100644 --- a/src/frontends/qt/GuiRef.cpp +++ b/src/frontends/qt/GuiRef.cpp @@ -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));