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:
Christian Kamm
2011-11-04 09:34:03 +01:00
parent dbc84d8c1c
commit c2eb453228
4 changed files with 16 additions and 35 deletions

View File

@@ -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();