forked from qt-creator/qt-creator
GenericProposalModel: Rename PrefixMatch to ProposalMatch
Change-Id: I70e583d489f27b2dad1b9ab874091e638bbaff1f Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
committed by
André Hartmann
parent
404a4295ce
commit
a7bf0c0ea1
@@ -307,16 +307,16 @@ void GenericProposalModel::filter(const QString &prefix)
|
||||
m_currentItems.append(item);
|
||||
if (text.startsWith(prefix)) {
|
||||
// Direct match
|
||||
item->setPrefixMatch(text.length() == prefix.length()
|
||||
? AssistProposalItemInterface::PrefixMatch::Full
|
||||
: AssistProposalItemInterface::PrefixMatch::Exact);
|
||||
item->setProposalMatch(text.length() == prefix.length()
|
||||
? AssistProposalItemInterface::ProposalMatch::Full
|
||||
: AssistProposalItemInterface::ProposalMatch::Exact);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (text.startsWith(lowerPrefix, Qt::CaseInsensitive))
|
||||
item->setPrefixMatch(AssistProposalItemInterface::PrefixMatch::Prefix);
|
||||
item->setProposalMatch(AssistProposalItemInterface::ProposalMatch::Prefix);
|
||||
else if (text.contains(lowerPrefix, Qt::CaseInsensitive))
|
||||
item->setPrefixMatch(AssistProposalItemInterface::PrefixMatch::Infix);
|
||||
item->setProposalMatch(AssistProposalItemInterface::ProposalMatch::Infix);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user