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

@@ -746,9 +746,8 @@ class ApplyDeclDefLinkOperation : public CppQuickFixOperation
public:
explicit ApplyDeclDefLinkOperation(
const QSharedPointer<const Internal::CppQuickFixAssistInterface> &interface,
const QSharedPointer<FunctionDeclDefLink> &link,
int priority = -1)
: CppQuickFixOperation(interface, priority)
const QSharedPointer<FunctionDeclDefLink> &link)
: CppQuickFixOperation(interface, 10)
, m_link(link)
{}
@@ -780,7 +779,6 @@ QList<CppQuickFixOperation::Ptr> ApplyDeclDefLinkChanges::match(const QSharedPoi
QSharedPointer<ApplyDeclDefLinkOperation> op(new ApplyDeclDefLinkOperation(interface, link));
op->setDescription(FunctionDeclDefLink::tr("Apply function signature changes"));
op->setPriority(0);
results += op;
return results;