forked from qt-creator/qt-creator
QuickFixes: Sort by priority.
* Generally changes the BasicProposalItemListModel's sort to take the BasicProposalItem::order member into account. * Currently only the QML completion and quick fixes set the order. * This means the 'Apply signature changes' quick fix is now further up than the 'add definition' quick fix. Change-Id: I7b5bc82aa37fca232fddd630ab3273437e1bcc09 Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
@@ -58,6 +58,10 @@ struct ContentLessThan
|
||||
{
|
||||
bool operator()(const BasicProposalItem *a, const BasicProposalItem *b)
|
||||
{
|
||||
// If order is different, show higher ones first.
|
||||
if (a->order() != b->order())
|
||||
return a->order() > b->order();
|
||||
|
||||
// The order is case-insensitive in principle, but case-sensitive when this
|
||||
// would otherwise mean equality
|
||||
const QString &lowera = a->text().toLower();
|
||||
|
||||
Reference in New Issue
Block a user