Editor: Simplify text marks

Moving defaultToolTip and color from TextMarkRegistry to TextMark.
Allowing every instance of a TextMark object to define these
information.

Change-Id: Iec1794372cf902b34d343402074e3999e7f9faf7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2017-06-01 08:48:11 +02:00
parent fe3facb015
commit 4322990926
11 changed files with 67 additions and 167 deletions

View File

@@ -46,20 +46,6 @@ namespace Internal {
namespace {
void initializeTextMarks()
{
TextEditor::TextMark::setCategoryColor(Core::Id(Constants::CLANG_WARNING),
Utils::Theme::ClangCodeModel_Warning_TextMarkColor);
TextEditor::TextMark::setCategoryColor(Core::Id(Constants::CLANG_ERROR),
Utils::Theme::ClangCodeModel_Error_TextMarkColor);
TextEditor::TextMark::setDefaultToolTip(Core::Id(Constants::CLANG_WARNING),
QApplication::translate("Clang Code Model Marks",
"Code Model Warning"));
TextEditor::TextMark::setDefaultToolTip(Core::Id(Constants::CLANG_ERROR),
QApplication::translate("Clang Code Model Marks",
"Code Model Error"));
}
void addProjectPanelWidget()
{
auto panelFactory = new ProjectExplorer::ProjectPanelFactory();
@@ -85,7 +71,6 @@ bool ClangCodeModelPlugin::initialize(const QStringList &arguments, QString *err
CppTools::CppModelManager::instance()->activateClangCodeModel(&m_modelManagerSupportProvider);
initializeTextMarks();
addProjectPanelWidget();
return true;