CppEditor: add more sections (protected, ...) for declaration (refactoring)

You can write definition of function, type Alt+Enter, as usual,
and select not only public but also other possible sections
like private, public slots and so on.

Change-Id: I2faefc3833c6f05c9e2e5a2a41328bcdbe17ba14
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
Andrey M. Tokarev
2013-04-10 19:37:25 +04:00
committed by Nikolai Kosjar
parent f0f406bacb
commit 72e0ded3c4
7 changed files with 119 additions and 10 deletions

View File

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