From 623bf3eec067dc7cf3189bf815f43122e997ac32 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 8 Jun 2020 13:02:01 +0200 Subject: [PATCH] Qt5: 'void QListWidget::setItemSelected(const QListWidgetItem*, bool)' is deprecated: Use QListWidgetItem::setSelected() instead [-Wdeprecated-declarations] --- src/Gui/CallTips.cpp | 3 ++- src/Gui/TextEdit.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Gui/CallTips.cpp b/src/Gui/CallTips.cpp index 64a1e3e5e6..a7cf430099 100644 --- a/src/Gui/CallTips.cpp +++ b/src/Gui/CallTips.cpp @@ -143,7 +143,8 @@ void CallTipsList::keyboardSearch(const QString& wordPrefix) } } - setItemSelected(currentItem(), false); + if (currentItem()) + currentItem()->setSelected(false); } void CallTipsList::validateCursor() diff --git a/src/Gui/TextEdit.cpp b/src/Gui/TextEdit.cpp index 8844f08a12..f9f4cc7116 100644 --- a/src/Gui/TextEdit.cpp +++ b/src/Gui/TextEdit.cpp @@ -518,7 +518,8 @@ void CompletionList::findCurrentWord(const QString& wordPrefix) } } - setItemSelected(currentItem(), false); + if (currentItem()) + currentItem()->setSelected(false); } /**