Commit d2adc303 authored by Tobias Hunger's avatar Tobias Hunger

BuildConfigurationFactory: Refactor code

Refactor the code of the build configuration factories. The idea is to
generalize the code so much that we can allow plugins to install
custom build configuration factories for the platforms they support.

To support this use case the following changes where done here:
 * BuildInfo class was introduced to describe one build configuration that
   can be created by a factory.
 * Factories report a list of BuildInfo to describe what they can produce.
   This fixes the need for factories to implicitly create one buildconfiguration
   and then create another one 'officially' to support debug and release build
   configurations to be set up for projects.
 * Do no longer work around factories to create build configurations.

Change-Id: Ic372e4a9b5c582633b467d130538948472b89d91
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent ec436a6d
......@@ -38,6 +38,9 @@
#include "autoreconfstep.h"
#include "configurestep.h"
#include <coreplugin/icore.h>
#include <coreplugin/mimedatabase.h>
#include <projectexplorer/buildinfo.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
......@@ -46,6 +49,7 @@
#include <qtsupport/customexecutablerunconfiguration.h>
#include <utils/qtcassert.h>
#include <QFileInfo>
#include <QInputDialog>
using namespace AutotoolsProjectManager;
......@@ -85,59 +89,38 @@ AutotoolsBuildConfigurationFactory::AutotoolsBuildConfigurationFactory(QObject *
{
}
QList<Core::Id> AutotoolsBuildConfigurationFactory::availableCreationIds(const Target *parent) const
bool AutotoolsBuildConfigurationFactory::canCreate(const Target *parent) const
{
if (!canHandle(parent))
return QList<Core::Id>();
return QList<Core::Id>() << Core::Id(AUTOTOOLS_BC_ID);
return canHandle(parent);
}
QString AutotoolsBuildConfigurationFactory::displayNameForId(const Core::Id id) const
QList<BuildInfo *> AutotoolsBuildConfigurationFactory::availableBuilds(const Target *parent) const
{
if (id == AUTOTOOLS_BC_ID)
return tr("Build");
return QString();
}
QList<BuildInfo *> result;
QTC_ASSERT(canCreate(parent), return result);
bool AutotoolsBuildConfigurationFactory::canCreate(const Target *parent, const Core::Id id) const
{
if (!canHandle(parent))
return false;
if (id == AUTOTOOLS_BC_ID)
return true;
return false;
result << createBuildInfo(parent->kit(),
Utils::FileName::fromString(parent->project()->projectDirectory()));
return result;
}
AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::create(Target *parent, const Core::Id id, const QString &name)
BuildConfiguration *AutotoolsBuildConfigurationFactory::create(Target *parent, const BuildInfo *info) const
{
if (!canCreate(parent, id))
return 0;
QTC_ASSERT(parent, return 0);
QTC_ASSERT(info->factory() == this, return 0);
QTC_ASSERT(info->kitId == parent->kit()->id(), return 0);
QTC_ASSERT(!info->displayName.isEmpty(), return 0);
bool ok = true;
QString buildConfigurationName = name;
if (buildConfigurationName.isNull())
buildConfigurationName = QInputDialog::getText(0,
tr("New Configuration"),
tr("New configuration name:"),
QLineEdit::Normal,
QString(), &ok);
buildConfigurationName = buildConfigurationName.trimmed();
if (!ok || buildConfigurationName.isEmpty())
return 0;
AutotoolsBuildConfiguration *bc = createDefaultConfiguration(parent);
bc->setDisplayName(buildConfigurationName);
return bc;
}
AutotoolsBuildConfiguration *bc = new AutotoolsBuildConfiguration(parent);
bc->setDisplayName(info->displayName);
bc->setDefaultDisplayName(info->displayName);
bc->setBuildDirectory(info->buildDirectory);
AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::createDefaultConfiguration(ProjectExplorer::Target *target)
{
AutotoolsBuildConfiguration *bc = new AutotoolsBuildConfiguration(target);
BuildStepList *buildSteps = bc->stepList(Core::Id(BUILDSTEPS_BUILD));
// ### Build Steps Build ###
// autogen.sh or autoreconf
QFile autogenFile(target->project()->projectDirectory() + QLatin1String("/autogen.sh"));
QFile autogenFile(parent->project()->projectDirectory() + QLatin1String("/autogen.sh"));
if (autogenFile.exists()) {
AutogenStep *autogenStep = new AutogenStep(buildSteps);
buildSteps->insertStep(0, autogenStep);
......@@ -168,14 +151,29 @@ AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::createDefaultCo
bool AutotoolsBuildConfigurationFactory::canHandle(const Target *t) const
{
QTC_ASSERT(t, return false);
if (!t->project()->supportsKit(t->kit()))
return false;
return t->project()->id() == Constants::AUTOTOOLS_PROJECT_ID;
}
BuildInfo *AutotoolsBuildConfigurationFactory::createBuildInfo(const ProjectExplorer::Kit *k,
const Utils::FileName &buildDir) const
{
BuildInfo *info = new BuildInfo(this);
info->typeName = tr("Build");
info->buildDirectory = buildDir;
info->kitId = k->id();
return info;
}
bool AutotoolsBuildConfigurationFactory::canClone(const Target *parent, BuildConfiguration *source) const
{
return canCreate(parent, source->id());
if (!canHandle(parent))
return false;
return source->id() == AUTOTOOLS_BC_ID;
}
AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::clone(Target *parent, BuildConfiguration *source)
......@@ -189,7 +187,9 @@ AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::clone(Target *p
bool AutotoolsBuildConfigurationFactory::canRestore(const Target *parent, const QVariantMap &map) const
{
return canCreate(parent, idFromMap(map));
if (!canHandle(parent))
return false;
return idFromMap(map) == AUTOTOOLS_BC_ID;
}
AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::restore(Target *parent, const QVariantMap &map)
......
......@@ -34,6 +34,8 @@
#include <projectexplorer/buildconfiguration.h>
namespace Utils { class FileName; }
namespace AutotoolsProjectManager {
namespace Internal {
......@@ -67,20 +69,19 @@ class AutotoolsBuildConfigurationFactory : public ProjectExplorer::IBuildConfigu
public:
explicit AutotoolsBuildConfigurationFactory(QObject *parent = 0);
QList<Core::Id> availableCreationIds(const ProjectExplorer::Target *parent) const;
QString displayNameForId(const Core::Id id) const;
bool canCreate(const ProjectExplorer::Target *parent) const;
QList<ProjectExplorer::BuildInfo *> availableBuilds(const ProjectExplorer::Target *parent) const;
ProjectExplorer::BuildConfiguration *create(ProjectExplorer::Target *parent,
const ProjectExplorer::BuildInfo *info) const;
bool canCreate(const ProjectExplorer::Target *parent, const Core::Id id) const;
AutotoolsBuildConfiguration *create(ProjectExplorer::Target *parent, const Core::Id id, const QString &name = QString());
bool canClone(const ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source) const;
AutotoolsBuildConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source);
bool canRestore(const ProjectExplorer::Target *parent, const QVariantMap &map) const;
AutotoolsBuildConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map);
static AutotoolsBuildConfiguration *createDefaultConfiguration(ProjectExplorer::Target *target);
private:
bool canHandle(const ProjectExplorer::Target *t) const;
ProjectExplorer::BuildInfo *createBuildInfo(const ProjectExplorer::Kit *k, const Utils::FileName &buildDir) const;
};
} // namespace Internal
......
......@@ -34,6 +34,8 @@
#include <projectexplorer/project.h>
#include <utils/fileutils.h>
QT_FORWARD_DECLARE_CLASS(QDir)
namespace Utils {
......
......@@ -29,15 +29,20 @@
#include "cmakebuildconfiguration.h"
#include "cmakebuildinfo.h"
#include "cmakeopenprojectwizard.h"
#include "cmakeproject.h"
#include "cmakeprojectconstants.h"
#include <coreplugin/icore.h>
#include <coreplugin/mimedatabase.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/kit.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
#include <utils/qtcassert.h>
#include <QInputDialog>
using namespace CMakeProjectManager;
......@@ -117,64 +122,45 @@ CMakeBuildConfigurationFactory::~CMakeBuildConfigurationFactory()
{
}
QList<Core::Id> CMakeBuildConfigurationFactory::availableCreationIds(const ProjectExplorer::Target *parent) const
bool CMakeBuildConfigurationFactory::canCreate(const ProjectExplorer::Target *parent) const
{
if (!canHandle(parent))
return QList<Core::Id>();
return QList<Core::Id>() << Core::Id(Constants::CMAKE_BC_ID);
return canHandle(parent);
}
QString CMakeBuildConfigurationFactory::displayNameForId(const Core::Id id) const
QList<ProjectExplorer::BuildInfo *> CMakeBuildConfigurationFactory::availableBuilds(const ProjectExplorer::Target *parent) const
{
if (id == Constants::CMAKE_BC_ID)
return tr("Build");
return QString();
}
QList<ProjectExplorer::BuildInfo *> result;
QTC_ASSERT(canCreate(parent), return result);
bool CMakeBuildConfigurationFactory::canCreate(const ProjectExplorer::Target *parent, const Core::Id id) const
{
if (!canHandle(parent))
return false;
if (id == Constants::CMAKE_BC_ID)
return true;
return false;
CMakeBuildInfo *info = createBuildInfo(parent->kit(), parent->project()->projectDirectory());
result << info;
return result;
}
CMakeBuildConfiguration *CMakeBuildConfigurationFactory::create(ProjectExplorer::Target *parent, const Core::Id id, const QString &name)
ProjectExplorer::BuildConfiguration *CMakeBuildConfigurationFactory::create(ProjectExplorer::Target *parent,
const ProjectExplorer::BuildInfo *info) const
{
if (!canCreate(parent, id))
return 0;
QTC_ASSERT(canCreate(parent), return 0);
QTC_ASSERT(info->factory() == this, return 0);
QTC_ASSERT(info->kitId == parent->kit()->id(), return 0);
QTC_ASSERT(!info->displayName.isEmpty(), return 0);
CMakeBuildInfo copy(*static_cast<const CMakeBuildInfo *>(info));
CMakeProject *project = static_cast<CMakeProject *>(parent->project());
bool ok = true;
QString buildConfigurationName = name;
if (buildConfigurationName.isNull())
buildConfigurationName = QInputDialog::getText(0,
tr("New Configuration"),
tr("New configuration name:"),
QLineEdit::Normal,
QString(), &ok);
buildConfigurationName = buildConfigurationName.trimmed();
if (!ok || buildConfigurationName.isEmpty())
return 0;
if (copy.buildDirectory.isEmpty())
copy.buildDirectory
= Utils::FileName::fromString(project->shadowBuildDirectory(project->projectFilePath(),
parent->kit(),
copy.displayName));
CMakeOpenProjectWizard::BuildInfo info;
info.sourceDirectory = project->projectDirectory();
info.environment = Utils::Environment::systemEnvironment();
parent->kit()->addToEnvironment(info.environment);
info.buildDirectory = project->shadowBuildDirectory(project->projectFilePath(),
parent->kit(),
buildConfigurationName);
info.kit = parent->kit();
info.useNinja = false; // This is ignored anyway
CMakeOpenProjectWizard copw(project->projectManager(), CMakeOpenProjectWizard::ChangeDirectory, info);
CMakeOpenProjectWizard copw(project->projectManager(), CMakeOpenProjectWizard::ChangeDirectory, &copy);
if (copw.exec() != QDialog::Accepted)
return 0;
CMakeBuildConfiguration *bc = new CMakeBuildConfiguration(parent);
bc->setDisplayName(buildConfigurationName);
bc->setDisplayName(copy.displayName);
bc->setDefaultDisplayName(copy.displayName);
ProjectExplorer::BuildStepList *buildSteps = bc->stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
ProjectExplorer::BuildStepList *cleanSteps = bc->stepList(ProjectExplorer::Constants::BUILDSTEPS_CLEAN);
......@@ -199,7 +185,9 @@ CMakeBuildConfiguration *CMakeBuildConfigurationFactory::create(ProjectExplorer:
bool CMakeBuildConfigurationFactory::canClone(const ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source) const
{
return canCreate(parent, source->id());
if (!canHandle(parent))
return false;
return source->id() == Constants::CMAKE_BC_ID;
}
CMakeBuildConfiguration *CMakeBuildConfigurationFactory::clone(ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source)
......@@ -212,7 +200,9 @@ CMakeBuildConfiguration *CMakeBuildConfigurationFactory::clone(ProjectExplorer::
bool CMakeBuildConfigurationFactory::canRestore(const ProjectExplorer::Target *parent, const QVariantMap &map) const
{
return canCreate(parent, ProjectExplorer::idFromMap(map));
if (!canHandle(parent))
return false;
return ProjectExplorer::idFromMap(map) == Constants::CMAKE_BC_ID;
}
CMakeBuildConfiguration *CMakeBuildConfigurationFactory::restore(ProjectExplorer::Target *parent, const QVariantMap &map)
......@@ -228,11 +218,26 @@ CMakeBuildConfiguration *CMakeBuildConfigurationFactory::restore(ProjectExplorer
bool CMakeBuildConfigurationFactory::canHandle(const ProjectExplorer::Target *t) const
{
QTC_ASSERT(t, return false);
if (!t->project()->supportsKit(t->kit()))
return false;
return qobject_cast<CMakeProject *>(t->project());
}
CMakeBuildInfo *CMakeBuildConfigurationFactory::createBuildInfo(const ProjectExplorer::Kit *k,
const QString &sourceDir) const
{
CMakeBuildInfo *info = new CMakeBuildInfo(this);
info->typeName = tr("Build");
info->kitId = k->id();
info->environment = Utils::Environment::systemEnvironment();
k->addToEnvironment(info->environment);
info->useNinja = false;
info->sourceDirectory = sourceDir;
return info;
}
ProjectExplorer::BuildConfiguration::BuildType CMakeBuildConfiguration::buildType() const
{
QString cmakeBuildType;
......
......@@ -38,6 +38,8 @@ class ToolChain;
}
namespace CMakeProjectManager {
class CMakeBuildInfo;
namespace Internal {
class CMakeProject;
......@@ -83,11 +85,11 @@ public:
CMakeBuildConfigurationFactory(QObject *parent = 0);
~CMakeBuildConfigurationFactory();
QList<Core::Id> availableCreationIds(const ProjectExplorer::Target *parent) const;
QString displayNameForId(const Core::Id id) const;
bool canCreate(const ProjectExplorer::Target *parent) const;
QList<ProjectExplorer::BuildInfo *> availableBuilds(const ProjectExplorer::Target *parent) const;
ProjectExplorer::BuildConfiguration *create(ProjectExplorer::Target *parent,
const ProjectExplorer::BuildInfo *info) const;
bool canCreate(const ProjectExplorer::Target *parent, const Core::Id id) const;
CMakeBuildConfiguration *create(ProjectExplorer::Target *parent, const Core::Id id, const QString &name = QString());
bool canClone(const ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source) const;
CMakeBuildConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source);
bool canRestore(const ProjectExplorer::Target *parent, const QVariantMap &map) const;
......@@ -95,6 +97,7 @@ public:
private:
bool canHandle(const ProjectExplorer::Target *t) const;
CMakeBuildInfo *createBuildInfo(const ProjectExplorer::Kit *k, const QString &sourceDir) const;
};
} // namespace Internal
......
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef CMAKEBUILDINFO_H
#define CMAKEBUILDINFO_H
#include "cmakebuildconfiguration.h"
#include <projectexplorer/buildinfo.h>
#include <projectexplorer/kit.h>
#include <projectexplorer/target.h>
#include <utils/environment.h>
namespace CMakeProjectManager {
class CMakeBuildInfo : public ProjectExplorer::BuildInfo
{
public:
CMakeBuildInfo(const ProjectExplorer::IBuildConfigurationFactory *f) :
ProjectExplorer::BuildInfo(f) { }
CMakeBuildInfo(const Internal::CMakeBuildConfiguration *bc) :
ProjectExplorer::BuildInfo(ProjectExplorer::IBuildConfigurationFactory::find(bc->target()))
{
displayName = bc->displayName();
buildDirectory = bc->buildDirectory();
kitId = bc->target()->kit()->id();
environment = bc->environment();
useNinja = bc->useNinja();
}
Utils::Environment environment;
QString sourceDirectory;
bool useNinja;
};
} // namespace CMakeProjectManager
#endif // CMAKEBUILDINFO_H
......@@ -30,6 +30,7 @@
#include "cmakeopenprojectwizard.h"
#include "cmakeprojectmanager.h"
#include "cmakebuildconfiguration.h"
#include "cmakebuildinfo.h"
#include <coreplugin/icore.h>
#include <utils/hostosinfo.h>
......@@ -240,13 +241,15 @@ CMakeOpenProjectWizard::CMakeOpenProjectWizard(CMakeManager *cmakeManager, const
}
CMakeOpenProjectWizard::CMakeOpenProjectWizard(CMakeManager *cmakeManager, CMakeOpenProjectWizard::Mode mode,
const BuildInfo &info)
const CMakeBuildInfo *info)
: m_cmakeManager(cmakeManager),
m_sourceDirectory(info.sourceDirectory),
m_environment(info.environment),
m_useNinja(info.useNinja),
m_kit(info.kit)
m_sourceDirectory(info->sourceDirectory),
m_environment(info->environment),
m_useNinja(info->useNinja),
m_kit(0)
{
m_kit = ProjectExplorer::KitManager::find(info->kitId);
CMakeRunPage::Mode rmode;
if (mode == CMakeOpenProjectWizard::NeedToCreate)
rmode = CMakeRunPage::Recreate;
......@@ -258,13 +261,13 @@ CMakeOpenProjectWizard::CMakeOpenProjectWizard(CMakeManager *cmakeManager, CMake
rmode = CMakeRunPage::ChangeDirectory;
if (mode == CMakeOpenProjectWizard::ChangeDirectory) {
m_buildDirectory = info.buildDirectory;
m_buildDirectory = info->buildDirectory.toString();
addPage(new ShadowBuildPage(this, true));
}
if (!m_cmakeManager->isCMakeExecutableValid())
addPage(new ChooseCMakePage(this));
addPage(new CMakeRunPage(this, rmode, info.buildDirectory));
addPage(new CMakeRunPage(this, rmode, info->buildDirectory.toString()));
init();
}
......
......@@ -31,6 +31,7 @@
#define CMAKEOPENPROJECTWIZARD_H
#include "cmakebuildconfiguration.h"
#include "cmakebuildinfo.h"
#include <utils/environment.h>
#include <utils/wizard.h>
......@@ -70,34 +71,13 @@ public:
ChangeDirectory
};
class BuildInfo
{
public:
BuildInfo()
{}
BuildInfo(CMakeBuildConfiguration *bc)
: sourceDirectory(bc->target()->project()->projectDirectory())
, buildDirectory(bc->buildDirectory().toString())
, environment(bc->environment())
, useNinja(bc->useNinja())
, kit(bc->target()->kit())
{}
QString sourceDirectory;
QString buildDirectory;
Utils::Environment environment;
bool useNinja;
ProjectExplorer::Kit *kit;
};
/// used at importing a project without a .user file
CMakeOpenProjectWizard(CMakeManager *cmakeManager, const QString &sourceDirectory, Utils::Environment env);
/// used to update if we have already a .user file
/// recreates or updates the cbp file
/// Also used to change the build directory of one buildconfiguration or create a new buildconfiguration
CMakeOpenProjectWizard(CMakeManager *cmakeManager, Mode mode, const BuildInfo &info);
CMakeOpenProjectWizard(CMakeManager *cmakeManager, Mode mode, const CMakeBuildInfo *info);
QString buildDirectory() const;
QString sourceDirectory() const;
......
......@@ -141,8 +141,8 @@ void CMakeProject::changeActiveBuildConfiguration(ProjectExplorer::BuildConfigur
}
if (mode != CMakeOpenProjectWizard::Nothing) {
CMakeOpenProjectWizard copw(m_manager, mode,
CMakeOpenProjectWizard::BuildInfo(cmakebc));
CMakeBuildInfo info(cmakebc);
CMakeOpenProjectWizard copw(m_manager, mode, &info);
if (copw.exec() == QDialog::Accepted)
cmakebc->setUseNinja(copw.useNinja()); // NeedToCreate can change the Ninja setting
}
......@@ -585,8 +585,8 @@ bool CMakeProject::fromMap(const QVariantMap &map)
mode = CMakeOpenProjectWizard::NeedToUpdate;
if (mode != CMakeOpenProjectWizard::Nothing) {
CMakeOpenProjectWizard copw(m_manager, mode,
CMakeOpenProjectWizard::BuildInfo(activeBC));
CMakeBuildInfo info(activeBC);
CMakeOpenProjectWizard copw(m_manager, mode, &info);
if (copw.exec() != QDialog::Accepted)
return false;
else
......@@ -867,8 +867,9 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
void CMakeBuildSettingsWidget::openChangeBuildDirectoryDialog()
{
CMakeProject *project = static_cast<CMakeProject *>(m_buildConfiguration->target()->project());
CMakeBuildInfo info(m_buildConfiguration);
CMakeOpenProjectWizard copw(project->projectManager(), CMakeOpenProjectWizard::ChangeDirectory,
CMakeOpenProjectWizard::BuildInfo(m_buildConfiguration));
&info);
if (copw.exec() == QDialog::Accepted) {
project->changeBuildDirectory(m_buildConfiguration, copw.buildDirectory());
m_buildConfiguration->setUseNinja(copw.useNinja());
......@@ -881,9 +882,9 @@ void CMakeBuildSettingsWidget::runCMake()
if (!ProjectExplorer::ProjectExplorerPlugin::instance()->saveModifiedFiles())
return;
CMakeProject *project = static_cast<CMakeProject *>(m_buildConfiguration->target()->project());
CMakeBuildInfo info(m_buildConfiguration);
CMakeOpenProjectWizard copw(project->projectManager(),
CMakeOpenProjectWizard::WantToUpdate,
CMakeOpenProjectWizard::BuildInfo(m_buildConfiguration));
CMakeOpenProjectWizard::WantToUpdate, &info);
if (copw.exec() == QDialog::Accepted)
project->parseCMakeLists();
}
......
......@@ -121,8 +121,9 @@ void CMakeManager::runCMake(ProjectExplorer::Project *project)
CMakeBuildConfiguration *bc
= static_cast<CMakeBuildConfiguration *>(cmakeProject->activeTarget()->activeBuildConfiguration());
CMakeOpenProjectWizard copw(this, CMakeOpenProjectWizard::WantToUpdate,
CMakeOpenProjectWizard::BuildInfo(bc));
CMakeBuildInfo info(bc);
CMakeOpenProjectWizard copw(this, CMakeOpenProjectWizard::WantToUpdate, &info);
if (copw.exec() == QDialog::Accepted)
cmakeProject->parseCMakeLists();
}
......
include(../../qtcreatorplugin.pri)
HEADERS = cmakeproject.h \
HEADERS = cmakebuildinfo.h \
cmakeproject.h \
cmakeprojectplugin.h \
cmakeprojectmanager.h \
cmakeprojectconstants.h \
......