forked from qt-creator/qt-creator
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: Tim Jenssen <tim.jenssen@theqtcompany.com>
This commit is contained in:
@@ -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
|
|||||||
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)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
|||||||
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
|
|||||||
{
|
{
|
||||||
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
|
|||||||
|
|
||||||
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:
|
|||||||
|
|
||||||
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
|
|||||||
|
|
||||||
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 @@
|
|||||||
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 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#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
|
|||||||
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
|
|||||||
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()
|
|||||||
// 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
|
|||||||
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()
|
|||||||
|
|
||||||
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)
|
|||||||
{
|
{
|
||||||
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
|
|||||||
{
|
{
|
||||||
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:
|
|||||||
|
|
||||||
static QString cleanTarget();
|
static QString cleanTarget();
|
||||||
|
|
||||||
private:
|
|
||||||
void buildTargetsChanged();
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void cmakeCommandChanged();
|
void cmakeCommandChanged();
|
||||||
void targetsToBuildChanged();
|
void targetsToBuildChanged();
|
||||||
@@ -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:
|
|||||||
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
|
|||||||
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:
|
|||||||
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
|
|||||||
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 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#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:
|
|||||||
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:
|
|||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace CMakeProjectManager
|
} // namespace CMakeProjectManager
|
||||||
|
|
||||||
#endif // CMAKEPROJECTMANAGER_INTERNAL_CMAKECBPPARSER_H
|
#endif // CMAKECBPPARSER_H
|
||||||
|
@@ -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:
|
|||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace CMakeProjectManager
|
} // namespace CMakeProjectManager
|
||||||
|
|
||||||
#endif // CMAKEPROJECTMANAGER_INTERNAL_CMAKEFILE_H
|
#endif // CMAKEFILE_H
|
||||||
|
@@ -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
|
|||||||
|
|
||||||
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 @@
|
|||||||
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 {
|
|||||||
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 {
|
|||||||
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,
|
|||||||
connect(m_comboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
connect(m_comboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
|
||||||
this, &CMakeKitConfigWidget::currentCMakeToolChanged);
|
this, &CMakeKitConfigWidget::currentCMakeToolChanged);
|
||||||
|
|
||||||
m_manageButton = new QPushButton(KitConfigWidget::msgManage());
|
|
||||||
m_manageButton->setContentsMargins(0, 0, 0, 0);
|
m_manageButton->setContentsMargins(0, 0, 0, 0);
|
||||||
connect(m_manageButton, &QPushButton::clicked,
|
connect(m_manageButton, &QPushButton::clicked,
|
||||||
this, &CMakeKitConfigWidget::manageCMakeTools);
|
this, &CMakeKitConfigWidget::manageCMakeTools);
|
||||||
|
@@ -27,8 +27,8 @@
|
|||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#ifndef CMAKEPROJECTMANAGER_INTERNAL_CMAKEKITCONFIGWIDGET_H
|
#ifndef CMAKEKITCONFIGWIDGET_H
|
||||||
#define CMAKEPROJECTMANAGER_INTERNAL_CMAKEKITCONFIGWIDGET_H
|
#define CMAKEKITCONFIGWIDGET_H
|
||||||
|
|
||||||
#include <projectexplorer/kitconfigwidget.h>
|
#include <projectexplorer/kitconfigwidget.h>
|
||||||
|
|
||||||
@@ -70,8 +70,7 @@ private:
|
|||||||
void currentCMakeToolChanged(int index);
|
void currentCMakeToolChanged(int index);
|
||||||
void manageCMakeTools();
|
void manageCMakeTools();
|
||||||
|
|
||||||
private:
|
bool m_removingItem = false;
|
||||||
bool m_removingItem;
|
|
||||||
QComboBox *m_comboBox;
|
QComboBox *m_comboBox;
|
||||||
QPushButton *m_manageButton;
|
QPushButton *m_manageButton;
|
||||||
};
|
};
|
||||||
@@ -79,4 +78,4 @@ private:
|
|||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace CMakeProjectManager
|
} // namespace CMakeProjectManager
|
||||||
|
|
||||||
#endif // CMAKEPROJECTMANAGER_INTERNAL_CMAKEKITCONFIGWIDGET_H
|
#endif // CMAKEKITCONFIGWIDGET_H
|
||||||
|
@@ -27,8 +27,8 @@
|
|||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#ifndef CMAKEPROJECTMANAGER_CMAKEKITINFORMATION_H
|
#ifndef CMAKEKITINFORMATION_H
|
||||||
#define CMAKEPROJECTMANAGER_CMAKEKITINFORMATION_H
|
#define CMAKEKITINFORMATION_H
|
||||||
|
|
||||||
#include "cmake_global.h"
|
#include "cmake_global.h"
|
||||||
|
|
||||||
@@ -55,10 +55,10 @@ public:
|
|||||||
QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const override;
|
QList<ProjectExplorer::Task> validate(const ProjectExplorer::Kit *k) const override;
|
||||||
void setup(ProjectExplorer::Kit *k) override;
|
void setup(ProjectExplorer::Kit *k) override;
|
||||||
void fix(ProjectExplorer::Kit *k) override;
|
void fix(ProjectExplorer::Kit *k) override;
|
||||||
virtual ItemList toUserOutput(const ProjectExplorer::Kit *k) const override;
|
ItemList toUserOutput(const ProjectExplorer::Kit *k) const override;
|
||||||
virtual ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const override;
|
ProjectExplorer::KitConfigWidget *createConfigWidget(ProjectExplorer::Kit *k) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace CMakeProjectManager
|
} // namespace CMakeProjectManager
|
||||||
|
|
||||||
#endif // CMAKEPROJECTMANAGER_CMAKEKITINFORMATION_H
|
#endif // CMAKEKITINFORMATION_H
|
||||||
|
@@ -53,20 +53,15 @@ CMakeLocatorFilter::CMakeLocatorFilter()
|
|||||||
setShortcutString(QLatin1String("cm"));
|
setShortcutString(QLatin1String("cm"));
|
||||||
setPriority(High);
|
setPriority(High);
|
||||||
|
|
||||||
connect(SessionManager::instance(), SIGNAL(projectAdded(ProjectExplorer::Project*)),
|
connect(SessionManager::instance(), &SessionManager::projectAdded,
|
||||||
this, SLOT(slotProjectListUpdated()));
|
this, &CMakeLocatorFilter::slotProjectListUpdated);
|
||||||
connect(SessionManager::instance(), SIGNAL(projectRemoved(ProjectExplorer::Project*)),
|
connect(SessionManager::instance(), &SessionManager::projectRemoved,
|
||||||
this, SLOT(slotProjectListUpdated()));
|
this, &CMakeLocatorFilter::slotProjectListUpdated);
|
||||||
|
|
||||||
// Initialize the filter
|
// Initialize the filter
|
||||||
slotProjectListUpdated();
|
slotProjectListUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
CMakeLocatorFilter::~CMakeLocatorFilter()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void CMakeLocatorFilter::prepareSearch(const QString &entry)
|
void CMakeLocatorFilter::prepareSearch(const QString &entry)
|
||||||
{
|
{
|
||||||
m_result.clear();
|
m_result.clear();
|
||||||
|
@@ -44,18 +44,17 @@ class CMakeLocatorFilter : public Core::ILocatorFilter
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
CMakeLocatorFilter();
|
CMakeLocatorFilter();
|
||||||
~CMakeLocatorFilter();
|
|
||||||
|
|
||||||
void prepareSearch(const QString &entry);
|
void prepareSearch(const QString &entry) override;
|
||||||
QList<Core::LocatorFilterEntry> matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future, const QString &entry);
|
QList<Core::LocatorFilterEntry> matchesFor(QFutureInterface<Core::LocatorFilterEntry> &future,
|
||||||
void accept(Core::LocatorFilterEntry selection) const;
|
const QString &entry) override;
|
||||||
void refresh(QFutureInterface<void> &future);
|
void accept(Core::LocatorFilterEntry selection) const override;
|
||||||
|
void refresh(QFutureInterface<void> &future) override;
|
||||||
|
|
||||||
private slots:
|
|
||||||
void slotProjectListUpdated();
|
|
||||||
private:
|
private:
|
||||||
QList<Core::LocatorFilterEntry> m_result;
|
void slotProjectListUpdated();
|
||||||
|
|
||||||
|
QList<Core::LocatorFilterEntry> m_result;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -215,7 +215,7 @@ void CMakeOpenProjectWizard::setKit(Kit *kit)
|
|||||||
NoKitPage::NoKitPage(CMakeOpenProjectWizard *cmakeWizard)
|
NoKitPage::NoKitPage(CMakeOpenProjectWizard *cmakeWizard)
|
||||||
: QWizardPage(cmakeWizard), m_cmakeWizard(cmakeWizard)
|
: QWizardPage(cmakeWizard), m_cmakeWizard(cmakeWizard)
|
||||||
{
|
{
|
||||||
QVBoxLayout *layout = new QVBoxLayout;
|
auto layout = new QVBoxLayout;
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
|
|
||||||
m_descriptionLabel = new QLabel(this);
|
m_descriptionLabel = new QLabel(this);
|
||||||
@@ -227,7 +227,7 @@ NoKitPage::NoKitPage(CMakeOpenProjectWizard *cmakeWizard)
|
|||||||
|
|
||||||
connect(m_optionsButton, &QAbstractButton::clicked, this, &NoKitPage::showOptions);
|
connect(m_optionsButton, &QAbstractButton::clicked, this, &NoKitPage::showOptions);
|
||||||
|
|
||||||
QHBoxLayout *hbox = new QHBoxLayout;
|
auto hbox = new QHBoxLayout;
|
||||||
hbox->addWidget(m_optionsButton);
|
hbox->addWidget(m_optionsButton);
|
||||||
hbox->addStretch();
|
hbox->addStretch();
|
||||||
|
|
||||||
@@ -272,7 +272,7 @@ InSourceBuildPage::InSourceBuildPage(CMakeOpenProjectWizard *cmakeWizard)
|
|||||||
: QWizardPage(cmakeWizard), m_cmakeWizard(cmakeWizard)
|
: QWizardPage(cmakeWizard), m_cmakeWizard(cmakeWizard)
|
||||||
{
|
{
|
||||||
setLayout(new QVBoxLayout);
|
setLayout(new QVBoxLayout);
|
||||||
QLabel *label = new QLabel(this);
|
auto label = new QLabel(this);
|
||||||
label->setWordWrap(true);
|
label->setWordWrap(true);
|
||||||
label->setText(tr("Qt Creator has detected an <b>in-source-build in %1</b> "
|
label->setText(tr("Qt Creator has detected an <b>in-source-build in %1</b> "
|
||||||
"which prevents shadow builds. Qt Creator will not allow you to change the build directory. "
|
"which prevents shadow builds. Qt Creator will not allow you to change the build directory. "
|
||||||
@@ -285,10 +285,10 @@ InSourceBuildPage::InSourceBuildPage(CMakeOpenProjectWizard *cmakeWizard)
|
|||||||
ShadowBuildPage::ShadowBuildPage(CMakeOpenProjectWizard *cmakeWizard, bool change)
|
ShadowBuildPage::ShadowBuildPage(CMakeOpenProjectWizard *cmakeWizard, bool change)
|
||||||
: QWizardPage(cmakeWizard), m_cmakeWizard(cmakeWizard)
|
: QWizardPage(cmakeWizard), m_cmakeWizard(cmakeWizard)
|
||||||
{
|
{
|
||||||
QFormLayout *fl = new QFormLayout;
|
auto fl = new QFormLayout;
|
||||||
this->setLayout(fl);
|
this->setLayout(fl);
|
||||||
|
|
||||||
QLabel *label = new QLabel(this);
|
auto label = new QLabel(this);
|
||||||
label->setWordWrap(true);
|
label->setWordWrap(true);
|
||||||
if (change)
|
if (change)
|
||||||
label->setText(tr("Please enter the directory in which you want to build your project.") + QLatin1Char(' '));
|
label->setText(tr("Please enter the directory in which you want to build your project.") + QLatin1Char(' '));
|
||||||
@@ -317,10 +317,9 @@ void ShadowBuildPage::buildDirectoryChanged()
|
|||||||
// NoCMakePage
|
// NoCMakePage
|
||||||
/////
|
/////
|
||||||
|
|
||||||
NoCMakePage::NoCMakePage(CMakeOpenProjectWizard *cmakeWizard)
|
NoCMakePage::NoCMakePage(CMakeOpenProjectWizard *cmakeWizard) : QWizardPage(cmakeWizard)
|
||||||
: QWizardPage(cmakeWizard)
|
|
||||||
{
|
{
|
||||||
QVBoxLayout *layout = new QVBoxLayout;
|
auto layout = new QVBoxLayout;
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
|
|
||||||
m_descriptionLabel = new QLabel(this);
|
m_descriptionLabel = new QLabel(this);
|
||||||
@@ -332,7 +331,7 @@ NoCMakePage::NoCMakePage(CMakeOpenProjectWizard *cmakeWizard)
|
|||||||
|
|
||||||
connect(m_optionsButton, &QAbstractButton::clicked, this, &NoCMakePage::showOptions);
|
connect(m_optionsButton, &QAbstractButton::clicked, this, &NoCMakePage::showOptions);
|
||||||
|
|
||||||
QHBoxLayout *hbox = new QHBoxLayout;
|
auto hbox = new QHBoxLayout;
|
||||||
hbox->addWidget(m_optionsButton);
|
hbox->addWidget(m_optionsButton);
|
||||||
hbox->addStretch();
|
hbox->addStretch();
|
||||||
|
|
||||||
@@ -370,55 +369,48 @@ void NoCMakePage::showOptions()
|
|||||||
|
|
||||||
CMakeRunPage::CMakeRunPage(CMakeOpenProjectWizard *cmakeWizard, Mode mode,
|
CMakeRunPage::CMakeRunPage(CMakeOpenProjectWizard *cmakeWizard, Mode mode,
|
||||||
const QString &buildDirectory, const QString &initialArguments,
|
const QString &buildDirectory, const QString &initialArguments,
|
||||||
const QString &kitName, const QString &buildConfigurationName)
|
const QString &kitName, const QString &buildConfigurationName) :
|
||||||
: QWizardPage(cmakeWizard),
|
QWizardPage(cmakeWizard),
|
||||||
m_cmakeWizard(cmakeWizard),
|
m_cmakeWizard(cmakeWizard),
|
||||||
m_haveCbpFile(false),
|
m_descriptionLabel(new QLabel(this)),
|
||||||
|
m_argumentsLineEdit(new Utils::FancyLineEdit(this)),
|
||||||
|
m_generatorComboBox(new QComboBox(this)),
|
||||||
|
m_generatorExtraText(new QLabel(this)),
|
||||||
|
m_runCMake(new QPushButton(this)),
|
||||||
|
m_output(new QPlainTextEdit(this)),
|
||||||
|
m_exitCodeLabel(new QLabel(this)),
|
||||||
|
m_continueCheckBox(new QCheckBox(this)),
|
||||||
m_mode(mode),
|
m_mode(mode),
|
||||||
m_buildDirectory(buildDirectory),
|
m_buildDirectory(buildDirectory),
|
||||||
m_kitName(kitName),
|
m_kitName(kitName),
|
||||||
m_buildConfigurationName(buildConfigurationName)
|
m_buildConfigurationName(buildConfigurationName)
|
||||||
{
|
{
|
||||||
initWidgets();
|
auto fl = new QFormLayout;
|
||||||
m_argumentsLineEdit->setText(initialArguments);
|
|
||||||
}
|
|
||||||
|
|
||||||
void CMakeRunPage::initWidgets()
|
|
||||||
{
|
|
||||||
QFormLayout *fl = new QFormLayout;
|
|
||||||
fl->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
|
fl->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
|
||||||
setLayout(fl);
|
setLayout(fl);
|
||||||
// Description Label
|
// Description Label
|
||||||
m_descriptionLabel = new QLabel(this);
|
|
||||||
m_descriptionLabel->setWordWrap(true);
|
m_descriptionLabel->setWordWrap(true);
|
||||||
|
|
||||||
fl->addRow(m_descriptionLabel);
|
fl->addRow(m_descriptionLabel);
|
||||||
|
|
||||||
// Run CMake Line (with arguments)
|
// Run CMake Line (with arguments)
|
||||||
m_argumentsLineEdit = new Utils::FancyLineEdit(this);
|
|
||||||
m_argumentsLineEdit->setHistoryCompleter(QLatin1String("CMakeArgumentsLineEdit"));
|
m_argumentsLineEdit->setHistoryCompleter(QLatin1String("CMakeArgumentsLineEdit"));
|
||||||
m_argumentsLineEdit->selectAll();
|
m_argumentsLineEdit->selectAll();
|
||||||
|
|
||||||
connect(m_argumentsLineEdit, &QLineEdit::returnPressed, this, &CMakeRunPage::runCMake);
|
connect(m_argumentsLineEdit, &QLineEdit::returnPressed, this, &CMakeRunPage::runCMake);
|
||||||
fl->addRow(tr("Arguments:"), m_argumentsLineEdit);
|
fl->addRow(tr("Arguments:"), m_argumentsLineEdit);
|
||||||
|
|
||||||
m_generatorComboBox = new QComboBox(this);
|
|
||||||
fl->addRow(tr("Generator:"), m_generatorComboBox);
|
fl->addRow(tr("Generator:"), m_generatorComboBox);
|
||||||
|
|
||||||
m_generatorExtraText = new QLabel(this);
|
|
||||||
fl->addRow(m_generatorExtraText);
|
fl->addRow(m_generatorExtraText);
|
||||||
|
|
||||||
m_runCMake = new QPushButton(this);
|
|
||||||
m_runCMake->setText(tr("Run CMake"));
|
m_runCMake->setText(tr("Run CMake"));
|
||||||
connect(m_runCMake, &QAbstractButton::clicked, this, &CMakeRunPage::runCMake);
|
connect(m_runCMake, &QAbstractButton::clicked, this, &CMakeRunPage::runCMake);
|
||||||
|
|
||||||
QHBoxLayout *hbox2 = new QHBoxLayout;
|
auto hbox2 = new QHBoxLayout;
|
||||||
hbox2->addStretch(10);
|
hbox2->addStretch(10);
|
||||||
hbox2->addWidget(m_runCMake);
|
hbox2->addWidget(m_runCMake);
|
||||||
fl->addRow(hbox2);
|
fl->addRow(hbox2);
|
||||||
|
|
||||||
// Bottom output window
|
// Bottom output window
|
||||||
m_output = new QPlainTextEdit(this);
|
|
||||||
m_output->setReadOnly(true);
|
m_output->setReadOnly(true);
|
||||||
// set smaller minimum size to avoid vanishing descriptions if all of the
|
// set smaller minimum size to avoid vanishing descriptions if all of the
|
||||||
// above is shown and the dialog not vertically resizing to fit stuff in (Mac)
|
// above is shown and the dialog not vertically resizing to fit stuff in (Mac)
|
||||||
@@ -431,19 +423,18 @@ void CMakeRunPage::initWidgets()
|
|||||||
m_output->setSizePolicy(pl);
|
m_output->setSizePolicy(pl);
|
||||||
fl->addRow(m_output);
|
fl->addRow(m_output);
|
||||||
|
|
||||||
m_exitCodeLabel = new QLabel(this);
|
|
||||||
m_exitCodeLabel->setVisible(false);
|
m_exitCodeLabel->setVisible(false);
|
||||||
fl->addRow(m_exitCodeLabel);
|
fl->addRow(m_exitCodeLabel);
|
||||||
|
|
||||||
m_continueCheckBox = new QCheckBox(this);
|
|
||||||
m_continueCheckBox->setVisible(false);
|
m_continueCheckBox->setVisible(false);
|
||||||
m_continueCheckBox->setText(tr("Open project with errors."));
|
m_continueCheckBox->setText(tr("Open project with errors."));
|
||||||
fl->addRow(m_continueCheckBox);
|
|
||||||
|
|
||||||
connect(m_continueCheckBox, &QCheckBox::toggled, this, &CMakeRunPage::completeChanged);
|
connect(m_continueCheckBox, &QCheckBox::toggled, this, &CMakeRunPage::completeChanged);
|
||||||
|
fl->addRow(m_continueCheckBox);
|
||||||
|
|
||||||
setTitle(tr("Run CMake"));
|
setTitle(tr("Run CMake"));
|
||||||
setMinimumSize(600, 400);
|
setMinimumSize(600, 400);
|
||||||
|
|
||||||
|
m_argumentsLineEdit->setText(initialArguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray CMakeRunPage::cachedGeneratorFromFile(const QString &cache)
|
QByteArray CMakeRunPage::cachedGeneratorFromFile(const QString &cache)
|
||||||
@@ -532,6 +523,7 @@ bool CMakeRunPage::validatePage()
|
|||||||
|
|
||||||
void CMakeRunPage::runCMake()
|
void CMakeRunPage::runCMake()
|
||||||
{
|
{
|
||||||
|
QTC_ASSERT(!m_cmakeProcess, return);
|
||||||
m_haveCbpFile = false;
|
m_haveCbpFile = false;
|
||||||
|
|
||||||
Utils::Environment env = m_cmakeWizard->environment();
|
Utils::Environment env = m_cmakeWizard->environment();
|
||||||
|
@@ -111,11 +111,10 @@ public:
|
|||||||
bool isComplete() const override;
|
bool isComplete() const override;
|
||||||
void initializePage() override;
|
void initializePage() override;
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void kitsChanged();
|
void kitsChanged();
|
||||||
void showOptions();
|
void showOptions();
|
||||||
|
|
||||||
private:
|
|
||||||
QLabel *m_descriptionLabel;
|
QLabel *m_descriptionLabel;
|
||||||
QPushButton *m_optionsButton;
|
QPushButton *m_optionsButton;
|
||||||
CMakeOpenProjectWizard *m_cmakeWizard;
|
CMakeOpenProjectWizard *m_cmakeWizard;
|
||||||
@@ -126,6 +125,7 @@ class InSourceBuildPage : public QWizardPage
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
InSourceBuildPage(CMakeOpenProjectWizard *cmakeWizard);
|
InSourceBuildPage(CMakeOpenProjectWizard *cmakeWizard);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CMakeOpenProjectWizard *m_cmakeWizard;
|
CMakeOpenProjectWizard *m_cmakeWizard;
|
||||||
};
|
};
|
||||||
@@ -148,7 +148,7 @@ class NoCMakePage : public QWizardPage
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
NoCMakePage(CMakeOpenProjectWizard *cmakeWizard);
|
NoCMakePage(CMakeOpenProjectWizard *cmakeWizard);
|
||||||
bool isComplete() const;
|
bool isComplete() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void cmakeToolsChanged();
|
void cmakeToolsChanged();
|
||||||
@@ -169,10 +169,10 @@ public:
|
|||||||
const QString &kitName,
|
const QString &kitName,
|
||||||
const QString &buildConfigurationName);
|
const QString &buildConfigurationName);
|
||||||
|
|
||||||
virtual void initializePage();
|
void initializePage() override;
|
||||||
virtual bool validatePage();
|
bool validatePage() override;
|
||||||
virtual void cleanupPage();
|
void cleanupPage() override;
|
||||||
virtual bool isComplete() const;
|
bool isComplete() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void runCMake();
|
void runCMake();
|
||||||
@@ -180,27 +180,26 @@ private:
|
|||||||
void cmakeReadyReadStandardOutput();
|
void cmakeReadyReadStandardOutput();
|
||||||
void cmakeReadyReadStandardError();
|
void cmakeReadyReadStandardError();
|
||||||
|
|
||||||
void initWidgets();
|
|
||||||
QByteArray cachedGeneratorFromFile(const QString &cache);
|
QByteArray cachedGeneratorFromFile(const QString &cache);
|
||||||
|
|
||||||
CMakeOpenProjectWizard *m_cmakeWizard;
|
CMakeOpenProjectWizard *m_cmakeWizard;
|
||||||
QPlainTextEdit *m_output;
|
QLabel *m_descriptionLabel;
|
||||||
QPushButton *m_runCMake;
|
|
||||||
Utils::QtcProcess *m_cmakeProcess;
|
|
||||||
Utils::FancyLineEdit *m_argumentsLineEdit;
|
Utils::FancyLineEdit *m_argumentsLineEdit;
|
||||||
QComboBox *m_generatorComboBox;
|
QComboBox *m_generatorComboBox;
|
||||||
QLabel *m_generatorExtraText;
|
QLabel *m_generatorExtraText;
|
||||||
QLabel *m_descriptionLabel;
|
QPushButton *m_runCMake;
|
||||||
|
QPlainTextEdit *m_output;
|
||||||
QLabel *m_exitCodeLabel;
|
QLabel *m_exitCodeLabel;
|
||||||
QCheckBox *m_continueCheckBox;
|
QCheckBox *m_continueCheckBox;
|
||||||
bool m_haveCbpFile;
|
Utils::QtcProcess *m_cmakeProcess = 0;
|
||||||
|
bool m_haveCbpFile = false;
|
||||||
Mode m_mode;
|
Mode m_mode;
|
||||||
QString m_buildDirectory;
|
QString m_buildDirectory;
|
||||||
QString m_kitName;
|
QString m_kitName;
|
||||||
QString m_buildConfigurationName;
|
QString m_buildConfigurationName;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // namespace Internal
|
||||||
}
|
} // namespace CMakeProjectManager
|
||||||
|
|
||||||
#endif // CMAKEOPENPROJECTWIZARD_H
|
#endif // CMAKEOPENPROJECTWIZARD_H
|
||||||
|
@@ -42,8 +42,7 @@ using namespace ProjectExplorer;
|
|||||||
const char COMMON_ERROR_PATTERN[] = "^CMake Error at (.*):([0-9]*) \\((.*)\\):";
|
const char COMMON_ERROR_PATTERN[] = "^CMake Error at (.*):([0-9]*) \\((.*)\\):";
|
||||||
const char NEXT_SUBERROR_PATTERN[] = "^CMake Error in (.*):";
|
const char NEXT_SUBERROR_PATTERN[] = "^CMake Error in (.*):";
|
||||||
|
|
||||||
CMakeParser::CMakeParser() :
|
CMakeParser::CMakeParser()
|
||||||
m_skippedFirstEmptyLine(false)
|
|
||||||
{
|
{
|
||||||
m_commonError.setPattern(QLatin1String(COMMON_ERROR_PATTERN));
|
m_commonError.setPattern(QLatin1String(COMMON_ERROR_PATTERN));
|
||||||
m_commonError.setMinimal(true);
|
m_commonError.setMinimal(true);
|
||||||
|
@@ -28,8 +28,8 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef CMAKEOUTPUTPARSER_H
|
#ifndef CMAKEPARSER_H
|
||||||
#define CMAKEOUTPUTPARSER_H
|
#define CMAKEPARSER_H
|
||||||
|
|
||||||
#include <projectexplorer/ioutputparser.h>
|
#include <projectexplorer/ioutputparser.h>
|
||||||
#include <projectexplorer/task.h>
|
#include <projectexplorer/task.h>
|
||||||
@@ -43,20 +43,20 @@ class CMakeParser : public ProjectExplorer::IOutputParser
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CMakeParser();
|
explicit CMakeParser();
|
||||||
void stdError(const QString &line);
|
void stdError(const QString &line) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void doFlush();
|
void doFlush() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ProjectExplorer::Task m_lastTask;
|
ProjectExplorer::Task m_lastTask;
|
||||||
QRegExp m_commonError;
|
QRegExp m_commonError;
|
||||||
QRegExp m_nextSubError;
|
QRegExp m_nextSubError;
|
||||||
bool m_skippedFirstEmptyLine;
|
bool m_skippedFirstEmptyLine = false;
|
||||||
int m_lines = 0;
|
int m_lines = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace CMakeProjectManager
|
} // namespace CMakeProjectManager
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|
||||||
#endif // CMAKEOUTPUTPARSER_H
|
#endif // CMAKEPARSER_H
|
||||||
|
@@ -46,19 +46,18 @@ class CMakePreloadCacheKitConfigWidget : public ProjectExplorer::KitConfigWidget
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
CMakePreloadCacheKitConfigWidget(ProjectExplorer::Kit *k, const ProjectExplorer::KitInformation *ki);
|
CMakePreloadCacheKitConfigWidget(ProjectExplorer::Kit *k, const ProjectExplorer::KitInformation *ki);
|
||||||
~CMakePreloadCacheKitConfigWidget();
|
~CMakePreloadCacheKitConfigWidget() override;
|
||||||
|
|
||||||
QWidget *mainWidget() const;
|
QWidget *mainWidget() const override;
|
||||||
QString displayName() const;
|
QString displayName() const override;
|
||||||
QString toolTip() const;
|
QString toolTip() const override;
|
||||||
|
|
||||||
void makeReadOnly();
|
void makeReadOnly() override;
|
||||||
void refresh();
|
void refresh() override;
|
||||||
|
|
||||||
private slots:
|
|
||||||
void preloadFileWasChanged(const QString &text);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void preloadFileWasChanged(const QString &text);
|
||||||
|
|
||||||
QLineEdit *m_lineEdit = nullptr;
|
QLineEdit *m_lineEdit = nullptr;
|
||||||
bool m_ignoreChange = false;
|
bool m_ignoreChange = false;
|
||||||
};
|
};
|
||||||
|
@@ -27,8 +27,8 @@
|
|||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#ifndef CMAKEPROJECTMANAGER_CMAKEPRELOADCACHEKITINFORMATION_H
|
#ifndef CMAKEPRELOADCACHEKITINFORMATION_H
|
||||||
#define CMAKEPROJECTMANAGER_CMAKEPRELOADCACHEKITINFORMATION_H
|
#define CMAKEPRELOADCACHEKITINFORMATION_H
|
||||||
|
|
||||||
#include "cmake_global.h"
|
#include "cmake_global.h"
|
||||||
|
|
||||||
@@ -58,4 +58,4 @@ public:
|
|||||||
|
|
||||||
} // namespace CMakeProjectManager
|
} // namespace CMakeProjectManager
|
||||||
|
|
||||||
#endif // CMAKEPROJECTMANAGER_CMAKEPRELOADCACHEKITINFORMATION_H
|
#endif // CMAKEPRELOADCACHEKITINFORMATION_H
|
||||||
|
@@ -501,7 +501,7 @@ ProjectExplorer::FolderNode *CMakeProject::findOrCreateFolder(CMakeProjectNode *
|
|||||||
}
|
}
|
||||||
if (!found) {
|
if (!found) {
|
||||||
// No FolderNode yet, so create it
|
// No FolderNode yet, so create it
|
||||||
ProjectExplorer::FolderNode *tmp = new ProjectExplorer::FolderNode(path);
|
auto tmp = new ProjectExplorer::FolderNode(path);
|
||||||
tmp->setDisplayName(part);
|
tmp->setDisplayName(part);
|
||||||
parent->addFolderNodes(QList<ProjectExplorer::FolderNode *>() << tmp);
|
parent->addFolderNodes(QList<ProjectExplorer::FolderNode *>() << tmp);
|
||||||
parent = tmp;
|
parent = tmp;
|
||||||
|
@@ -69,8 +69,9 @@ enum TargetType {
|
|||||||
UtilityType = 64
|
UtilityType = 64
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CMAKE_EXPORT CMakeBuildTarget
|
class CMAKE_EXPORT CMakeBuildTarget
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
QString title;
|
QString title;
|
||||||
QString executable; // TODO: rename to output?
|
QString executable; // TODO: rename to output?
|
||||||
TargetType targetType;
|
TargetType targetType;
|
||||||
@@ -131,14 +132,13 @@ protected:
|
|||||||
// called by CMakeBuildSettingsWidget
|
// called by CMakeBuildSettingsWidget
|
||||||
void changeBuildDirectory(Internal::CMakeBuildConfiguration *bc, const QString &newBuildDirectory);
|
void changeBuildDirectory(Internal::CMakeBuildConfiguration *bc, const QString &newBuildDirectory);
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void fileChanged(const QString &fileName);
|
void fileChanged(const QString &fileName);
|
||||||
void activeTargetWasChanged(ProjectExplorer::Target *target);
|
void activeTargetWasChanged(ProjectExplorer::Target *target);
|
||||||
void changeActiveBuildConfiguration(ProjectExplorer::BuildConfiguration*);
|
void changeActiveBuildConfiguration(ProjectExplorer::BuildConfiguration*);
|
||||||
|
|
||||||
void updateRunConfigurations();
|
void updateRunConfigurations();
|
||||||
|
|
||||||
private:
|
|
||||||
void buildTree(Internal::CMakeProjectNode *rootNode, QList<ProjectExplorer::FileNode *> list);
|
void buildTree(Internal::CMakeProjectNode *rootNode, QList<ProjectExplorer::FileNode *> list);
|
||||||
void gatherFileNodes(ProjectExplorer::FolderNode *parent, QList<ProjectExplorer::FileNode *> &list);
|
void gatherFileNodes(ProjectExplorer::FolderNode *parent, QList<ProjectExplorer::FileNode *> &list);
|
||||||
ProjectExplorer::FolderNode *findOrCreateFolder(Internal::CMakeProjectNode *rootNode, QString directory);
|
ProjectExplorer::FolderNode *findOrCreateFolder(Internal::CMakeProjectNode *rootNode, QString directory);
|
||||||
|
@@ -52,7 +52,9 @@
|
|||||||
|
|
||||||
using namespace CMakeProjectManager::Internal;
|
using namespace CMakeProjectManager::Internal;
|
||||||
|
|
||||||
CMakeManager::CMakeManager()
|
CMakeManager::CMakeManager() :
|
||||||
|
m_runCMakeAction(new QAction(QIcon(), tr("Run CMake"), this)),
|
||||||
|
m_runCMakeActionContextMenu(new QAction(QIcon(), tr("Run CMake"), this))
|
||||||
{
|
{
|
||||||
Core::ActionContainer *mbuild =
|
Core::ActionContainer *mbuild =
|
||||||
Core::ActionManager::actionContainer(ProjectExplorer::Constants::M_BUILDPROJECT);
|
Core::ActionManager::actionContainer(ProjectExplorer::Constants::M_BUILDPROJECT);
|
||||||
@@ -64,7 +66,6 @@ CMakeManager::CMakeManager()
|
|||||||
const Core::Context projectContext(CMakeProjectManager::Constants::PROJECTCONTEXT);
|
const Core::Context projectContext(CMakeProjectManager::Constants::PROJECTCONTEXT);
|
||||||
const Core::Context globalcontext(Core::Constants::C_GLOBAL);
|
const Core::Context globalcontext(Core::Constants::C_GLOBAL);
|
||||||
|
|
||||||
m_runCMakeAction = new QAction(QIcon(), tr("Run CMake"), this);
|
|
||||||
Core::Command *command = Core::ActionManager::registerAction(m_runCMakeAction,
|
Core::Command *command = Core::ActionManager::registerAction(m_runCMakeAction,
|
||||||
Constants::RUNCMAKE, globalcontext);
|
Constants::RUNCMAKE, globalcontext);
|
||||||
command->setAttribute(Core::Command::CA_Hide);
|
command->setAttribute(Core::Command::CA_Hide);
|
||||||
@@ -73,7 +74,6 @@ CMakeManager::CMakeManager()
|
|||||||
runCMake(ProjectExplorer::SessionManager::startupProject());
|
runCMake(ProjectExplorer::SessionManager::startupProject());
|
||||||
});
|
});
|
||||||
|
|
||||||
m_runCMakeActionContextMenu = new QAction(QIcon(), tr("Run CMake"), this);
|
|
||||||
command = Core::ActionManager::registerAction(m_runCMakeActionContextMenu,
|
command = Core::ActionManager::registerAction(m_runCMakeActionContextMenu,
|
||||||
Constants::RUNCMAKECONTEXTMENU, projectContext);
|
Constants::RUNCMAKECONTEXTMENU, projectContext);
|
||||||
command->setAttribute(Core::Command::CA_Hide);
|
command->setAttribute(Core::Command::CA_Hide);
|
||||||
|
@@ -55,8 +55,8 @@ class CMakeManager : public ProjectExplorer::IProjectManager
|
|||||||
public:
|
public:
|
||||||
CMakeManager();
|
CMakeManager();
|
||||||
|
|
||||||
virtual ProjectExplorer::Project *openProject(const QString &fileName, QString *errorString);
|
ProjectExplorer::Project *openProject(const QString &fileName, QString *errorString) override;
|
||||||
virtual QString mimeType() const;
|
QString mimeType() const override;
|
||||||
|
|
||||||
void createXmlFile(Utils::QtcProcess *process,
|
void createXmlFile(Utils::QtcProcess *process,
|
||||||
const QString &executable,
|
const QString &executable,
|
||||||
@@ -73,8 +73,6 @@ private:
|
|||||||
void updateRunCmakeAction();
|
void updateRunCmakeAction();
|
||||||
void runCMake(ProjectExplorer::Project *project);
|
void runCMake(ProjectExplorer::Project *project);
|
||||||
|
|
||||||
private:
|
|
||||||
CMakeSettingsPage *m_settingsPage;
|
|
||||||
QAction *m_runCMakeAction;
|
QAction *m_runCMakeAction;
|
||||||
QAction *m_runCMakeActionContextMenu;
|
QAction *m_runCMakeActionContextMenu;
|
||||||
};
|
};
|
||||||
|
@@ -28,8 +28,8 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef CMAKEPROJECTNODE_H
|
#ifndef CMAKEPROJECTNODES_H
|
||||||
#define CMAKEPROJECTNODE_H
|
#define CMAKEPROJECTNODES_H
|
||||||
|
|
||||||
#include <projectexplorer/projectnodes.h>
|
#include <projectexplorer/projectnodes.h>
|
||||||
|
|
||||||
@@ -49,4 +49,4 @@ public:
|
|||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace CMakeProjectManager
|
} // namespace CMakeProjectManager
|
||||||
|
|
||||||
#endif // CMAKEPROJECTNODE_H
|
#endif // CMAKEPROJECTNODES_H
|
||||||
|
@@ -52,14 +52,6 @@
|
|||||||
|
|
||||||
using namespace CMakeProjectManager::Internal;
|
using namespace CMakeProjectManager::Internal;
|
||||||
|
|
||||||
CMakeProjectPlugin::CMakeProjectPlugin()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
CMakeProjectPlugin::~CMakeProjectPlugin()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CMakeProjectPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage)
|
bool CMakeProjectPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage)
|
||||||
{
|
{
|
||||||
Q_UNUSED(errorMessage)
|
Q_UNUSED(errorMessage)
|
||||||
|
@@ -41,19 +41,15 @@ class CMakeToolManager;
|
|||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class CMakeProjectPlugin
|
class CMakeProjectPlugin : public ExtensionSystem::IPlugin
|
||||||
: public ExtensionSystem::IPlugin
|
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "CMakeProjectManager.json")
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "CMakeProjectManager.json")
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CMakeProjectPlugin();
|
bool initialize(const QStringList &arguments, QString *errorMessage) override;
|
||||||
~CMakeProjectPlugin();
|
|
||||||
|
|
||||||
bool initialize(const QStringList &arguments, QString *errorMessage);
|
void extensionsInitialized() override;
|
||||||
|
|
||||||
void extensionsInitialized();
|
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
#ifdef WITH_TESTS
|
#ifdef WITH_TESTS
|
||||||
|
@@ -68,8 +68,7 @@ CMakeRunConfiguration::CMakeRunConfiguration(Target *parent, Core::Id id, const
|
|||||||
const QString &workingDirectory, const QString &title) :
|
const QString &workingDirectory, const QString &title) :
|
||||||
LocalApplicationRunConfiguration(parent, id),
|
LocalApplicationRunConfiguration(parent, id),
|
||||||
m_buildTarget(target),
|
m_buildTarget(target),
|
||||||
m_title(title),
|
m_title(title)
|
||||||
m_enabled(true)
|
|
||||||
{
|
{
|
||||||
addExtraAspect(new LocalEnvironmentAspect(this));
|
addExtraAspect(new LocalEnvironmentAspect(this));
|
||||||
addExtraAspect(new ArgumentsAspect(this, QStringLiteral("CMakeProjectManager.CMakeRunConfiguration.Arguments")));
|
addExtraAspect(new ArgumentsAspect(this, QStringLiteral("CMakeProjectManager.CMakeRunConfiguration.Arguments")));
|
||||||
@@ -224,10 +223,6 @@ CMakeRunConfigurationFactory::CMakeRunConfigurationFactory(QObject *parent) :
|
|||||||
IRunConfigurationFactory(parent)
|
IRunConfigurationFactory(parent)
|
||||||
{ setObjectName(QLatin1String("CMakeRunConfigurationFactory")); }
|
{ setObjectName(QLatin1String("CMakeRunConfigurationFactory")); }
|
||||||
|
|
||||||
CMakeRunConfigurationFactory::~CMakeRunConfigurationFactory()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// used to show the list of possible additons to a project, returns a list of ids
|
// used to show the list of possible additons to a project, returns a list of ids
|
||||||
QList<Core::Id> CMakeRunConfigurationFactory::availableCreationIds(Target *parent, CreationMode mode) const
|
QList<Core::Id> CMakeRunConfigurationFactory::availableCreationIds(Target *parent, CreationMode mode) const
|
||||||
{
|
{
|
||||||
|
@@ -78,7 +78,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
CMakeRunConfiguration(ProjectExplorer::Target *parent, CMakeRunConfiguration *source);
|
CMakeRunConfiguration(ProjectExplorer::Target *parent, CMakeRunConfiguration *source);
|
||||||
virtual bool fromMap(const QVariantMap &map) override;
|
bool fromMap(const QVariantMap &map) override;
|
||||||
QString defaultDisplayName() const;
|
QString defaultDisplayName() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -87,7 +87,7 @@ private:
|
|||||||
|
|
||||||
QString m_buildTarget;
|
QString m_buildTarget;
|
||||||
QString m_title;
|
QString m_title;
|
||||||
bool m_enabled;
|
bool m_enabled = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CMakeRunConfigurationWidget : public QWidget
|
class CMakeRunConfigurationWidget : public QWidget
|
||||||
@@ -104,15 +104,15 @@ class CMakeRunConfigurationFactory : public ProjectExplorer::IRunConfigurationFa
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
explicit CMakeRunConfigurationFactory(QObject *parent = 0);
|
explicit CMakeRunConfigurationFactory(QObject *parent = 0);
|
||||||
~CMakeRunConfigurationFactory();
|
|
||||||
|
|
||||||
bool canCreate(ProjectExplorer::Target *parent, Core::Id id) const;
|
bool canCreate(ProjectExplorer::Target *parent, Core::Id id) const override;
|
||||||
bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
|
bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const override;
|
||||||
bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *product) const;
|
bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *product) const override;
|
||||||
ProjectExplorer::RunConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *product);
|
ProjectExplorer::RunConfiguration *clone(ProjectExplorer::Target *parent,
|
||||||
|
ProjectExplorer::RunConfiguration *product) override;
|
||||||
|
|
||||||
QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent, CreationMode mode) const;
|
QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent, CreationMode mode) const override;
|
||||||
QString displayNameForId(Core::Id id) const;
|
QString displayNameForId(Core::Id id) const override;
|
||||||
|
|
||||||
static Core::Id idFromBuildTarget(const QString &target);
|
static Core::Id idFromBuildTarget(const QString &target);
|
||||||
static QString buildTargetFromId(Core::Id id);
|
static QString buildTargetFromId(Core::Id id);
|
||||||
@@ -120,12 +120,12 @@ public:
|
|||||||
private:
|
private:
|
||||||
bool canHandle(ProjectExplorer::Target *parent) const;
|
bool canHandle(ProjectExplorer::Target *parent) const;
|
||||||
|
|
||||||
ProjectExplorer::RunConfiguration *doCreate(ProjectExplorer::Target *parent, Core::Id id);
|
ProjectExplorer::RunConfiguration *doCreate(ProjectExplorer::Target *parent, Core::Id id) override;
|
||||||
ProjectExplorer::RunConfiguration *doRestore(ProjectExplorer::Target *parent,
|
ProjectExplorer::RunConfiguration *doRestore(ProjectExplorer::Target *parent,
|
||||||
const QVariantMap &map);
|
const QVariantMap &map) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // namespace Internal
|
||||||
}
|
} // namespace CMakeProjectManager
|
||||||
|
|
||||||
#endif // CMAKERUNCONFIGURATION_H
|
#endif // CMAKERUNCONFIGURATION_H
|
||||||
|
@@ -537,7 +537,7 @@ void CMakeToolConfigWidget::currentCMakeToolChanged(const QModelIndex &newCurren
|
|||||||
// CMakeSettingsPage
|
// CMakeSettingsPage
|
||||||
////
|
////
|
||||||
|
|
||||||
CMakeSettingsPage::CMakeSettingsPage() : m_widget(0)
|
CMakeSettingsPage::CMakeSettingsPage()
|
||||||
{
|
{
|
||||||
setId(Constants::CMAKE_SETTINGSPAGE_ID);
|
setId(Constants::CMAKE_SETTINGSPAGE_ID);
|
||||||
setDisplayName(tr("CMake"));
|
setDisplayName(tr("CMake"));
|
||||||
@@ -547,10 +547,6 @@ CMakeSettingsPage::CMakeSettingsPage() : m_widget(0)
|
|||||||
setCategoryIcon(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
|
setCategoryIcon(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
|
||||||
}
|
}
|
||||||
|
|
||||||
CMakeSettingsPage::~CMakeSettingsPage()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QWidget *CMakeSettingsPage::widget()
|
QWidget *CMakeSettingsPage::widget()
|
||||||
{
|
{
|
||||||
if (!m_widget)
|
if (!m_widget)
|
||||||
|
@@ -27,8 +27,8 @@
|
|||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#ifndef CMAKEPROJECTMANAGER_INTERNAL_CMAKESETTINGSPAGE_H
|
#ifndef CMAKESETTINGSPAGE_H
|
||||||
#define CMAKEPROJECTMANAGER_INTERNAL_CMAKESETTINGSPAGE_H
|
#define CMAKESETTINGSPAGE_H
|
||||||
|
|
||||||
#include <coreplugin/dialogs/ioptionspage.h>
|
#include <coreplugin/dialogs/ioptionspage.h>
|
||||||
#include <utils/pathchooser.h>
|
#include <utils/pathchooser.h>
|
||||||
@@ -48,17 +48,16 @@ class CMakeSettingsPage : public Core::IOptionsPage
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
CMakeSettingsPage();
|
CMakeSettingsPage();
|
||||||
~CMakeSettingsPage();
|
|
||||||
|
|
||||||
QWidget *widget();
|
QWidget *widget() override;
|
||||||
void apply();
|
void apply() override;
|
||||||
void finish();
|
void finish() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CMakeToolConfigWidget *m_widget;
|
CMakeToolConfigWidget *m_widget = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace CMakeProjectManager
|
} // namespace CMakeProjectManager
|
||||||
|
|
||||||
#endif // CMAKEPROJECTMANAGER_INTERNAL_CMAKESETTINGSPAGE_H
|
#endif // CMAKESETTINGSPAGE_H
|
||||||
|
@@ -48,11 +48,8 @@ const char CMAKE_INFORMATION_AUTODETECTED[] = "AutoDetected";
|
|||||||
///////////////////////////
|
///////////////////////////
|
||||||
// CMakeTool
|
// CMakeTool
|
||||||
///////////////////////////
|
///////////////////////////
|
||||||
CMakeTool::CMakeTool(Detection d, const Core::Id &id)
|
CMakeTool::CMakeTool(Detection d, const Core::Id &id) :
|
||||||
: m_state(Invalid), m_process(0),
|
|
||||||
m_isAutoDetected(d == AutoDetection),
|
m_isAutoDetected(d == AutoDetection),
|
||||||
m_hasCodeBlocksMsvcGenerator(false),
|
|
||||||
m_hasCodeBlocksNinjaGenerator(false),
|
|
||||||
m_id(id)
|
m_id(id)
|
||||||
{
|
{
|
||||||
//make sure every CMakeTool has a valid ID
|
//make sure every CMakeTool has a valid ID
|
||||||
@@ -60,11 +57,8 @@ CMakeTool::CMakeTool(Detection d, const Core::Id &id)
|
|||||||
createId();
|
createId();
|
||||||
}
|
}
|
||||||
|
|
||||||
CMakeTool::CMakeTool(const QVariantMap &map, bool fromSdk)
|
CMakeTool::CMakeTool(const QVariantMap &map, bool fromSdk) :
|
||||||
: m_state(Invalid), m_process(0),
|
m_isAutoDetected(fromSdk)
|
||||||
m_isAutoDetected(fromSdk),
|
|
||||||
m_hasCodeBlocksMsvcGenerator(false),
|
|
||||||
m_hasCodeBlocksNinjaGenerator(false)
|
|
||||||
{
|
{
|
||||||
m_id = Core::Id::fromSetting(map.value(QLatin1String(CMAKE_INFORMATION_ID)));
|
m_id = Core::Id::fromSetting(map.value(QLatin1String(CMAKE_INFORMATION_ID)));
|
||||||
m_displayName = map.value(QLatin1String(CMAKE_INFORMATION_DISPLAYNAME)).toString();
|
m_displayName = map.value(QLatin1String(CMAKE_INFORMATION_DISPLAYNAME)).toString();
|
||||||
|
@@ -28,8 +28,8 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef CMAKEVALIDATOR_H
|
#ifndef CMAKETOOL_H
|
||||||
#define CMAKEVALIDATOR_H
|
#define CMAKETOOL_H
|
||||||
|
|
||||||
#include "cmake_global.h"
|
#include "cmake_global.h"
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ public:
|
|||||||
|
|
||||||
explicit CMakeTool(Detection d, const Core::Id &id = Core::Id());
|
explicit CMakeTool(Detection d, const Core::Id &id = Core::Id());
|
||||||
explicit CMakeTool(const QVariantMap &map, bool fromSdk);
|
explicit CMakeTool(const QVariantMap &map, bool fromSdk);
|
||||||
~CMakeTool();
|
~CMakeTool() override;
|
||||||
|
|
||||||
enum State { Invalid, RunningBasic, RunningFunctionList, RunningFunctionDetails,
|
enum State { Invalid, RunningBasic, RunningFunctionList, RunningFunctionDetails,
|
||||||
RunningPropertyList, RunningVariableList, RunningDone };
|
RunningPropertyList, RunningVariableList, RunningDone };
|
||||||
@@ -82,10 +82,9 @@ public:
|
|||||||
void setPathMapper(const PathMapper &includePathMapper);
|
void setPathMapper(const PathMapper &includePathMapper);
|
||||||
QString mapAllPaths(ProjectExplorer::Kit *kit, const QString &in) const;
|
QString mapAllPaths(ProjectExplorer::Kit *kit, const QString &in) const;
|
||||||
|
|
||||||
private slots:
|
private:
|
||||||
void finished(int exitCode);
|
void finished(int exitCode);
|
||||||
|
|
||||||
private:
|
|
||||||
void createId();
|
void createId();
|
||||||
void finishStep();
|
void finishStep();
|
||||||
void startNextStep();
|
void startNextStep();
|
||||||
@@ -96,13 +95,13 @@ private:
|
|||||||
void parseDone();
|
void parseDone();
|
||||||
QString formatFunctionDetails(const QString &command, const QString &args);
|
QString formatFunctionDetails(const QString &command, const QString &args);
|
||||||
|
|
||||||
State m_state;
|
State m_state = Invalid;
|
||||||
QProcess *m_process;
|
QProcess *m_process = 0;
|
||||||
Utils::FileName m_executable;
|
Utils::FileName m_executable;
|
||||||
|
|
||||||
bool m_isAutoDetected;
|
bool m_isAutoDetected;
|
||||||
bool m_hasCodeBlocksMsvcGenerator;
|
bool m_hasCodeBlocksMsvcGenerator = false;
|
||||||
bool m_hasCodeBlocksNinjaGenerator;
|
bool m_hasCodeBlocksNinjaGenerator = false;
|
||||||
|
|
||||||
QMap<QString, QStringList> m_functionArgs;
|
QMap<QString, QStringList> m_functionArgs;
|
||||||
QStringList m_variables;
|
QStringList m_variables;
|
||||||
@@ -115,4 +114,4 @@ private:
|
|||||||
|
|
||||||
} // namespace CMakeProjectManager
|
} // namespace CMakeProjectManager
|
||||||
|
|
||||||
#endif // CMAKEVALIDATOR_H
|
#endif // CMAKETOOL_H
|
||||||
|
@@ -56,12 +56,9 @@ const char CMAKETOOL_FILENAME[] = "/qtcreator/cmaketools.xml";
|
|||||||
|
|
||||||
class CMakeToolManagerPrivate
|
class CMakeToolManagerPrivate
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CMakeToolManagerPrivate() :
|
CMakeToolManagerPrivate() : m_preferNinja(false), m_writer(0)
|
||||||
m_preferNinja(false),
|
{ }
|
||||||
m_writer(0)
|
|
||||||
{}
|
|
||||||
|
|
||||||
bool m_preferNinja;
|
bool m_preferNinja;
|
||||||
Id m_defaultCMake;
|
Id m_defaultCMake;
|
||||||
@@ -110,7 +107,7 @@ static QList<CMakeTool *> readCMakeTools(const FileName &fileName, Core::Id *def
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
const QVariantMap dbMap = data.value(key).toMap();
|
const QVariantMap dbMap = data.value(key).toMap();
|
||||||
CMakeTool *item = new CMakeTool(dbMap,fromSDK);
|
auto item = new CMakeTool(dbMap,fromSDK);
|
||||||
if (item->isAutoDetected()) {
|
if (item->isAutoDetected()) {
|
||||||
if (!item->cmakeExecutable().toFileInfo().isExecutable()) {
|
if (!item->cmakeExecutable().toFileInfo().isExecutable()) {
|
||||||
qWarning() << QString::fromLatin1("CMakeTool \"%1\" (%2) read from \"%3\" dropped since the command is not executable.")
|
qWarning() << QString::fromLatin1("CMakeTool \"%1\" (%2) read from \"%3\" dropped since the command is not executable.")
|
||||||
@@ -190,7 +187,7 @@ static QList<CMakeTool *> autoDetectCMakeTools()
|
|||||||
|
|
||||||
QList<CMakeTool *> found;
|
QList<CMakeTool *> found;
|
||||||
foreach (const FileName &command, suspects) {
|
foreach (const FileName &command, suspects) {
|
||||||
CMakeTool *item = new CMakeTool(CMakeTool::AutoDetection);
|
auto item = new CMakeTool(CMakeTool::AutoDetection);
|
||||||
item->setCMakeExecutable(command);
|
item->setCMakeExecutable(command);
|
||||||
item->setDisplayName(CMakeToolManager::tr("System CMake at %1").arg(command.toUserOutput()));
|
item->setDisplayName(CMakeToolManager::tr("System CMake at %1").arg(command.toUserOutput()));
|
||||||
|
|
||||||
@@ -206,8 +203,7 @@ static QList<CMakeTool *> autoDetectCMakeTools()
|
|||||||
|
|
||||||
CMakeToolManager *CMakeToolManager::m_instance = 0;
|
CMakeToolManager *CMakeToolManager::m_instance = 0;
|
||||||
|
|
||||||
CMakeToolManager::CMakeToolManager(QObject *parent) :
|
CMakeToolManager::CMakeToolManager(QObject *parent) : QObject(parent)
|
||||||
QObject(parent)
|
|
||||||
{
|
{
|
||||||
QTC_ASSERT(!m_instance, return);
|
QTC_ASSERT(!m_instance, return);
|
||||||
m_instance = this;
|
m_instance = this;
|
||||||
|
@@ -28,8 +28,8 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifndef CMAKEPROJECTMANAGER_CMAKETOOLMANAGER_H
|
#ifndef CMAKETOOLMANAGER_H
|
||||||
#define CMAKEPROJECTMANAGER_CMAKETOOLMANAGER_H
|
#define CMAKETOOLMANAGER_H
|
||||||
|
|
||||||
#include "cmake_global.h"
|
#include "cmake_global.h"
|
||||||
#include "cmaketool.h"
|
#include "cmaketool.h"
|
||||||
@@ -49,7 +49,7 @@ public:
|
|||||||
typedef std::function<QList<CMakeTool *> ()> AutodetectionHelper;
|
typedef std::function<QList<CMakeTool *> ()> AutodetectionHelper;
|
||||||
|
|
||||||
CMakeToolManager(QObject *parent);
|
CMakeToolManager(QObject *parent);
|
||||||
~CMakeToolManager();
|
~CMakeToolManager() override;
|
||||||
|
|
||||||
static CMakeToolManager *instance();
|
static CMakeToolManager *instance();
|
||||||
|
|
||||||
@@ -86,4 +86,4 @@ private:
|
|||||||
|
|
||||||
} // namespace CMakeProjectManager
|
} // namespace CMakeProjectManager
|
||||||
|
|
||||||
#endif // CMAKEPROJECTMANAGER_CMAKETOOLMANAGER_H
|
#endif // CMAKETOOLMANAGER_H
|
||||||
|
@@ -57,13 +57,8 @@ static bool isMsvcFlavor(const ProjectExplorer::Abi &abi) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GeneratorInfo::GeneratorInfo()
|
GeneratorInfo::GeneratorInfo(ProjectExplorer::Kit *kit, bool ninja) : m_kit(kit), m_isNinja(ninja)
|
||||||
: m_kit(0), m_isNinja(false)
|
{ }
|
||||||
{}
|
|
||||||
|
|
||||||
GeneratorInfo::GeneratorInfo(ProjectExplorer::Kit *kit, bool ninja)
|
|
||||||
: m_kit(kit), m_isNinja(ninja)
|
|
||||||
{}
|
|
||||||
|
|
||||||
ProjectExplorer::Kit *GeneratorInfo::kit() const
|
ProjectExplorer::Kit *GeneratorInfo::kit() const
|
||||||
{
|
{
|
||||||
|
@@ -27,8 +27,8 @@
|
|||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
#ifndef CMAKEPROJECTMANAGER_INTERNAL_GENERATORINFO_H
|
#ifndef CMAKE_GENERATORINFO_H
|
||||||
#define CMAKEPROJECTMANAGER_INTERNAL_GENERATORINFO_H
|
#define CMAKE_GENERATORINFO_H
|
||||||
|
|
||||||
#include "cmakeprojectmanager.h"
|
#include "cmakeprojectmanager.h"
|
||||||
|
|
||||||
@@ -46,21 +46,20 @@ class GeneratorInfo
|
|||||||
public:
|
public:
|
||||||
static QList<GeneratorInfo> generatorInfosFor(ProjectExplorer::Kit *k, bool hasNinja,
|
static QList<GeneratorInfo> generatorInfosFor(ProjectExplorer::Kit *k, bool hasNinja,
|
||||||
bool preferNinja, bool hasCodeBlocks);
|
bool preferNinja, bool hasCodeBlocks);
|
||||||
|
GeneratorInfo() = default;
|
||||||
GeneratorInfo();
|
|
||||||
explicit GeneratorInfo(ProjectExplorer::Kit *kit, bool ninja = false);
|
|
||||||
|
|
||||||
ProjectExplorer::Kit *kit() const;
|
ProjectExplorer::Kit *kit() const;
|
||||||
bool isNinja() const;
|
bool isNinja() const;
|
||||||
|
|
||||||
QString displayName() const;
|
QString displayName() const;
|
||||||
QByteArray generatorArgument() const;
|
QByteArray generatorArgument() const;
|
||||||
QByteArray generator() const;
|
QByteArray generator() const;
|
||||||
QString preLoadCacheFileArgument() const;
|
QString preLoadCacheFileArgument() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ProjectExplorer::Kit *m_kit;
|
explicit GeneratorInfo(ProjectExplorer::Kit *kit, bool ninja = false);
|
||||||
bool m_isNinja;
|
|
||||||
|
ProjectExplorer::Kit *m_kit = 0;
|
||||||
|
bool m_isNinja = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
@@ -68,4 +67,4 @@ private:
|
|||||||
|
|
||||||
Q_DECLARE_METATYPE(CMakeProjectManager::Internal::GeneratorInfo)
|
Q_DECLARE_METATYPE(CMakeProjectManager::Internal::GeneratorInfo)
|
||||||
|
|
||||||
#endif // CMAKEPROJECTMANAGER_INTERNAL_GENERATORINFO_H
|
#endif // CMAKE_GENERATORINFO_H
|
||||||
|
Reference in New Issue
Block a user