Clang: Integrate clang's fixits as refactoring actions

They are invokable by the usual means (Alt+Enter, editor's context menu
> Refactor) plus by the context menu of the editor's left margin for the
related line.

The fixit text comes directly from libclang and is thus not translated.
We modify the text slighty by stripping the diagnostic category prefix
("note:", "error:", ...) and capitalizing the first letter.

A follow-up change should properly indicate available refactorings with
a refactoring icon in the editor's left margin.

Task-number: QTCREATORBUG-14868
Change-Id: I86157c9f824d2a9dedf19087476d02ad1e6cc854
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2015-08-24 18:26:09 +02:00
parent de6d7f0617
commit a7928b4b0b
32 changed files with 941 additions and 14 deletions

View File

@@ -14,3 +14,11 @@ void g()
{
return 3;
}
void function()
{
int i = 0;
if (i = 3) {}
}