Deprecation fix; returnPressed

This commit is contained in:
Sune Vuorela 2023-04-20 17:20:07 +02:00 committed by Albert Astals Cid
parent e2b9640cd0
commit 222d778c33

View File

@ -66,14 +66,14 @@ void SearchLineEdit::setSearchType(Okular::Document::SearchType type)
return;
}
disconnect(this, &SearchLineEdit::returnPressed, this, &SearchLineEdit::slotReturnPressed);
disconnect(this, &SearchLineEdit::returnKeyPressed, this, &SearchLineEdit::slotReturnPressed);
m_searchType = type;
// Only connect Enter for next/prev searches, the rest of searches are document global so
// next/prev search does not make sense for them
if (m_searchType == Okular::Document::NextMatch || m_searchType == Okular::Document::PreviousMatch) {
connect(this, &SearchLineEdit::returnPressed, this, &SearchLineEdit::slotReturnPressed);
connect(this, &SearchLineEdit::returnKeyPressed, this, &SearchLineEdit::slotReturnPressed);
}
if (!m_changed) {