C++: re-enable quick-fix sorting.

Also make sure that "Apply function signature change" gets to the top
of the list.

Task-number: QTCREATORBUG-9441

Change-Id: Iaf67f8ea9c99ddfc973e610f7e0f4c35b7967629
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Erik Verbruggen
2013-06-03 12:26:25 +02:00
committed by Nikolai Kosjar
parent b91a5bcb13
commit 5e5c5bb02b
2 changed files with 2 additions and 10 deletions

View File

@@ -3696,7 +3696,7 @@ class ApplyDeclDefLinkOperation : public CppQuickFixOperation
public: public:
explicit ApplyDeclDefLinkOperation(const CppQuickFixInterface &interface, explicit ApplyDeclDefLinkOperation(const CppQuickFixInterface &interface,
const QSharedPointer<FunctionDeclDefLink> &link) const QSharedPointer<FunctionDeclDefLink> &link)
: CppQuickFixOperation(interface, 10) : CppQuickFixOperation(interface, 100)
, m_link(link) , m_link(link)
{} {}

View File

@@ -40,7 +40,6 @@
#include <texteditor/basetexteditor.h> #include <texteditor/basetexteditor.h>
#include <texteditor/texteditorsettings.h> #include <texteditor/texteditorsettings.h>
#include <texteditor/completionsettings.h> #include <texteditor/completionsettings.h>
#include <texteditor/codeassist/basicproposalitemlistmodel.h>
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
@@ -266,15 +265,8 @@ void CodeAssistantPrivate::requestProposal(AssistReason reason,
} }
} }
if (IAssistProposal *newProposal = processor->perform(assistInterface)) { if (IAssistProposal *newProposal = processor->perform(assistInterface))
if (kind == QuickFix) {
TextEditor::BasicProposalItemListModel *proposalModel =
static_cast<TextEditor::BasicProposalItemListModel *>(newProposal->model());
proposalModel->setSortingAllowed(false);
}
displayProposal(newProposal, reason); displayProposal(newProposal, reason);
}
delete processor; delete processor;
} }