forked from qt-creator/qt-creator
Clang: Introduce warning configuration per project
Change-Id: I5b9a330274e6f72b0786259eb25aa454877d4eef Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "clangcodemodelplugin.h"
|
||||
|
||||
#include "clangconstants.h"
|
||||
#include "clangprojectsettingswidget.h"
|
||||
|
||||
#ifdef WITH_TESTS
|
||||
# include "test/clangcodecompletion_test.h"
|
||||
@@ -33,6 +34,10 @@
|
||||
|
||||
#include <cpptools/cppmodelmanager.h>
|
||||
|
||||
#include <projectexplorer/projectpanelfactory.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
#include <projectexplorer/session.h>
|
||||
|
||||
#include <texteditor/textmark.h>
|
||||
|
||||
namespace ClangCodeModel {
|
||||
@@ -48,6 +53,15 @@ void initializeTextMarks()
|
||||
Utils::Theme::ClangCodeModel_Error_TextMarkColor);
|
||||
}
|
||||
|
||||
void addProjectPanelWidget()
|
||||
{
|
||||
auto panelFactory = new ProjectExplorer::ProjectPanelFactory();
|
||||
panelFactory->setPriority(60);
|
||||
panelFactory->setDisplayName(ClangProjectSettingsWidget::tr("Clang Code Model"));
|
||||
panelFactory->setSimpleCreateWidgetFunction<ClangProjectSettingsWidget>(QIcon());
|
||||
ProjectExplorer::ProjectPanelFactory::registerFactory(panelFactory);
|
||||
}
|
||||
|
||||
} // anonymous namespace
|
||||
|
||||
bool ClangCodeModelPlugin::initialize(const QStringList &arguments, QString *errorMessage)
|
||||
@@ -58,6 +72,7 @@ bool ClangCodeModelPlugin::initialize(const QStringList &arguments, QString *err
|
||||
CppTools::CppModelManager::instance()->activateClangCodeModel(&m_modelManagerSupportProvider);
|
||||
|
||||
initializeTextMarks();
|
||||
addProjectPanelWidget();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user