forked from qt-creator/qt-creator
Improve code-assist API isSortable
Now IGenericProposalModel::isSortable also takes the current prefix as a parameter. This is particularly useful for cases like in the C++ completion: For global completions it will only sort if there's already a content prefix - Notice, however, that the "sorting threshold" for a maximum number of items is still kept in IGenericProposalModel::sort. Task-number: QTCREATORBUG-6404 Change-Id: I3c2f282aa565287b8b4989930b6a27093862ef25 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
@@ -437,7 +437,7 @@ bool GenericProposalWidget::updateAndCheck(const QString &prefix)
|
||||
abort();
|
||||
return false;
|
||||
}
|
||||
if (d->m_model->isSortable())
|
||||
if (d->m_model->isSortable(prefix))
|
||||
d->m_model->sort();
|
||||
d->m_completionListView->reset();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user