forked from qt-creator/qt-creator
ClangTools: Rename configuration widget
This configuration is used not only for static analyzer but for all tools. Change-Id: I5ef282500e0addb4ca104b34530e56fba80f59b8 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -9,7 +9,6 @@ LIBS += $$LIBCLANG_LIBS
|
|||||||
INCLUDEPATH += $$LLVM_INCLUDEPATH
|
INCLUDEPATH += $$LLVM_INCLUDEPATH
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
clangstaticanalyzerconfigwidget.cpp \
|
|
||||||
clangstaticanalyzerdiagnosticview.cpp \
|
clangstaticanalyzerdiagnosticview.cpp \
|
||||||
clangstaticanalyzerprojectsettings.cpp \
|
clangstaticanalyzerprojectsettings.cpp \
|
||||||
clangstaticanalyzerprojectsettingsmanager.cpp \
|
clangstaticanalyzerprojectsettingsmanager.cpp \
|
||||||
@@ -28,10 +27,10 @@ SOURCES += \
|
|||||||
clangtoolslogfilereader.cpp \
|
clangtoolslogfilereader.cpp \
|
||||||
clangtoolsplugin.cpp \
|
clangtoolsplugin.cpp \
|
||||||
clangtoolssettings.cpp \
|
clangtoolssettings.cpp \
|
||||||
clangtoolsutils.cpp
|
clangtoolsutils.cpp \
|
||||||
|
clangtoolsconfigwidget.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
clangstaticanalyzerconfigwidget.h \
|
|
||||||
clangstaticanalyzerdiagnosticview.h \
|
clangstaticanalyzerdiagnosticview.h \
|
||||||
clangstaticanalyzerprojectsettings.h \
|
clangstaticanalyzerprojectsettings.h \
|
||||||
clangstaticanalyzerprojectsettingsmanager.h \
|
clangstaticanalyzerprojectsettingsmanager.h \
|
||||||
@@ -52,11 +51,12 @@ HEADERS += \
|
|||||||
clangtoolslogfilereader.h \
|
clangtoolslogfilereader.h \
|
||||||
clangtoolsplugin.h \
|
clangtoolsplugin.h \
|
||||||
clangtoolssettings.h \
|
clangtoolssettings.h \
|
||||||
clangtoolsutils.h
|
clangtoolsutils.h \
|
||||||
|
clangtoolsconfigwidget.h
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
clangstaticanalyzerconfigwidget.ui \
|
clangstaticanalyzerprojectsettingswidget.ui \
|
||||||
clangstaticanalyzerprojectsettingswidget.ui
|
clangtoolsconfigwidget.ui
|
||||||
|
|
||||||
equals(TEST, 1) {
|
equals(TEST, 1) {
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
|
|||||||
@@ -41,9 +41,6 @@ QtcPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
files: [
|
files: [
|
||||||
"clangstaticanalyzerconfigwidget.cpp",
|
|
||||||
"clangstaticanalyzerconfigwidget.h",
|
|
||||||
"clangstaticanalyzerconfigwidget.ui",
|
|
||||||
"clangstaticanalyzerdiagnosticview.cpp",
|
"clangstaticanalyzerdiagnosticview.cpp",
|
||||||
"clangstaticanalyzerdiagnosticview.h",
|
"clangstaticanalyzerdiagnosticview.h",
|
||||||
"clangstaticanalyzerprojectsettings.cpp",
|
"clangstaticanalyzerprojectsettings.cpp",
|
||||||
@@ -72,6 +69,9 @@ QtcPlugin {
|
|||||||
"clangtoolrunner.cpp",
|
"clangtoolrunner.cpp",
|
||||||
"clangtoolrunner.h",
|
"clangtoolrunner.h",
|
||||||
"clangtools_global.h",
|
"clangtools_global.h",
|
||||||
|
"clangtoolsconfigwidget.cpp",
|
||||||
|
"clangtoolsconfigwidget.h",
|
||||||
|
"clangtoolsconfigwidget.ui",
|
||||||
"clangtoolsconstants.h",
|
"clangtoolsconstants.h",
|
||||||
"clangtoolsdiagnostic.cpp",
|
"clangtoolsdiagnostic.cpp",
|
||||||
"clangtoolsdiagnostic.h",
|
"clangtoolsdiagnostic.h",
|
||||||
|
|||||||
@@ -23,8 +23,8 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "clangstaticanalyzerconfigwidget.h"
|
#include "clangtoolsconfigwidget.h"
|
||||||
#include "ui_clangstaticanalyzerconfigwidget.h"
|
#include "ui_clangtoolsconfigwidget.h"
|
||||||
|
|
||||||
#include "clangtoolsutils.h"
|
#include "clangtoolsutils.h"
|
||||||
|
|
||||||
@@ -34,11 +34,11 @@
|
|||||||
namespace ClangTools {
|
namespace ClangTools {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
ClangStaticAnalyzerConfigWidget::ClangStaticAnalyzerConfigWidget(
|
ClangToolsConfigWidget::ClangToolsConfigWidget(
|
||||||
ClangToolsSettings *settings,
|
ClangToolsSettings *settings,
|
||||||
QWidget *parent)
|
QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
, m_ui(new Ui::ClangStaticAnalyzerConfigWidget)
|
, m_ui(new Ui::ClangToolsConfigWidget)
|
||||||
, m_settings(settings)
|
, m_settings(settings)
|
||||||
{
|
{
|
||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
@@ -51,7 +51,7 @@ ClangStaticAnalyzerConfigWidget::ClangStaticAnalyzerConfigWidget(
|
|||||||
[settings](int count) { settings->setSimultaneousProcesses(count); });
|
[settings](int count) { settings->setSimultaneousProcesses(count); });
|
||||||
}
|
}
|
||||||
|
|
||||||
ClangStaticAnalyzerConfigWidget::~ClangStaticAnalyzerConfigWidget()
|
ClangToolsConfigWidget::~ClangToolsConfigWidget()
|
||||||
{
|
{
|
||||||
delete m_ui;
|
delete m_ui;
|
||||||
}
|
}
|
||||||
@@ -32,21 +32,21 @@
|
|||||||
namespace ClangTools {
|
namespace ClangTools {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
namespace Ui { class ClangStaticAnalyzerConfigWidget; }
|
namespace Ui { class ClangToolsConfigWidget; }
|
||||||
|
|
||||||
class ClangExecutableVersion;
|
class ClangExecutableVersion;
|
||||||
|
|
||||||
class ClangStaticAnalyzerConfigWidget : public QWidget
|
class ClangToolsConfigWidget : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ClangStaticAnalyzerConfigWidget(ClangToolsSettings *settings,
|
explicit ClangToolsConfigWidget(ClangToolsSettings *settings,
|
||||||
QWidget *parent = 0);
|
QWidget *parent = 0);
|
||||||
~ClangStaticAnalyzerConfigWidget();
|
~ClangToolsConfigWidget();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::ClangStaticAnalyzerConfigWidget *m_ui;
|
Ui::ClangToolsConfigWidget *m_ui;
|
||||||
ClangToolsSettings *m_settings;
|
ClangToolsSettings *m_settings;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>ClangTools::Internal::ClangStaticAnalyzerConfigWidget</class>
|
<class>ClangTools::Internal::ClangToolsConfigWidget</class>
|
||||||
<widget class="QWidget" name="ClangTools::Internal::ClangStaticAnalyzerConfigWidget">
|
<widget class="QWidget" name="ClangTools::Internal::ClangToolsConfigWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include "clangtoolsplugin.h"
|
#include "clangtoolsplugin.h"
|
||||||
|
|
||||||
#include "clangstaticanalyzerconfigwidget.h"
|
#include "clangtoolsconfigwidget.h"
|
||||||
#include "clangtoolsconstants.h"
|
#include "clangtoolsconstants.h"
|
||||||
#include "clangstaticanalyzerprojectsettingswidget.h"
|
#include "clangstaticanalyzerprojectsettingswidget.h"
|
||||||
#include "clangstaticanalyzerruncontrol.h"
|
#include "clangstaticanalyzerruncontrol.h"
|
||||||
@@ -66,15 +66,15 @@ using namespace ProjectExplorer;
|
|||||||
namespace ClangTools {
|
namespace ClangTools {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class ClangStaticAnalyzerOptionsPage : public Core::IOptionsPage
|
class ClangToolsOptionsPage : public Core::IOptionsPage
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit ClangStaticAnalyzerOptionsPage()
|
explicit ClangToolsOptionsPage()
|
||||||
{
|
{
|
||||||
setId("Analyzer.ClangStaticAnalyzer.Settings"); // TODO: Get it from "clangstaticanalyzersettings.h"
|
setId("Analyzer.ClangTools.Settings"); // TODO: Get it from "clangstaticanalyzersettings.h"
|
||||||
setDisplayName(QCoreApplication::translate(
|
setDisplayName(QCoreApplication::translate(
|
||||||
"ClangTools::Internal::ClangStaticAnalyzerOptionsPage",
|
"ClangTools::Internal::ClangToolsOptionsPage",
|
||||||
"Clang Static Analyzer"));
|
"Clang Tools"));
|
||||||
setCategory("T.Analyzer");
|
setCategory("T.Analyzer");
|
||||||
setDisplayCategory(QCoreApplication::translate("Analyzer", "Analyzer"));
|
setDisplayCategory(QCoreApplication::translate("Analyzer", "Analyzer"));
|
||||||
setCategoryIcon(Analyzer::Icons::SETTINGSCATEGORY_ANALYZER);
|
setCategoryIcon(Analyzer::Icons::SETTINGSCATEGORY_ANALYZER);
|
||||||
@@ -83,7 +83,7 @@ public:
|
|||||||
QWidget *widget()
|
QWidget *widget()
|
||||||
{
|
{
|
||||||
if (!m_widget)
|
if (!m_widget)
|
||||||
m_widget = new ClangStaticAnalyzerConfigWidget(ClangToolsSettings::instance());
|
m_widget = new ClangToolsConfigWidget(ClangToolsSettings::instance());
|
||||||
return m_widget;
|
return m_widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ class ClangToolsPluginPrivate
|
|||||||
public:
|
public:
|
||||||
ClangStaticAnalyzerTool staticAnalyzerTool;
|
ClangStaticAnalyzerTool staticAnalyzerTool;
|
||||||
ClangTidyClazyTool clangTidyClazyTool;
|
ClangTidyClazyTool clangTidyClazyTool;
|
||||||
ClangStaticAnalyzerOptionsPage optionsPage;
|
ClangToolsOptionsPage optionsPage;
|
||||||
};
|
};
|
||||||
|
|
||||||
ClangToolsPlugin::~ClangToolsPlugin()
|
ClangToolsPlugin::~ClangToolsPlugin()
|
||||||
|
|||||||
Reference in New Issue
Block a user