Commit b2b6d3c5 authored by Tobias Hunger's avatar Tobias Hunger

CMake: Semi-automatic cleanups

* Shorten header guards
* Use override and auto where possible
* Remove useless destructors, etc.
* Remove private slots sections, unify private: sections
* Use member initialization where it makes sense

Change-Id: I00eaf6d706adc16859176d1b68c631d3336bb39f
Reviewed-by: default avatarTim Jenssen <tim.jenssen@theqtcompany.com>
parent 079448d3
...@@ -42,7 +42,6 @@ class CMAKE_EXPORT CMakeAutoCompleter : public TextEditor::AutoCompleter ...@@ -42,7 +42,6 @@ class CMAKE_EXPORT CMakeAutoCompleter : public TextEditor::AutoCompleter
{ {
public: public:
CMakeAutoCompleter(); CMakeAutoCompleter();
virtual ~CMakeAutoCompleter() {}
bool isInComment(const QTextCursor &cursor) const override; bool isInComment(const QTextCursor &cursor) const override;
bool isInString(const QTextCursor &cursor) const override; bool isInString(const QTextCursor &cursor) const override;
......
...@@ -123,9 +123,6 @@ QString CMakeBuildConfiguration::initialArguments() const ...@@ -123,9 +123,6 @@ QString CMakeBuildConfiguration::initialArguments() const
return m_initialArguments; return m_initialArguments;
} }
CMakeBuildConfiguration::~CMakeBuildConfiguration()
{ }
ProjectExplorer::NamedWidget *CMakeBuildConfiguration::createConfigWidget() ProjectExplorer::NamedWidget *CMakeBuildConfiguration::createConfigWidget()
{ {
return new CMakeBuildSettingsWidget(this); return new CMakeBuildSettingsWidget(this);
...@@ -140,10 +137,6 @@ CMakeBuildConfigurationFactory::CMakeBuildConfigurationFactory(QObject *parent) ...@@ -140,10 +137,6 @@ CMakeBuildConfigurationFactory::CMakeBuildConfigurationFactory(QObject *parent)
{ {
} }
CMakeBuildConfigurationFactory::~CMakeBuildConfigurationFactory()
{
}
int CMakeBuildConfigurationFactory::priority(const ProjectExplorer::Target *parent) const int CMakeBuildConfigurationFactory::priority(const ProjectExplorer::Target *parent) const
{ {
return canHandle(parent) ? 0 : -1; return canHandle(parent) ? 0 : -1;
...@@ -207,7 +200,7 @@ ProjectExplorer::BuildConfiguration *CMakeBuildConfigurationFactory::create(Proj ...@@ -207,7 +200,7 @@ ProjectExplorer::BuildConfiguration *CMakeBuildConfigurationFactory::create(Proj
copy.displayName, info->buildType); copy.displayName, info->buildType);
} }
CMakeBuildConfiguration *bc = new CMakeBuildConfiguration(parent); auto bc = new CMakeBuildConfiguration(parent);
bc->setDisplayName(copy.displayName); bc->setDisplayName(copy.displayName);
bc->setDefaultDisplayName(copy.displayName); bc->setDefaultDisplayName(copy.displayName);
...@@ -257,7 +250,7 @@ CMakeBuildConfiguration *CMakeBuildConfigurationFactory::restore(ProjectExplorer ...@@ -257,7 +250,7 @@ CMakeBuildConfiguration *CMakeBuildConfigurationFactory::restore(ProjectExplorer
{ {
if (!canRestore(parent, map)) if (!canRestore(parent, map))
return 0; return 0;
CMakeBuildConfiguration *bc = new CMakeBuildConfiguration(parent); auto bc = new CMakeBuildConfiguration(parent);
if (bc->fromMap(map)) if (bc->fromMap(map))
return bc; return bc;
delete bc; delete bc;
......
...@@ -51,13 +51,12 @@ class CMakeBuildConfiguration : public ProjectExplorer::BuildConfiguration ...@@ -51,13 +51,12 @@ class CMakeBuildConfiguration : public ProjectExplorer::BuildConfiguration
public: public:
CMakeBuildConfiguration(ProjectExplorer::Target *parent); CMakeBuildConfiguration(ProjectExplorer::Target *parent);
~CMakeBuildConfiguration();
ProjectExplorer::NamedWidget *createConfigWidget(); ProjectExplorer::NamedWidget *createConfigWidget() override;
QVariantMap toMap() const; QVariantMap toMap() const override;
BuildType buildType() const; BuildType buildType() const override;
void emitBuildTypeChanged(); void emitBuildTypeChanged();
...@@ -66,7 +65,7 @@ public: ...@@ -66,7 +65,7 @@ public:
protected: protected:
CMakeBuildConfiguration(ProjectExplorer::Target *parent, CMakeBuildConfiguration *source); CMakeBuildConfiguration(ProjectExplorer::Target *parent, CMakeBuildConfiguration *source);
bool fromMap(const QVariantMap &map); bool fromMap(const QVariantMap &map) override;
private: private:
QString m_initialArguments; QString m_initialArguments;
...@@ -80,20 +79,19 @@ class CMakeBuildConfigurationFactory : public ProjectExplorer::IBuildConfigurati ...@@ -80,20 +79,19 @@ class CMakeBuildConfigurationFactory : public ProjectExplorer::IBuildConfigurati
public: public:
CMakeBuildConfigurationFactory(QObject *parent = 0); CMakeBuildConfigurationFactory(QObject *parent = 0);
~CMakeBuildConfigurationFactory();
int priority(const ProjectExplorer::Target *parent) const; int priority(const ProjectExplorer::Target *parent) const override;
QList<ProjectExplorer::BuildInfo *> availableBuilds(const ProjectExplorer::Target *parent) const; QList<ProjectExplorer::BuildInfo *> availableBuilds(const ProjectExplorer::Target *parent) const override;
int priority(const ProjectExplorer::Kit *k, const QString &projectPath) const; int priority(const ProjectExplorer::Kit *k, const QString &projectPath) const override;
QList<ProjectExplorer::BuildInfo *> availableSetups(const ProjectExplorer::Kit *k, QList<ProjectExplorer::BuildInfo *> availableSetups(const ProjectExplorer::Kit *k,
const QString &projectPath) const; const QString &projectPath) const override;
ProjectExplorer::BuildConfiguration *create(ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *create(ProjectExplorer::Target *parent,
const ProjectExplorer::BuildInfo *info) const; const ProjectExplorer::BuildInfo *info) const override;
bool canClone(const ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source) const; bool canClone(const ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source) const override;
CMakeBuildConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source); CMakeBuildConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source) override;
bool canRestore(const ProjectExplorer::Target *parent, const QVariantMap &map) const; bool canRestore(const ProjectExplorer::Target *parent, const QVariantMap &map) const override;
CMakeBuildConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map); CMakeBuildConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map) override;
private: private:
bool canHandle(const ProjectExplorer::Target *t) const; bool canHandle(const ProjectExplorer::Target *t) const;
......
...@@ -46,32 +46,32 @@ ...@@ -46,32 +46,32 @@
namespace CMakeProjectManager { namespace CMakeProjectManager {
namespace Internal { namespace Internal {
CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc) : m_buildConfiguration(0) CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc) :
m_pathLineEdit(new QLineEdit),
m_changeButton(new QPushButton)
{ {
QVBoxLayout *vbox = new QVBoxLayout(this); auto vbox = new QVBoxLayout(this);
vbox->setMargin(0); vbox->setMargin(0);
Utils::DetailsWidget *container = new Utils::DetailsWidget; auto container = new Utils::DetailsWidget;
container->setState(Utils::DetailsWidget::NoSummary); container->setState(Utils::DetailsWidget::NoSummary);
vbox->addWidget(container); vbox->addWidget(container);
QWidget *details = new QWidget(container); auto details = new QWidget(container);
container->setWidget(details); container->setWidget(details);
QFormLayout *fl = new QFormLayout(details); auto fl = new QFormLayout(details);
fl->setMargin(0); fl->setMargin(0);
fl->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow); fl->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
QPushButton *runCmakeButton = new QPushButton(tr("Run CMake...")); auto runCmakeButton = new QPushButton(tr("Run CMake..."));
connect(runCmakeButton, &QAbstractButton::clicked, this, &CMakeBuildSettingsWidget::runCMake); connect(runCmakeButton, &QAbstractButton::clicked, this, &CMakeBuildSettingsWidget::runCMake);
fl->addRow(tr("Reconfigure project:"), runCmakeButton); fl->addRow(tr("Reconfigure project:"), runCmakeButton);
m_pathLineEdit = new QLineEdit(this);
m_pathLineEdit->setReadOnly(true); m_pathLineEdit->setReadOnly(true);
QHBoxLayout *hbox = new QHBoxLayout(); auto hbox = new QHBoxLayout();
hbox->addWidget(m_pathLineEdit); hbox->addWidget(m_pathLineEdit);
m_changeButton = new QPushButton(this);
m_changeButton->setText(tr("&Change")); m_changeButton->setText(tr("&Change"));
connect(m_changeButton, &QAbstractButton::clicked, this, connect(m_changeButton, &QAbstractButton::clicked, this,
&CMakeBuildSettingsWidget::openChangeBuildDirectoryDialog); &CMakeBuildSettingsWidget::openChangeBuildDirectoryDialog);
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
** **
****************************************************************************/ ****************************************************************************/
#ifndef CMAKEPROJECTMANAGER_INTERNAL_CMAKEBUILDSETTINGSWIDGET_H #ifndef CMAKEBUILDSETTINGSWIDGET_H
#define CMAKEPROJECTMANAGER_INTERNAL_CMAKEBUILDSETTINGSWIDGET_H #define CMAKEBUILDSETTINGSWIDGET_H
#include <projectexplorer/namedwidget.h> #include <projectexplorer/namedwidget.h>
...@@ -47,16 +47,16 @@ class CMakeBuildSettingsWidget : public ProjectExplorer::NamedWidget ...@@ -47,16 +47,16 @@ class CMakeBuildSettingsWidget : public ProjectExplorer::NamedWidget
public: public:
CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc); CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc);
private slots: private:
void openChangeBuildDirectoryDialog(); void openChangeBuildDirectoryDialog();
void runCMake(); void runCMake();
private:
QLineEdit *m_pathLineEdit; QLineEdit *m_pathLineEdit;
QPushButton *m_changeButton; QPushButton *m_changeButton;
CMakeBuildConfiguration *m_buildConfiguration; CMakeBuildConfiguration *m_buildConfiguration = 0;
}; };
} // namespace Internal } // namespace Internal
} // namespace CMakeProjectManager } // namespace CMakeProjectManager
#endif // CMAKEPROJECTMANAGER_INTERNAL_CMAKEBUILDSETTINGSWIDGET_H #endif // CMAKEBUILDSETTINGSWIDGET_H
...@@ -74,14 +74,12 @@ const char ADD_RUNCONFIGURATION_ARGUMENT_KEY[] = "CMakeProjectManager.MakeStep.A ...@@ -74,14 +74,12 @@ const char ADD_RUNCONFIGURATION_ARGUMENT_KEY[] = "CMakeProjectManager.MakeStep.A
const char ADD_RUNCONFIGURATION_TEXT[] = "Current executable"; const char ADD_RUNCONFIGURATION_TEXT[] = "Current executable";
} }
CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl) : CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl) : AbstractProcessStep(bsl, Core::Id(MS_ID))
AbstractProcessStep(bsl, Core::Id(MS_ID)), m_addRunConfigurationArgument(false)
{ {
ctor(); ctor();
} }
CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl, Core::Id id) : CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl, Core::Id id) : AbstractProcessStep(bsl, id)
AbstractProcessStep(bsl, id), m_addRunConfigurationArgument(false)
{ {
ctor(); ctor();
} }
...@@ -357,25 +355,26 @@ QString CMakeBuildStep::cleanTarget() ...@@ -357,25 +355,26 @@ QString CMakeBuildStep::cleanTarget()
// CMakeBuildStepConfigWidget // CMakeBuildStepConfigWidget
// //
CMakeBuildStepConfigWidget::CMakeBuildStepConfigWidget(CMakeBuildStep *buildStep) CMakeBuildStepConfigWidget::CMakeBuildStepConfigWidget(CMakeBuildStep *buildStep) :
: m_buildStep(buildStep) m_buildStep(buildStep),
m_toolArguments(new QLineEdit),
m_buildTargetsList(new QListWidget)
{ {
QFormLayout *fl = new QFormLayout(this); auto fl = new QFormLayout(this);
fl->setMargin(0); fl->setMargin(0);
fl->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow); fl->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
setLayout(fl); setLayout(fl);
m_toolArguments = new QLineEdit(this);
fl->addRow(tr("Tool arguments:"), m_toolArguments); fl->addRow(tr("Tool arguments:"), m_toolArguments);
m_toolArguments->setText(m_buildStep->toolArguments()); m_toolArguments->setText(m_buildStep->toolArguments());
m_buildTargetsList = new QListWidget;
m_buildTargetsList->setFrameStyle(QFrame::NoFrame); m_buildTargetsList->setFrameStyle(QFrame::NoFrame);
m_buildTargetsList->setMinimumHeight(200); m_buildTargetsList->setMinimumHeight(200);
QFrame *frame = new QFrame(this); auto frame = new QFrame(this);
frame->setFrameStyle(QFrame::StyledPanel); frame->setFrameStyle(QFrame::StyledPanel);
QVBoxLayout *frameLayout = new QVBoxLayout(frame); auto frameLayout = new QVBoxLayout(frame);
frameLayout->setMargin(0); frameLayout->setMargin(0);
frameLayout->addWidget(Core::ItemViewFind::createSearchableWrapper(m_buildTargetsList, frameLayout->addWidget(Core::ItemViewFind::createSearchableWrapper(m_buildTargetsList,
Core::ItemViewFind::LightColored)); Core::ItemViewFind::LightColored));
...@@ -393,7 +392,7 @@ CMakeBuildStepConfigWidget::CMakeBuildStepConfigWidget(CMakeBuildStep *buildStep ...@@ -393,7 +392,7 @@ CMakeBuildStepConfigWidget::CMakeBuildStepConfigWidget(CMakeBuildStep *buildStep
QStringList targetList = pro->buildTargetTitles(); QStringList targetList = pro->buildTargetTitles();
targetList.sort(); targetList.sort();
foreach (const QString &buildTarget, targetList) { foreach (const QString &buildTarget, targetList) {
QListWidgetItem *item = new QListWidgetItem(buildTarget, m_buildTargetsList); auto item = new QListWidgetItem(buildTarget, m_buildTargetsList);
item->setFlags(item->flags() | Qt::ItemIsUserCheckable); item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
item->setCheckState(m_buildStep->buildsBuildTarget(item->text()) ? Qt::Checked : Qt::Unchecked); item->setCheckState(m_buildStep->buildsBuildTarget(item->text()) ? Qt::Checked : Qt::Unchecked);
} }
...@@ -437,7 +436,7 @@ void CMakeBuildStepConfigWidget::buildTargetsChanged() ...@@ -437,7 +436,7 @@ void CMakeBuildStepConfigWidget::buildTargetsChanged()
CMakeProject *pro = static_cast<CMakeProject *>(m_buildStep->target()->project()); CMakeProject *pro = static_cast<CMakeProject *>(m_buildStep->target()->project());
foreach (const QString& buildTarget, pro->buildTargetTitles()) { foreach (const QString& buildTarget, pro->buildTargetTitles()) {
QListWidgetItem *item = new QListWidgetItem(buildTarget, m_buildTargetsList); auto item = new QListWidgetItem(buildTarget, m_buildTargetsList);
item->setFlags(item->flags() | Qt::ItemIsUserCheckable); item->setFlags(item->flags() | Qt::ItemIsUserCheckable);
item->setCheckState(m_buildStep->buildsBuildTarget(item->text()) ? Qt::Checked : Qt::Unchecked); item->setCheckState(m_buildStep->buildsBuildTarget(item->text()) ? Qt::Checked : Qt::Unchecked);
} }
...@@ -501,7 +500,7 @@ BuildStep *CMakeBuildStepFactory::create(BuildStepList *parent, Core::Id id) ...@@ -501,7 +500,7 @@ BuildStep *CMakeBuildStepFactory::create(BuildStepList *parent, Core::Id id)
{ {
if (!canCreate(parent, id)) if (!canCreate(parent, id))
return 0; return 0;
CMakeBuildStep *step = new CMakeBuildStep(parent); auto step = new CMakeBuildStep(parent);
if (parent->id() == ProjectExplorer::Constants::BUILDSTEPS_CLEAN) if (parent->id() == ProjectExplorer::Constants::BUILDSTEPS_CLEAN)
step->setBuildTarget(CMakeBuildStep::cleanTarget(), true); step->setBuildTarget(CMakeBuildStep::cleanTarget(), true);
return step; return step;
...@@ -528,7 +527,7 @@ BuildStep *CMakeBuildStepFactory::restore(BuildStepList *parent, const QVariantM ...@@ -528,7 +527,7 @@ BuildStep *CMakeBuildStepFactory::restore(BuildStepList *parent, const QVariantM
{ {
if (!canRestore(parent, map)) if (!canRestore(parent, map))
return 0; return 0;
CMakeBuildStep *bs(new CMakeBuildStep(parent)); auto bs = new CMakeBuildStep(parent);
if (bs->fromMap(map)) if (bs->fromMap(map))
return bs; return bs;
delete bs; delete bs;
......
...@@ -86,9 +86,6 @@ public: ...@@ -86,9 +86,6 @@ public:
static QString cleanTarget(); static QString cleanTarget();
private:
void buildTargetsChanged();
signals: signals:
void cmakeCommandChanged(); void cmakeCommandChanged();
void targetsToBuildChanged(); void targetsToBuildChanged();
...@@ -103,10 +100,12 @@ protected: ...@@ -103,10 +100,12 @@ protected:
bool fromMap(const QVariantMap &map) override; bool fromMap(const QVariantMap &map) override;
// For parsing [ 76%] // For parsing [ 76%]
virtual void stdOutput(const QString &line) override; void stdOutput(const QString &line) override;
private: private:
void ctor(); void ctor();
void buildTargetsChanged();
CMakeRunConfiguration *targetsActiveRunConfiguration() const; CMakeRunConfiguration *targetsActiveRunConfiguration() const;
QRegExp m_percentProgress; QRegExp m_percentProgress;
...@@ -114,8 +113,8 @@ private: ...@@ -114,8 +113,8 @@ private:
QString m_ninjaProgressString; QString m_ninjaProgressString;
QStringList m_buildTargets; QStringList m_buildTargets;
QString m_toolArguments; QString m_toolArguments;
bool m_addRunConfigurationArgument; bool m_addRunConfigurationArgument = false;
bool m_useNinja; bool m_useNinja = false;
}; };
class CMakeBuildStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget class CMakeBuildStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget
...@@ -123,8 +122,8 @@ class CMakeBuildStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget ...@@ -123,8 +122,8 @@ class CMakeBuildStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget
Q_OBJECT Q_OBJECT
public: public:
CMakeBuildStepConfigWidget(CMakeBuildStep *buildStep); CMakeBuildStepConfigWidget(CMakeBuildStep *buildStep);
virtual QString displayName() const; QString displayName() const override;
virtual QString summaryText() const; QString summaryText() const override;
private: private:
void itemChanged(QListWidgetItem*); void itemChanged(QListWidgetItem*);
...@@ -133,10 +132,9 @@ private: ...@@ -133,10 +132,9 @@ private:
void buildTargetsChanged(); void buildTargetsChanged();
void selectedBuildTargetsChanged(); void selectedBuildTargetsChanged();
private:
CMakeBuildStep *m_buildStep; CMakeBuildStep *m_buildStep;
QListWidget *m_buildTargetsList;
QLineEdit *m_toolArguments; QLineEdit *m_toolArguments;
QListWidget *m_buildTargetsList;
QString m_summaryText; QString m_summaryText;
}; };
...@@ -147,15 +145,15 @@ class CMakeBuildStepFactory : public ProjectExplorer::IBuildStepFactory ...@@ -147,15 +145,15 @@ class CMakeBuildStepFactory : public ProjectExplorer::IBuildStepFactory
public: public:
explicit CMakeBuildStepFactory(QObject *parent = 0); explicit CMakeBuildStepFactory(QObject *parent = 0);
bool canCreate(ProjectExplorer::BuildStepList *parent, Core::Id id) const; bool canCreate(ProjectExplorer::BuildStepList *parent, Core::Id id) const override;
ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, Core::Id id); ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, Core::Id id) override;
bool canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source) const; bool canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source) const override;
ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source); ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source) override;
bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const; bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const override;
ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map); ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) override;
QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *bc) const; QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *bc) const override;
QString displayNameForId(Core::Id id) const; QString displayNameForId(Core::Id id) const override;
}; };
} // namespace Internal } // namespace Internal
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
** **
****************************************************************************/ ****************************************************************************/
#ifndef CMAKEPROJECTMANAGER_INTERNAL_CMAKECBPPARSER_H #ifndef CMAKECBPPARSER_H
#define CMAKEPROJECTMANAGER_INTERNAL_CMAKECBPPARSER_H #define CMAKECBPPARSER_H
#include "cmakeproject.h" #include "cmakeproject.h"
...@@ -73,7 +73,7 @@ private: ...@@ -73,7 +73,7 @@ private:
void sortFiles(); void sortFiles();
QMap<Utils::FileName, QString> m_unitTargetMap; QMap<Utils::FileName, QString> m_unitTargetMap;
ProjectExplorer::Kit *m_kit; ProjectExplorer::Kit *m_kit = 0;
QList<ProjectExplorer::FileNode *> m_fileList; QList<ProjectExplorer::FileNode *> m_fileList;
QList<ProjectExplorer::FileNode *> m_cmakeFileList; QList<ProjectExplorer::FileNode *> m_cmakeFileList;
QSet<Utils::FileName> m_processedUnits; QSet<Utils::FileName> m_processedUnits;
...@@ -91,4 +91,4 @@ private: ...@@ -91,4 +91,4 @@ private:
} // namespace Internal } // namespace Internal
} // namespace CMakeProjectManager } // namespace CMakeProjectManager
#endif // CMAKEPROJECTMANAGER_INTERNAL_CMAKECBPPARSER_H #endif // CMAKECBPPARSER_H
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
** **
****************************************************************************/ ****************************************************************************/
#ifndef CMAKEPROJECTMANAGER_INTERNAL_CMAKEFILE_H #ifndef CMAKEFILE_H
#define CMAKEPROJECTMANAGER_INTERNAL_CMAKEFILE_H #define CMAKEFILE_H
#include <coreplugin/idocument.h> #include <coreplugin/idocument.h>
...@@ -62,4 +62,4 @@ private: ...@@ -62,4 +62,4 @@ private:
} // namespace Internal } // namespace Internal
} // namespace CMakeProjectManager } // namespace CMakeProjectManager
#endif // CMAKEPROJECTMANAGER_INTERNAL_CMAKEFILE_H #endif // CMAKEFILE_H
...@@ -54,9 +54,6 @@ using namespace ProjectExplorer; ...@@ -54,9 +54,6 @@ using namespace ProjectExplorer;
CMakeFileCompletionAssistProvider::CMakeFileCompletionAssistProvider() CMakeFileCompletionAssistProvider::CMakeFileCompletionAssistProvider()
{} {}
CMakeFileCompletionAssistProvider::~CMakeFileCompletionAssistProvider()
{}
bool CMakeFileCompletionAssistProvider::supportsEditor(Core::Id editorId) const bool CMakeFileCompletionAssistProvider::supportsEditor(Core::Id editorId) const
{ {
return editorId == CMakeProjectManager::Constants::CMAKE_EDITOR_ID; return editorId == CMakeProjectManager::Constants::CMAKE_EDITOR_ID;
......
...@@ -54,10 +54,9 @@ class CMakeFileCompletionAssistProvider : public TextEditor::CompletionAssistPro ...@@ -54,10 +54,9 @@ class CMakeFileCompletionAssistProvider : public TextEditor::CompletionAssistPro
public: public:
CMakeFileCompletionAssistProvider(); CMakeFileCompletionAssistProvider();
~CMakeFileCompletionAssistProvider();
bool supportsEditor(Core::Id editorId) const; bool supportsEditor(Core::Id editorId) const override;
TextEditor::IAssistProcessor *createProcessor() const; TextEditor::IAssistProcessor *createProcessor() const override;
}; };
} // Internal } // Internal
......
...@@ -39,10 +39,6 @@ ...@@ -39,10 +39,6 @@
namespace CMakeProjectManager { namespace CMakeProjectManager {
namespace Internal { namespace Internal {
CMakeIndenter::CMakeIndenter()
{
}
bool CMakeIndenter::isElectricCharacter(const QChar &ch) const bool CMakeIndenter::isElectricCharacter(const QChar &ch) const
{ {
return ch == QLatin1Char('(') || ch == QLatin1Char(')'); return ch == QLatin1Char('(') || ch == QLatin1Char(')');
......
...@@ -41,9 +41,6 @@ namespace Internal { ...@@ -41,9 +41,6 @@ namespace Internal {
class CMAKE_EXPORT CMakeIndenter : public TextEditor::Indenter class CMAKE_EXPORT CMakeIndenter : public TextEditor::Indenter
{ {
public: public:
CMakeIndenter();
virtual ~CMakeIndenter() {}
bool isElectricCharacter(const QChar &ch) const override; bool isElectricCharacter(const QChar &ch) const override;
void indentBlock(QTextDocument *doc, const QTextBlock &block, const QChar &typedChar, const TextEditor::TabSettings &tabSettings) override; void indentBlock(QTextDocument *doc, const QTextBlock &block, const QChar &typedChar, const TextEditor::TabSettings &tabSettings) override;
}; };
......
...@@ -48,9 +48,9 @@ namespace Internal { ...@@ -48,9 +48,9 @@ namespace Internal {
CMakeKitConfigWidget::CMakeKitConfigWidget(ProjectExplorer::Kit *kit, CMakeKitConfigWidget::CMakeKitConfigWidget(ProjectExplorer::Kit *kit,
const ProjectExplorer::KitInformation *ki) : const ProjectExplorer::KitInformation *ki) :
ProjectExplorer::KitConfigWidget(kit, ki), ProjectExplorer::KitConfigWidget(kit, ki),
m_removingItem(false) m_comboBox(new QComboBox),
m_manageButton(new QPushButton(KitConfigWidget::msgManage()))
{ {
m_comboBox = new QComboBox;
m_comboBox->setEnabled(false); m_comboBox->setEnabled(false);
m_comboBox->setToolTip(toolTip()); m_comboBox->setToolTip(toolTip());
...@@ -63,7 +63,6 @@ CMakeKitConfigWidget::CMakeKitConfigWidget(ProjectExplorer::Kit *kit, ...@@ -63,7 +63,6 @@ CMakeKitConfigWidget::CMakeKitConfigWidget(ProjectExplorer::Kit *kit,
connect(m_comboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), connect(m_comboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),