forked from qt-creator/qt-creator
Clang: Indicate available "fix its" with a light bulb
...at the end of the line, just like for the "Apply Function Signature Changes" refactor action. * Hovering the light bulb shows the tooltip "Inspect available fixits". * Clicking the light bulb leads to the refactoring menu, as if the user hit Alt+Return. Change-Id: Iaf7b3734c43e21fc28e6b0658f517d98858c0e0c Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This commit is contained in:
@@ -74,7 +74,8 @@ public:
|
||||
signals:
|
||||
// Signal interface to implement
|
||||
void codeWarningsUpdated(unsigned revision,
|
||||
const QList<QTextEdit::ExtraSelection> selections);
|
||||
const QList<QTextEdit::ExtraSelection> selections,
|
||||
const TextEditor::RefactorMarkers &refactorMarkers);
|
||||
|
||||
void ifdefedOutBlocksUpdated(unsigned revision,
|
||||
const QList<TextEditor::BlockRange> ifdefedOutBlocks);
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#include <texteditor/convenience.h>
|
||||
#include <texteditor/fontsettings.h>
|
||||
#include <texteditor/refactoroverlay.h>
|
||||
#include <texteditor/texteditorsettings.h>
|
||||
|
||||
#include <cplusplus/CppDocument.h>
|
||||
@@ -307,7 +308,7 @@ void BuiltinEditorDocumentProcessor::onCodeWarningsUpdated(
|
||||
|
||||
m_codeWarnings += toTextEditorSelections(codeWarnings, textDocument());
|
||||
m_codeWarningsUpdated = true;
|
||||
emit codeWarningsUpdated(revision(), m_codeWarnings);
|
||||
emit codeWarningsUpdated(revision(), m_codeWarnings, TextEditor::RefactorMarkers());
|
||||
}
|
||||
|
||||
SemanticInfo::Source BuiltinEditorDocumentProcessor::createSemanticInfoSource(bool force) const
|
||||
|
||||
@@ -61,6 +61,8 @@ const char CPP_SETTINGS_CATEGORY[] = "I.C++";
|
||||
const char CPP_SETTINGS_TR_CATEGORY[] = QT_TRANSLATE_NOOP("CppTools", "C++");
|
||||
const char SETTINGS_CATEGORY_CPP_ICON[] = ":/cpptools/images/category_cpp.png";
|
||||
|
||||
const char CPP_CLANG_FIXIT_AVAILABLE_MARKER_ID[] = "ClangFixItAvailableMarker";
|
||||
|
||||
const char CPP_SETTINGS_ID[] = "Cpp";
|
||||
const char CPP_SETTINGS_NAME[] = QT_TRANSLATE_NOOP("CppTools", "C++");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user