forked from qt-creator/qt-creator
Enable restoring the default names of project configuration items
* Enable support for this in all ProjectConfiguration items (Targets, projects, BCs, DCs, RCs, etc.). This is nicer than having custom code in individual configuraiton items. Reviewed-by: dt
This commit is contained in:
@@ -108,7 +108,7 @@ CMakeRunConfiguration::~CMakeRunConfiguration()
|
|||||||
|
|
||||||
void CMakeRunConfiguration::ctor()
|
void CMakeRunConfiguration::ctor()
|
||||||
{
|
{
|
||||||
setDisplayName(m_title);
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
}
|
}
|
||||||
|
|
||||||
CMakeTarget *CMakeRunConfiguration::cmakeTarget() const
|
CMakeTarget *CMakeRunConfiguration::cmakeTarget() const
|
||||||
@@ -205,6 +205,13 @@ bool CMakeRunConfiguration::fromMap(const QVariantMap &map)
|
|||||||
return RunConfiguration::fromMap(map);
|
return RunConfiguration::fromMap(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString CMakeRunConfiguration::defaultDisplayName() const
|
||||||
|
{
|
||||||
|
if (m_title.isEmpty())
|
||||||
|
return tr("Run CMake target");
|
||||||
|
return m_title + (m_enabled ? "" : tr(" (disabled)"));
|
||||||
|
}
|
||||||
|
|
||||||
QWidget *CMakeRunConfiguration::createConfigurationWidget()
|
QWidget *CMakeRunConfiguration::createConfigurationWidget()
|
||||||
{
|
{
|
||||||
return new CMakeRunConfigurationWidget(this);
|
return new CMakeRunConfigurationWidget(this);
|
||||||
@@ -302,7 +309,7 @@ void CMakeRunConfiguration::setEnabled(bool b)
|
|||||||
return;
|
return;
|
||||||
m_enabled = b;
|
m_enabled = b;
|
||||||
emit isEnabledChanged(isEnabled());
|
emit isEnabledChanged(isEnabled());
|
||||||
setDisplayName(m_title + (m_enabled ? "" : tr(" (disabled)")));
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CMakeRunConfiguration::isEnabled(ProjectExplorer::BuildConfiguration *bc) const
|
bool CMakeRunConfiguration::isEnabled(ProjectExplorer::BuildConfiguration *bc) const
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ private slots:
|
|||||||
protected:
|
protected:
|
||||||
CMakeRunConfiguration(CMakeTarget *parent, CMakeRunConfiguration *source);
|
CMakeRunConfiguration(CMakeTarget *parent, CMakeRunConfiguration *source);
|
||||||
virtual bool fromMap(const QVariantMap &map);
|
virtual bool fromMap(const QVariantMap &map);
|
||||||
|
QString defaultDisplayName() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ctor();
|
void ctor();
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ CMakeTarget::CMakeTarget(CMakeProject *parent) :
|
|||||||
m_buildConfigurationFactory(new CMakeBuildConfigurationFactory(this)),
|
m_buildConfigurationFactory(new CMakeBuildConfigurationFactory(this)),
|
||||||
m_deployConfigurationFactory(new ProjectExplorer::DeployConfigurationFactory(this))
|
m_deployConfigurationFactory(new ProjectExplorer::DeployConfigurationFactory(this))
|
||||||
{
|
{
|
||||||
setDisplayName(displayNameForId(id()));
|
setDefaultDisplayName(displayNameForId(id()));
|
||||||
setIcon(qApp->style()->standardIcon(QStyle::SP_ComputerIcon));
|
setIcon(qApp->style()->standardIcon(QStyle::SP_ComputerIcon));
|
||||||
connect(parent, SIGNAL(buildTargetsChanged()), SLOT(updateRunConfigurations()));
|
connect(parent, SIGNAL(buildTargetsChanged()), SLOT(updateRunConfigurations()));
|
||||||
}
|
}
|
||||||
@@ -100,11 +100,7 @@ QString CMakeTarget::defaultBuildDirectory() const
|
|||||||
|
|
||||||
bool CMakeTarget::fromMap(const QVariantMap &map)
|
bool CMakeTarget::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
if (!Target::fromMap(map))
|
return Target::fromMap(map);
|
||||||
return false;
|
|
||||||
|
|
||||||
setDisplayName(displayNameForId(id()));
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMakeTarget::updateRunConfigurations()
|
void CMakeTarget::updateRunConfigurations()
|
||||||
@@ -194,7 +190,7 @@ CMakeTarget *CMakeTargetFactory::create(ProjectExplorer::Project *parent, const
|
|||||||
|
|
||||||
// Add default build configuration:
|
// Add default build configuration:
|
||||||
CMakeBuildConfiguration *bc(new CMakeBuildConfiguration(t));
|
CMakeBuildConfiguration *bc(new CMakeBuildConfiguration(t));
|
||||||
bc->setDisplayName("all");
|
bc->setDefaultDisplayName("all");
|
||||||
|
|
||||||
ProjectExplorer::BuildStepList *buildSteps = bc->stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
|
ProjectExplorer::BuildStepList *buildSteps = bc->stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
|
||||||
ProjectExplorer::BuildStepList *cleanSteps = bc->stepList(ProjectExplorer::Constants::BUILDSTEPS_CLEAN);
|
ProjectExplorer::BuildStepList *cleanSteps = bc->stepList(ProjectExplorer::Constants::BUILDSTEPS_CLEAN);
|
||||||
|
|||||||
@@ -85,7 +85,8 @@ MakeStep::MakeStep(BuildStepList *bsl, MakeStep *bs) :
|
|||||||
void MakeStep::ctor()
|
void MakeStep::ctor()
|
||||||
{
|
{
|
||||||
m_percentProgress = QRegExp("^\\[\\s*(\\d*)%\\]");
|
m_percentProgress = QRegExp("^\\[\\s*(\\d*)%\\]");
|
||||||
setDisplayName(tr("Make", "CMakeProjectManager::MakeStep display name."));
|
//: Default display name for the cmake make step.
|
||||||
|
setDefaultDisplayName(tr("Make"));
|
||||||
}
|
}
|
||||||
|
|
||||||
MakeStep::~MakeStep()
|
MakeStep::~MakeStep()
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ const char * const BUILD_DIRECTORY_KEY("GenericProjectManager.GenericBuildConfig
|
|||||||
GenericBuildConfiguration::GenericBuildConfiguration(GenericTarget *parent)
|
GenericBuildConfiguration::GenericBuildConfiguration(GenericTarget *parent)
|
||||||
: BuildConfiguration(parent, QLatin1String(GENERIC_BC_ID))
|
: BuildConfiguration(parent, QLatin1String(GENERIC_BC_ID))
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GenericBuildConfiguration::GenericBuildConfiguration(GenericTarget *parent, const QString &id)
|
GenericBuildConfiguration::GenericBuildConfiguration(GenericTarget *parent, const QString &id)
|
||||||
|
|||||||
@@ -84,8 +84,8 @@ GenericMakeStep::GenericMakeStep(ProjectExplorer::BuildStepList *parent, Generic
|
|||||||
|
|
||||||
void GenericMakeStep::ctor()
|
void GenericMakeStep::ctor()
|
||||||
{
|
{
|
||||||
setDisplayName(QCoreApplication::translate("GenericProjectManager::Internal::GenericMakeStep",
|
setDefaultDisplayName(QCoreApplication::translate("GenericProjectManager::Internal::GenericMakeStep",
|
||||||
GENERIC_MS_DISPLAY_NAME));
|
GENERIC_MS_DISPLAY_NAME));
|
||||||
}
|
}
|
||||||
|
|
||||||
GenericMakeStep::~GenericMakeStep()
|
GenericMakeStep::~GenericMakeStep()
|
||||||
|
|||||||
@@ -57,9 +57,8 @@ GenericTarget::GenericTarget(GenericProject *parent) :
|
|||||||
m_buildConfigurationFactory(new GenericBuildConfigurationFactory(this)),
|
m_buildConfigurationFactory(new GenericBuildConfigurationFactory(this)),
|
||||||
m_deployConfigurationFactory(new ProjectExplorer::DeployConfigurationFactory(this))
|
m_deployConfigurationFactory(new ProjectExplorer::DeployConfigurationFactory(this))
|
||||||
{
|
{
|
||||||
setDisplayName(QApplication::translate("GenericProjectManager::GenericTarget",
|
setDefaultDisplayName(QApplication::translate("GenericProjectManager::GenericTarget",
|
||||||
GENERIC_DESKTOP_TARGET_DISPLAY_NAME,
|
GENERIC_DESKTOP_TARGET_DISPLAY_NAME));
|
||||||
"Generic desktop target display name"));
|
|
||||||
setIcon(qApp->style()->standardIcon(QStyle::SP_ComputerIcon));
|
setIcon(qApp->style()->standardIcon(QStyle::SP_ComputerIcon));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,9 +91,6 @@ bool GenericTarget::fromMap(const QVariantMap &map)
|
|||||||
if (!Target::fromMap(map))
|
if (!Target::fromMap(map))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
setDisplayName(QApplication::translate("GenericProjectManager::GenericTarget",
|
|
||||||
GENERIC_DESKTOP_TARGET_DISPLAY_NAME,
|
|
||||||
"Generic desktop target display name"));
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -55,11 +55,11 @@ BuildConfiguration::BuildConfiguration(Target *target, const QString &id) :
|
|||||||
Q_ASSERT(target);
|
Q_ASSERT(target);
|
||||||
BuildStepList *bsl = new BuildStepList(this, QLatin1String(Constants::BUILDSTEPS_BUILD));
|
BuildStepList *bsl = new BuildStepList(this, QLatin1String(Constants::BUILDSTEPS_BUILD));
|
||||||
//: Display name of the build build step list. Used as part of the labels in the project window.
|
//: Display name of the build build step list. Used as part of the labels in the project window.
|
||||||
bsl->setDisplayName(tr("Build"));
|
bsl->setDefaultDisplayName(tr("Build"));
|
||||||
m_stepLists.append(bsl);
|
m_stepLists.append(bsl);
|
||||||
bsl = new BuildStepList(this, QLatin1String(Constants::BUILDSTEPS_CLEAN));
|
bsl = new BuildStepList(this, QLatin1String(Constants::BUILDSTEPS_CLEAN));
|
||||||
//: Display name of the clean build step list. Used as part of the labels in the project window.
|
//: Display name of the clean build step list. Used as part of the labels in the project window.
|
||||||
bsl->setDisplayName(tr("Clean"));
|
bsl->setDefaultDisplayName(tr("Clean"));
|
||||||
m_stepLists.append(bsl);
|
m_stepLists.append(bsl);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,9 +108,6 @@ QVariantMap BuildConfiguration::toMap() const
|
|||||||
|
|
||||||
bool BuildConfiguration::fromMap(const QVariantMap &map)
|
bool BuildConfiguration::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
if (!ProjectConfiguration::fromMap(map))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
m_clearSystemEnvironment = map.value(QLatin1String(CLEAR_SYSTEM_ENVIRONMENT_KEY)).toBool();
|
m_clearSystemEnvironment = map.value(QLatin1String(CLEAR_SYSTEM_ENVIRONMENT_KEY)).toBool();
|
||||||
m_userEnvironmentChanges = EnvironmentItem::fromStringList(map.value(QLatin1String(USER_ENVIRONMENT_CHANGES_KEY)).toStringList());
|
m_userEnvironmentChanges = EnvironmentItem::fromStringList(map.value(QLatin1String(USER_ENVIRONMENT_CHANGES_KEY)).toStringList());
|
||||||
|
|
||||||
@@ -133,11 +130,11 @@ bool BuildConfiguration::fromMap(const QVariantMap &map)
|
|||||||
m_stepLists.append(list);
|
m_stepLists.append(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: We currently assume there to be at least a clean, build and deploy list!
|
// TODO: We currently assume there to be at least a clean and build list!
|
||||||
Q_ASSERT(knownStepLists().contains(QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_BUILD)));
|
Q_ASSERT(knownStepLists().contains(QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_BUILD)));
|
||||||
Q_ASSERT(knownStepLists().contains(QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)));
|
Q_ASSERT(knownStepLists().contains(QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)));
|
||||||
|
|
||||||
return true;
|
return ProjectConfiguration::fromMap(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
Target *BuildConfiguration::target() const
|
Target *BuildConfiguration::target() const
|
||||||
|
|||||||
@@ -327,16 +327,18 @@ void BuildSettingsWidget::renameConfiguration()
|
|||||||
arg(m_buildConfiguration->displayName()),
|
arg(m_buildConfiguration->displayName()),
|
||||||
QLineEdit::Normal,
|
QLineEdit::Normal,
|
||||||
m_buildConfiguration->displayName(), &ok);
|
m_buildConfiguration->displayName(), &ok);
|
||||||
if (!ok || !this || name.isEmpty())
|
if (!ok || !this)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QStringList bcNames;
|
if (!name.isEmpty()) {
|
||||||
foreach (BuildConfiguration *bc, m_target->buildConfigurations()) {
|
QStringList bcNames;
|
||||||
if (bc == m_buildConfiguration)
|
foreach (BuildConfiguration *bc, m_target->buildConfigurations()) {
|
||||||
continue;
|
if (bc == m_buildConfiguration)
|
||||||
bcNames.append(bc->displayName());
|
continue;
|
||||||
|
bcNames.append(bc->displayName());
|
||||||
|
}
|
||||||
|
name = Project::makeUnique(name, bcNames);
|
||||||
}
|
}
|
||||||
name = Project::makeUnique(name, bcNames);
|
|
||||||
m_buildConfiguration->setDisplayName(name);
|
m_buildConfiguration->setDisplayName(name);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -347,15 +349,11 @@ void BuildSettingsWidget::cloneConfiguration(BuildConfiguration *sourceConfigura
|
|||||||
!m_target->buildConfigurationFactory())
|
!m_target->buildConfigurationFactory())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
//: Title of a the cloned BuildConfiguration window, text of the window
|
||||||
QString newDisplayName(QInputDialog::getText(this, tr("Clone configuration"), tr("New Configuration Name:")));
|
QString newDisplayName(QInputDialog::getText(this, tr("Clone configuration"), tr("New Configuration Name:")));
|
||||||
if (newDisplayName.isEmpty())
|
if (newDisplayName.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QStringList buildConfigurationDisplayNames;
|
|
||||||
foreach(BuildConfiguration *bc, m_target->buildConfigurations())
|
|
||||||
buildConfigurationDisplayNames << bc->displayName();
|
|
||||||
newDisplayName = Project::makeUnique(newDisplayName, buildConfigurationDisplayNames);
|
|
||||||
|
|
||||||
BuildConfiguration * bc(m_target->buildConfigurationFactory()->clone(m_target, sourceConfiguration));
|
BuildConfiguration * bc(m_target->buildConfigurationFactory()->clone(m_target, sourceConfiguration));
|
||||||
if (!bc)
|
if (!bc)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ BuildStepList::BuildStepList(QObject *parent, BuildStepList *source) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
BuildStepList::BuildStepList(QObject *parent, const QVariantMap &data) :
|
BuildStepList::BuildStepList(QObject *parent, const QVariantMap &data) :
|
||||||
ProjectConfiguration(parent, QLatin1String("UNKNOWN"))
|
ProjectConfiguration(parent, QLatin1String("UNKNOWN ID"))
|
||||||
{
|
{
|
||||||
Q_ASSERT(parent);
|
Q_ASSERT(parent);
|
||||||
m_isNull = !fromMap(data);
|
m_isNull = !fromMap(data);
|
||||||
@@ -144,9 +144,6 @@ void BuildStepList::cloneSteps(BuildStepList *source)
|
|||||||
|
|
||||||
bool BuildStepList::fromMap(const QVariantMap &map)
|
bool BuildStepList::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
if (!ProjectConfiguration::fromMap(map))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
int maxSteps = map.value(QString::fromLatin1(STEPS_COUNT_KEY), 0).toInt();
|
int maxSteps = map.value(QString::fromLatin1(STEPS_COUNT_KEY), 0).toInt();
|
||||||
for (int i = 0; i < maxSteps; ++i) {
|
for (int i = 0; i < maxSteps; ++i) {
|
||||||
QVariantMap bsData(map.value(QString::fromLatin1(STEPS_PREFIX) + QString::number(i)).toMap());
|
QVariantMap bsData(map.value(QString::fromLatin1(STEPS_PREFIX) + QString::number(i)).toMap());
|
||||||
@@ -166,7 +163,6 @@ bool BuildStepList::fromMap(const QVariantMap &map)
|
|||||||
}
|
}
|
||||||
insertStep(m_steps.count(), bs);
|
insertStep(m_steps.count(), bs);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ProjectConfiguration::fromMap(map);
|
return ProjectConfiguration::fromMap(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,6 +212,5 @@ Target *BuildStepList::target() const
|
|||||||
DeployConfiguration *dc = qobject_cast<DeployConfiguration *>(parent());
|
DeployConfiguration *dc = qobject_cast<DeployConfiguration *>(parent());
|
||||||
if (dc)
|
if (dc)
|
||||||
return dc->target();
|
return dc->target();
|
||||||
Q_ASSERT(false);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -245,7 +245,8 @@ void CustomExecutableConfigurationWidget::changed()
|
|||||||
|
|
||||||
void CustomExecutableRunConfiguration::ctor()
|
void CustomExecutableRunConfiguration::ctor()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("Run %1").arg(m_executable));
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
|
|
||||||
connect(target(), SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
|
connect(target(), SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
|
||||||
this, SLOT(activeBuildConfigurationChanged()));
|
this, SLOT(activeBuildConfigurationChanged()));
|
||||||
|
|
||||||
@@ -435,6 +436,14 @@ void CustomExecutableRunConfiguration::setUserEnvironmentChanges(const QList<Pro
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString CustomExecutableRunConfiguration::defaultDisplayName() const
|
||||||
|
{
|
||||||
|
if (m_executable.isEmpty())
|
||||||
|
return tr("Custom Executable");
|
||||||
|
else
|
||||||
|
return tr("Run %1").arg(QDir::toNativeSeparators(m_executable));
|
||||||
|
}
|
||||||
|
|
||||||
QVariantMap CustomExecutableRunConfiguration::toMap() const
|
QVariantMap CustomExecutableRunConfiguration::toMap() const
|
||||||
{
|
{
|
||||||
QVariantMap map(LocalApplicationRunConfiguration::toMap());
|
QVariantMap map(LocalApplicationRunConfiguration::toMap());
|
||||||
@@ -456,15 +465,16 @@ bool CustomExecutableRunConfiguration::fromMap(const QVariantMap &map)
|
|||||||
m_userEnvironmentChanges = ProjectExplorer::EnvironmentItem::fromStringList(map.value(QLatin1String(USER_ENVIRONMENT_CHANGES_KEY)).toStringList());
|
m_userEnvironmentChanges = ProjectExplorer::EnvironmentItem::fromStringList(map.value(QLatin1String(USER_ENVIRONMENT_CHANGES_KEY)).toStringList());
|
||||||
m_baseEnvironmentBase = static_cast<BaseEnvironmentBase>(map.value(QLatin1String(BASE_ENVIRONMENT_BASE_KEY), static_cast<int>(CustomExecutableRunConfiguration::BuildEnvironmentBase)).toInt());
|
m_baseEnvironmentBase = static_cast<BaseEnvironmentBase>(map.value(QLatin1String(BASE_ENVIRONMENT_BASE_KEY), static_cast<int>(CustomExecutableRunConfiguration::BuildEnvironmentBase)).toInt());
|
||||||
|
|
||||||
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
return RunConfiguration::fromMap(map);
|
return RunConfiguration::fromMap(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CustomExecutableRunConfiguration::setExecutable(const QString &executable)
|
void CustomExecutableRunConfiguration::setExecutable(const QString &executable)
|
||||||
{
|
{
|
||||||
bool hasUserName = (displayName() != tr("Run %1").arg(m_executable));
|
if (executable == m_executable)
|
||||||
|
return;
|
||||||
m_executable = executable;
|
m_executable = executable;
|
||||||
if (!hasUserName)
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
setDisplayName(tr("Run %1").arg(m_executable));
|
|
||||||
emit changed();
|
emit changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -87,11 +87,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
QString baseExecutable() const;
|
QString baseExecutable() const;
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the name the user has set, if he has set one
|
|
||||||
*/
|
|
||||||
QString userName() const;
|
|
||||||
|
|
||||||
LocalApplicationRunConfiguration::RunMode runMode() const;
|
LocalApplicationRunConfiguration::RunMode runMode() const;
|
||||||
QString workingDirectory() const;
|
QString workingDirectory() const;
|
||||||
QString baseWorkingDirectory() const;
|
QString baseWorkingDirectory() const;
|
||||||
@@ -118,6 +113,7 @@ private slots:
|
|||||||
protected:
|
protected:
|
||||||
CustomExecutableRunConfiguration(Target *parent, CustomExecutableRunConfiguration *source);
|
CustomExecutableRunConfiguration(Target *parent, CustomExecutableRunConfiguration *source);
|
||||||
virtual bool fromMap(const QVariantMap &map);
|
virtual bool fromMap(const QVariantMap &map);
|
||||||
|
QString defaultDisplayName() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ctor();
|
void ctor();
|
||||||
|
|||||||
@@ -52,8 +52,9 @@ DeployConfiguration::DeployConfiguration(Target *target, const QString &id) :
|
|||||||
Q_ASSERT(target);
|
Q_ASSERT(target);
|
||||||
m_stepList = new BuildStepList(this, QLatin1String(Constants::BUILDSTEPS_DEPLOY));
|
m_stepList = new BuildStepList(this, QLatin1String(Constants::BUILDSTEPS_DEPLOY));
|
||||||
//: Display name of the deploy build step list. Used as part of the labels in the project window.
|
//: Display name of the deploy build step list. Used as part of the labels in the project window.
|
||||||
m_stepList->setDisplayName(tr("Deploy"));
|
m_stepList->setDefaultDisplayName(tr("Deploy"));
|
||||||
setDisplayName(tr("No deployment"));
|
//: Default DeployConfiguration display name
|
||||||
|
setDefaultDisplayName(tr("No deployment"));
|
||||||
}
|
}
|
||||||
|
|
||||||
DeployConfiguration::DeployConfiguration(Target *target, DeployConfiguration *source) :
|
DeployConfiguration::DeployConfiguration(Target *target, DeployConfiguration *source) :
|
||||||
@@ -80,7 +81,6 @@ QVariantMap DeployConfiguration::toMap() const
|
|||||||
QVariantMap map(ProjectConfiguration::toMap());
|
QVariantMap map(ProjectConfiguration::toMap());
|
||||||
map.insert(QLatin1String(BUILD_STEP_LIST_COUNT), 1);
|
map.insert(QLatin1String(BUILD_STEP_LIST_COUNT), 1);
|
||||||
map.insert(QLatin1String(BUILD_STEP_LIST_PREFIX) + QLatin1String("0"), m_stepList->toMap());
|
map.insert(QLatin1String(BUILD_STEP_LIST_PREFIX) + QLatin1String("0"), m_stepList->toMap());
|
||||||
|
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,7 +95,8 @@ bool DeployConfiguration::fromMap(const QVariantMap &map)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
int maxI = map.value(QLatin1String(BUILD_STEP_LIST_COUNT), 0).toInt();
|
int maxI = map.value(QLatin1String(BUILD_STEP_LIST_COUNT), 0).toInt();
|
||||||
Q_ASSERT(maxI == 1);
|
if (maxI != 1)
|
||||||
|
return false;
|
||||||
QVariantMap data = map.value(QLatin1String(BUILD_STEP_LIST_PREFIX) + QLatin1String("0")).toMap();
|
QVariantMap data = map.value(QLatin1String(BUILD_STEP_LIST_PREFIX) + QLatin1String("0")).toMap();
|
||||||
if (!data.isEmpty()) {
|
if (!data.isEmpty()) {
|
||||||
m_stepList = new BuildStepList(this, data);
|
m_stepList = new BuildStepList(this, data);
|
||||||
@@ -105,11 +106,13 @@ bool DeployConfiguration::fromMap(const QVariantMap &map)
|
|||||||
m_stepList = 0;
|
m_stepList = 0;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
m_stepList->setDefaultDisplayName(tr("Deploy"));
|
||||||
} else {
|
} else {
|
||||||
qWarning() << "No data for deploy step list found!";
|
qWarning() << "No data for deploy step list found!";
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: We assume that we have hold the deploy list
|
// TODO: We assume that we hold the deploy list
|
||||||
Q_ASSERT(m_stepList && m_stepList->id() == QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY));
|
Q_ASSERT(m_stepList && m_stepList->id() == QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ ProcessStep::ProcessStep(BuildStepList *bsl, const QString &id) :
|
|||||||
|
|
||||||
ProcessStep::ProcessStep(BuildStepList *bsl, ProcessStep *bs) :
|
ProcessStep::ProcessStep(BuildStepList *bsl, ProcessStep *bs) :
|
||||||
AbstractProcessStep(bsl, bs),
|
AbstractProcessStep(bsl, bs),
|
||||||
m_name(bs->m_name),
|
|
||||||
m_command(bs->m_command),
|
m_command(bs->m_command),
|
||||||
m_arguments(bs->m_arguments),
|
m_arguments(bs->m_arguments),
|
||||||
m_workingDirectory(bs->m_workingDirectory),
|
m_workingDirectory(bs->m_workingDirectory),
|
||||||
@@ -76,7 +75,8 @@ ProcessStep::ProcessStep(BuildStepList *bsl, ProcessStep *bs) :
|
|||||||
|
|
||||||
void ProcessStep::ctor()
|
void ProcessStep::ctor()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("Custom Process Step", "item in combobox"));
|
//: Default ProcessStep display name
|
||||||
|
setDefaultDisplayName(tr("Custom Process Step"));
|
||||||
}
|
}
|
||||||
|
|
||||||
ProcessStep::~ProcessStep()
|
ProcessStep::~ProcessStep()
|
||||||
@@ -255,8 +255,6 @@ ProcessStepConfigWidget::ProcessStepConfigWidget(ProcessStep *step)
|
|||||||
connect(m_ui.workingDirectory, SIGNAL(changed(QString)),
|
connect(m_ui.workingDirectory, SIGNAL(changed(QString)),
|
||||||
this, SLOT(workingDirectoryLineEditTextEdited()));
|
this, SLOT(workingDirectoryLineEditTextEdited()));
|
||||||
|
|
||||||
connect(m_ui.nameLineEdit, SIGNAL(textEdited(const QString&)),
|
|
||||||
this, SLOT(nameLineEditTextEdited()));
|
|
||||||
connect(m_ui.commandArgumentsLineEdit, SIGNAL(textEdited(const QString&)),
|
connect(m_ui.commandArgumentsLineEdit, SIGNAL(textEdited(const QString&)),
|
||||||
this, SLOT(commandArgumentsLineEditTextEdited()));
|
this, SLOT(commandArgumentsLineEditTextEdited()));
|
||||||
connect(m_ui.enabledCheckBox, SIGNAL(clicked(bool)),
|
connect(m_ui.enabledCheckBox, SIGNAL(clicked(bool)),
|
||||||
@@ -293,7 +291,6 @@ void ProcessStepConfigWidget::init()
|
|||||||
m_ui.commandArgumentsLineEdit->setText(m_step->arguments().join(QString(QLatin1Char(' '))));
|
m_ui.commandArgumentsLineEdit->setText(m_step->arguments().join(QString(QLatin1Char(' '))));
|
||||||
m_ui.enabledCheckBox->setChecked(m_step->enabled());
|
m_ui.enabledCheckBox->setChecked(m_step->enabled());
|
||||||
|
|
||||||
m_ui.nameLineEdit->setText(m_step->displayName());
|
|
||||||
updateDetails();
|
updateDetails();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -302,12 +299,6 @@ QString ProcessStepConfigWidget::summaryText() const
|
|||||||
return m_summaryText;
|
return m_summaryText;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProcessStepConfigWidget::nameLineEditTextEdited()
|
|
||||||
{
|
|
||||||
m_step->setDisplayName(m_ui.nameLineEdit->text());
|
|
||||||
emit updateDetails();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ProcessStepConfigWidget::commandLineEditTextEdited()
|
void ProcessStepConfigWidget::commandLineEditTextEdited()
|
||||||
{
|
{
|
||||||
m_step->setCommand(m_ui.command->path());
|
m_step->setCommand(m_ui.command->path());
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ protected:
|
|||||||
private:
|
private:
|
||||||
void ctor();
|
void ctor();
|
||||||
|
|
||||||
QString m_name;
|
|
||||||
QString m_command;
|
QString m_command;
|
||||||
QStringList m_arguments;
|
QStringList m_arguments;
|
||||||
QString m_workingDirectory;
|
QString m_workingDirectory;
|
||||||
@@ -110,7 +109,6 @@ public:
|
|||||||
virtual void init();
|
virtual void init();
|
||||||
virtual QString summaryText() const;
|
virtual QString summaryText() const;
|
||||||
private slots:
|
private slots:
|
||||||
void nameLineEditTextEdited();
|
|
||||||
void commandLineEditTextEdited();
|
void commandLineEditTextEdited();
|
||||||
void workingDirectoryLineEditTextEdited();
|
void workingDirectoryLineEditTextEdited();
|
||||||
void commandArgumentsLineEditTextEdited();
|
void commandArgumentsLineEditTextEdited();
|
||||||
|
|||||||
@@ -6,11 +6,14 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>299</width>
|
<width>290</width>
|
||||||
<height>154</height>
|
<height>95</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
|
<property name="fieldGrowthPolicy">
|
||||||
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -26,43 +29,33 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="nameLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Name:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="nameLineEdit"/>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="commandLabel">
|
<widget class="QLabel" name="commandLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Command:</string>
|
<string>Command:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="Utils::PathChooser" name="command" native="true"/>
|
<widget class="Utils::PathChooser" name="command" native="true"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="workingDirecoryLabel">
|
<widget class="QLabel" name="workingDirecoryLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Working directory:</string>
|
<string>Working directory:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="Utils::PathChooser" name="workingDirectory" native="true"/>
|
<widget class="Utils::PathChooser" name="workingDirectory" native="true"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="commandArgumentsLabel">
|
<widget class="QLabel" name="commandArgumentsLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Command arguments:</string>
|
<string>Command arguments:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QLineEdit" name="commandArgumentsLineEdit"/>
|
<widget class="QLineEdit" name="commandArgumentsLineEdit"/>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ void Project::addTarget(Target *t)
|
|||||||
foreach (const Target *target, m_targets)
|
foreach (const Target *target, m_targets)
|
||||||
displayNames << target->displayName();
|
displayNames << target->displayName();
|
||||||
targetDisplayName = makeUnique(targetDisplayName, displayNames);
|
targetDisplayName = makeUnique(targetDisplayName, displayNames);
|
||||||
t->setDisplayName(targetDisplayName);
|
t->setDefaultDisplayName(targetDisplayName);
|
||||||
|
|
||||||
// add it
|
// add it
|
||||||
m_targets.push_back(t);
|
m_targets.push_back(t);
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ using namespace ProjectExplorer;
|
|||||||
namespace {
|
namespace {
|
||||||
const char * const CONFIGURATION_ID_KEY("ProjectExplorer.ProjectConfiguration.Id");
|
const char * const CONFIGURATION_ID_KEY("ProjectExplorer.ProjectConfiguration.Id");
|
||||||
const char * const DISPLAY_NAME_KEY("ProjectExplorer.ProjectConfiguration.DisplayName");
|
const char * const DISPLAY_NAME_KEY("ProjectExplorer.ProjectConfiguration.DisplayName");
|
||||||
|
const char * const DEFAULT_DISPLAY_NAME_KEY("ProjectExplorer.ProjectConfiguration.DefaultDisplayName");
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectConfiguration::ProjectConfiguration(QObject *parent, const QString &id) :
|
ProjectConfiguration::ProjectConfiguration(QObject *parent, const QString &id) :
|
||||||
@@ -44,10 +45,11 @@ ProjectConfiguration::ProjectConfiguration(QObject *parent, const QString &id) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
ProjectConfiguration::ProjectConfiguration(QObject *parent, const ProjectConfiguration *source) :
|
ProjectConfiguration::ProjectConfiguration(QObject *parent, const ProjectConfiguration *source) :
|
||||||
QObject(parent)
|
QObject(parent),
|
||||||
|
m_id(source->m_id),
|
||||||
|
m_defaultDisplayName(source->m_defaultDisplayName)
|
||||||
{
|
{
|
||||||
Q_ASSERT(source);
|
Q_ASSERT(source);
|
||||||
m_id = source->m_id;
|
|
||||||
m_displayName = tr("Clone of %1").arg(source->displayName());
|
m_displayName = tr("Clone of %1").arg(source->displayName());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,22 +63,35 @@ QString ProjectConfiguration::id() const
|
|||||||
|
|
||||||
QString ProjectConfiguration::displayName() const
|
QString ProjectConfiguration::displayName() const
|
||||||
{
|
{
|
||||||
return m_displayName;
|
if (!m_displayName.isEmpty())
|
||||||
|
return m_displayName;
|
||||||
|
return m_defaultDisplayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProjectConfiguration::setDisplayName(const QString &name)
|
void ProjectConfiguration::setDisplayName(const QString &name)
|
||||||
{
|
{
|
||||||
if (name == m_displayName)
|
if (displayName() == name)
|
||||||
return;
|
return;
|
||||||
m_displayName = name;
|
m_displayName = name;
|
||||||
emit displayNameChanged();
|
emit displayNameChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ProjectConfiguration::setDefaultDisplayName(const QString &name)
|
||||||
|
{
|
||||||
|
if (m_defaultDisplayName == name)
|
||||||
|
return;
|
||||||
|
const QString originalName = displayName();
|
||||||
|
m_defaultDisplayName = name;
|
||||||
|
if (originalName != displayName())
|
||||||
|
emit displayNameChanged();
|
||||||
|
}
|
||||||
|
|
||||||
QVariantMap ProjectConfiguration::toMap() const
|
QVariantMap ProjectConfiguration::toMap() const
|
||||||
{
|
{
|
||||||
QVariantMap map;
|
QVariantMap map;
|
||||||
map.insert(QLatin1String(CONFIGURATION_ID_KEY), m_id);
|
map.insert(QLatin1String(CONFIGURATION_ID_KEY), m_id);
|
||||||
map.insert(QLatin1String(DISPLAY_NAME_KEY), m_displayName);
|
map.insert(QLatin1String(DISPLAY_NAME_KEY), m_displayName);
|
||||||
|
map.insert(QLatin1String(DEFAULT_DISPLAY_NAME_KEY), m_defaultDisplayName);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -84,6 +99,7 @@ bool ProjectConfiguration::fromMap(const QVariantMap &map)
|
|||||||
{
|
{
|
||||||
m_id = map.value(QLatin1String(CONFIGURATION_ID_KEY), QString()).toString();
|
m_id = map.value(QLatin1String(CONFIGURATION_ID_KEY), QString()).toString();
|
||||||
m_displayName = map.value(QLatin1String(DISPLAY_NAME_KEY), QString()).toString();
|
m_displayName = map.value(QLatin1String(DISPLAY_NAME_KEY), QString()).toString();
|
||||||
|
m_defaultDisplayName = map.value(QLatin1String(DEFAULT_DISPLAY_NAME_KEY), m_displayName).toString();
|
||||||
return !m_id.isEmpty();
|
return !m_id.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ public:
|
|||||||
QString id() const;
|
QString id() const;
|
||||||
QString displayName() const;
|
QString displayName() const;
|
||||||
void setDisplayName(const QString &name);
|
void setDisplayName(const QString &name);
|
||||||
|
void setDefaultDisplayName(const QString &name);
|
||||||
|
|
||||||
// Note: Make sure subclasses call the superclasses toMap() method!
|
// Note: Make sure subclasses call the superclasses toMap() method!
|
||||||
virtual QVariantMap toMap() const;
|
virtual QVariantMap toMap() const;
|
||||||
@@ -70,6 +71,7 @@ private:
|
|||||||
|
|
||||||
QString m_id;
|
QString m_id;
|
||||||
QString m_displayName;
|
QString m_displayName;
|
||||||
|
QString m_defaultDisplayName;
|
||||||
};
|
};
|
||||||
|
|
||||||
// helper functions:
|
// helper functions:
|
||||||
|
|||||||
@@ -281,16 +281,18 @@ void RunSettingsWidget::renameRunConfiguration()
|
|||||||
arg(m_target->activeRunConfiguration()->displayName()),
|
arg(m_target->activeRunConfiguration()->displayName()),
|
||||||
QLineEdit::Normal,
|
QLineEdit::Normal,
|
||||||
m_target->activeRunConfiguration()->displayName(), &ok);
|
m_target->activeRunConfiguration()->displayName(), &ok);
|
||||||
if (!ok || !this || name.isEmpty())
|
if (!ok || !this)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QStringList rcNames;
|
if (!name.isEmpty()) {
|
||||||
foreach (RunConfiguration *rc, m_target->runConfigurations()) {
|
QStringList rcNames;
|
||||||
if (rc == m_target->activeRunConfiguration())
|
foreach (RunConfiguration *rc, m_target->runConfigurations()) {
|
||||||
continue;
|
if (rc == m_target->activeRunConfiguration())
|
||||||
rcNames.append(rc->displayName());
|
continue;
|
||||||
|
rcNames.append(rc->displayName());
|
||||||
|
}
|
||||||
|
name = Project::makeUnique(name, rcNames);
|
||||||
}
|
}
|
||||||
name = Project::makeUnique(name, rcNames);
|
|
||||||
m_target->activeRunConfiguration()->setDisplayName(name);
|
m_target->activeRunConfiguration()->setDisplayName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -371,16 +373,18 @@ void RunSettingsWidget::renameDeployConfiguration()
|
|||||||
arg(m_target->activeDeployConfiguration()->displayName()),
|
arg(m_target->activeDeployConfiguration()->displayName()),
|
||||||
QLineEdit::Normal,
|
QLineEdit::Normal,
|
||||||
m_target->activeDeployConfiguration()->displayName(), &ok);
|
m_target->activeDeployConfiguration()->displayName(), &ok);
|
||||||
if (!ok || !this || name.isEmpty())
|
if (!ok || !this)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QStringList dcNames;
|
if (!name.isEmpty()) {
|
||||||
foreach (DeployConfiguration *dc, m_target->deployConfigurations()) {
|
QStringList dcNames;
|
||||||
if (dc == m_target->activeDeployConfiguration())
|
foreach (DeployConfiguration *dc, m_target->deployConfigurations()) {
|
||||||
continue;
|
if (dc == m_target->activeDeployConfiguration())
|
||||||
dcNames.append(dc->displayName());
|
continue;
|
||||||
|
dcNames.append(dc->displayName());
|
||||||
|
}
|
||||||
|
name = Project::makeUnique(name, dcNames);
|
||||||
}
|
}
|
||||||
name = Project::makeUnique(name, dcNames);
|
|
||||||
m_target->activeDeployConfiguration()->setDisplayName(name);
|
m_target->activeDeployConfiguration()->setDisplayName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ MakeStep::MakeStep(ProjectExplorer::BuildStepList *bsl, const QString &id) :
|
|||||||
|
|
||||||
void MakeStep::ctor()
|
void MakeStep::ctor()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("Make", "Qt4 MakeStep display name."));
|
setDefaultDisplayName(tr("Make", "Qt4 MakeStep display name."));
|
||||||
}
|
}
|
||||||
|
|
||||||
MakeStep::~MakeStep()
|
MakeStep::~MakeStep()
|
||||||
|
|||||||
@@ -80,7 +80,8 @@ QMakeStep::QMakeStep(BuildStepList *bsl, QMakeStep *bs) :
|
|||||||
|
|
||||||
void QMakeStep::ctor()
|
void QMakeStep::ctor()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("qmake", "QMakeStep display name."));
|
//: QMakeStep default display name
|
||||||
|
setDefaultDisplayName(tr("qmake"));
|
||||||
}
|
}
|
||||||
|
|
||||||
QMakeStep::~QMakeStep()
|
QMakeStep::~QMakeStep()
|
||||||
|
|||||||
@@ -85,7 +85,8 @@ MaemoDeployStep::~MaemoDeployStep()
|
|||||||
|
|
||||||
void MaemoDeployStep::ctor()
|
void MaemoDeployStep::ctor()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("Deploying to Maemo device"));
|
//: MaemoDeployStep default display name
|
||||||
|
setDefaultDisplayName(tr("Deploy to Maemo device"));
|
||||||
|
|
||||||
m_connecting = false;
|
m_connecting = false;
|
||||||
m_needsInstall = false;
|
m_needsInstall = false;
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ MaemoPackageCreationStep::~MaemoPackageCreationStep()
|
|||||||
|
|
||||||
void MaemoPackageCreationStep::ctor()
|
void MaemoPackageCreationStep::ctor()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("Packaging for Maemo"));
|
setDefaultDisplayName(tr("Packaging for Maemo"));
|
||||||
|
|
||||||
m_lastBuildConfig = qt4BuildConfiguration();
|
m_lastBuildConfig = qt4BuildConfiguration();
|
||||||
connect(target(),
|
connect(target(),
|
||||||
|
|||||||
@@ -87,8 +87,8 @@ MaemoRunConfiguration::MaemoRunConfiguration(Qt4Target *parent,
|
|||||||
|
|
||||||
void MaemoRunConfiguration::init()
|
void MaemoRunConfiguration::init()
|
||||||
{
|
{
|
||||||
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
m_remoteMounts = new MaemoRemoteMountsModel(this);
|
m_remoteMounts = new MaemoRemoteMountsModel(this);
|
||||||
setDisplayName(QFileInfo(m_proFilePath).completeBaseName());
|
|
||||||
|
|
||||||
connect(target(),
|
connect(target(),
|
||||||
SIGNAL(activeDeployConfigurationChanged(ProjectExplorer::DeployConfiguration*)),
|
SIGNAL(activeDeployConfigurationChanged(ProjectExplorer::DeployConfiguration*)),
|
||||||
@@ -168,9 +168,19 @@ bool MaemoRunConfiguration::fromMap(const QVariantMap &map)
|
|||||||
SystemEnvironmentBase).toInt());
|
SystemEnvironmentBase).toInt());
|
||||||
m_remoteMounts->fromMap(map);
|
m_remoteMounts->fromMap(map);
|
||||||
|
|
||||||
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString MaemoRunConfiguration::defaultDisplayName()
|
||||||
|
{
|
||||||
|
if (!m_proFilePath.isEmpty())
|
||||||
|
return (QFileInfo(m_proFilePath).completeBaseName());
|
||||||
|
//: Maemo run configuration default display name
|
||||||
|
return tr("Run on maemo device");
|
||||||
|
}
|
||||||
|
|
||||||
MaemoDeviceConfig MaemoRunConfiguration::deviceConfig() const
|
MaemoDeviceConfig MaemoRunConfiguration::deviceConfig() const
|
||||||
{
|
{
|
||||||
return deployStep()->deviceConfigModel()->current();
|
return deployStep()->deviceConfigModel()->current();
|
||||||
|
|||||||
@@ -126,6 +126,7 @@ signals:
|
|||||||
protected:
|
protected:
|
||||||
MaemoRunConfiguration(Qt4Target *parent, MaemoRunConfiguration *source);
|
MaemoRunConfiguration(Qt4Target *parent, MaemoRunConfiguration *source);
|
||||||
virtual bool fromMap(const QVariantMap &map);
|
virtual bool fromMap(const QVariantMap &map);
|
||||||
|
QString defaultDisplayName();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void proFileUpdate(Qt4ProjectManager::Internal::Qt4ProFileNode *pro);
|
void proFileUpdate(Qt4ProjectManager::Internal::Qt4ProFileNode *pro);
|
||||||
|
|||||||
@@ -115,7 +115,8 @@ S60CreatePackageStep::S60CreatePackageStep(ProjectExplorer::BuildStepList *bsl,
|
|||||||
|
|
||||||
void S60CreatePackageStep::ctor_package()
|
void S60CreatePackageStep::ctor_package()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("Create SIS Package", "Create SIS package build step name"));
|
//: default create SIS package build step display name
|
||||||
|
setDefaultDisplayName(tr("Create SIS Package"));
|
||||||
connect(this, SIGNAL(badPassphrase()),
|
connect(this, SIGNAL(badPassphrase()),
|
||||||
this, SLOT(definePassphrase()), Qt::QueuedConnection);
|
this, SLOT(definePassphrase()), Qt::QueuedConnection);
|
||||||
|
|
||||||
|
|||||||
@@ -109,14 +109,13 @@ S60DeployConfiguration::S60DeployConfiguration(Target *target, S60DeployConfigur
|
|||||||
|
|
||||||
void S60DeployConfiguration::ctor()
|
void S60DeployConfiguration::ctor()
|
||||||
{
|
{
|
||||||
S60DeviceRunConfiguration* runConf = s60DeviceRunConf();
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
if (runConf && !runConf->projectFilePath().isEmpty())
|
|
||||||
setDisplayName(tr("%1 on Symbian Device").arg(QFileInfo(runConf->projectFilePath()).completeBaseName()));
|
|
||||||
|
|
||||||
connect(qt4Target()->qt4Project(), SIGNAL(proFileUpdated(Qt4ProjectManager::Internal::Qt4ProFileNode*)),
|
connect(qt4Target()->qt4Project(), SIGNAL(proFileUpdated(Qt4ProjectManager::Internal::Qt4ProFileNode*)),
|
||||||
this, SLOT(proFileUpdate(Qt4ProjectManager::Internal::Qt4ProFileNode*)));
|
this, SLOT(proFileUpdate(Qt4ProjectManager::Internal::Qt4ProFileNode*)));
|
||||||
connect(qt4Target(), SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
|
connect(qt4Target(), SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
|
||||||
this, SLOT(updateActiveBuildConfiguration(ProjectExplorer::BuildConfiguration*)));
|
this, SLOT(updateActiveBuildConfiguration(ProjectExplorer::BuildConfiguration*)));
|
||||||
|
connect(qt4Target(), SIGNAL(activeRunConfigurationChanged(ProjectExplorer::RunConfiguration*)),
|
||||||
|
this, SLOT(updateActiveRunConfiguration(ProjectExplorer::RunConfiguration*)));
|
||||||
updateActiveBuildConfiguration(qt4Target()->activeBuildConfiguration());
|
updateActiveBuildConfiguration(qt4Target()->activeBuildConfiguration());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,8 +131,7 @@ ProjectExplorer::DeployConfigurationWidget *S60DeployConfiguration::configuratio
|
|||||||
void S60DeployConfiguration::proFileUpdate(Qt4ProjectManager::Internal::Qt4ProFileNode *pro)
|
void S60DeployConfiguration::proFileUpdate(Qt4ProjectManager::Internal::Qt4ProFileNode *pro)
|
||||||
{
|
{
|
||||||
S60DeviceRunConfiguration *deviceRunConf = s60DeviceRunConf();
|
S60DeviceRunConfiguration *deviceRunConf = s60DeviceRunConf();
|
||||||
Q_ASSERT(deviceRunConf);
|
if (deviceRunConf && deviceRunConf->projectFilePath() == pro->path())
|
||||||
if (deviceRunConf->projectFilePath() == pro->path())
|
|
||||||
emit targetInformationChanged();
|
emit targetInformationChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,14 +347,15 @@ void S60DeployConfiguration::updateActiveBuildConfiguration(ProjectExplorer::Bui
|
|||||||
this, SIGNAL(targetInformationChanged()));
|
this, SIGNAL(targetInformationChanged()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void S60DeployConfiguration::updateActiveRunConfiguration(ProjectExplorer::RunConfiguration *runConfiguration)
|
||||||
|
{
|
||||||
|
Q_UNUSED(runConfiguration);
|
||||||
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
|
}
|
||||||
|
|
||||||
S60DeviceRunConfiguration* S60DeployConfiguration::s60DeviceRunConf() const
|
S60DeviceRunConfiguration* S60DeployConfiguration::s60DeviceRunConf() const
|
||||||
{
|
{
|
||||||
const char * const S60_DEVICE_RC_ID("Qt4ProjectManager.S60DeviceRunConfiguration");
|
return qobject_cast<S60DeviceRunConfiguration *>(qt4Target()->activeRunConfiguration());
|
||||||
|
|
||||||
foreach( RunConfiguration *runConf, qt4Target()->runConfigurations() )
|
|
||||||
if (runConf->id() == QLatin1String(S60_DEVICE_RC_ID))
|
|
||||||
return qobject_cast<S60DeviceRunConfiguration *>(runConf);
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariantMap S60DeployConfiguration::toMap() const
|
QVariantMap S60DeployConfiguration::toMap() const
|
||||||
@@ -369,13 +368,24 @@ QVariantMap S60DeployConfiguration::toMap() const
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString S60DeployConfiguration::defaultDisplayName() const
|
||||||
|
{
|
||||||
|
S60DeviceRunConfiguration* runConf = s60DeviceRunConf();
|
||||||
|
if (runConf && !runConf->projectFilePath().isEmpty())
|
||||||
|
return tr("Deploy %1 to Symbian device").arg(QFileInfo(runConf->projectFilePath()).completeBaseName());
|
||||||
|
return tr("Deploy to Symbian device");
|
||||||
|
}
|
||||||
|
|
||||||
bool S60DeployConfiguration::fromMap(const QVariantMap &map)
|
bool S60DeployConfiguration::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
|
if (!DeployConfiguration::fromMap(map))
|
||||||
|
return false;
|
||||||
m_serialPortName = map.value(QLatin1String(SERIAL_PORT_NAME_KEY)).toString().trimmed();
|
m_serialPortName = map.value(QLatin1String(SERIAL_PORT_NAME_KEY)).toString().trimmed();
|
||||||
m_installationDrive = map.value(QLatin1String(INSTALLATION_DRIVE_LETTER_KEY), QChar('C'))
|
m_installationDrive = map.value(QLatin1String(INSTALLATION_DRIVE_LETTER_KEY), QChar('C'))
|
||||||
.toChar().toAscii();
|
.toChar().toAscii();
|
||||||
m_silentInstall = map.value(QLatin1String(SILENT_INSTALL_KEY), QVariant(true)).toBool();
|
m_silentInstall = map.value(QLatin1String(SILENT_INSTALL_KEY), QVariant(true)).toBool();
|
||||||
return DeployConfiguration::fromMap(map);
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Qt4Target *S60DeployConfiguration::qt4Target() const
|
Qt4Target *S60DeployConfiguration::qt4Target() const
|
||||||
|
|||||||
@@ -87,11 +87,13 @@ signals:
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updateActiveBuildConfiguration(ProjectExplorer::BuildConfiguration *buildConfiguration);
|
void updateActiveBuildConfiguration(ProjectExplorer::BuildConfiguration *buildConfiguration);
|
||||||
|
void updateActiveRunConfiguration(ProjectExplorer::RunConfiguration *runConfiguration);
|
||||||
void proFileUpdate(Qt4ProjectManager::Internal::Qt4ProFileNode *pro);
|
void proFileUpdate(Qt4ProjectManager::Internal::Qt4ProFileNode *pro);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
S60DeployConfiguration(ProjectExplorer::Target *parent, S60DeployConfiguration *source);
|
S60DeployConfiguration(ProjectExplorer::Target *parent, S60DeployConfiguration *source);
|
||||||
virtual bool fromMap(const QVariantMap &map);
|
virtual bool fromMap(const QVariantMap &map);
|
||||||
|
QString defaultDisplayName() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ctor();
|
void ctor();
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ S60DeployStep::S60DeployStep(ProjectExplorer::BuildStepList *bc,
|
|||||||
m_handleDeviceRemoval(bs->m_handleDeviceRemoval),
|
m_handleDeviceRemoval(bs->m_handleDeviceRemoval),
|
||||||
m_launcher(0), m_eventLoop(0)
|
m_launcher(0), m_eventLoop(0)
|
||||||
{
|
{
|
||||||
|
ctor();
|
||||||
}
|
}
|
||||||
|
|
||||||
S60DeployStep::S60DeployStep(ProjectExplorer::BuildStepList *bc):
|
S60DeployStep::S60DeployStep(ProjectExplorer::BuildStepList *bc):
|
||||||
@@ -100,6 +101,13 @@ S60DeployStep::S60DeployStep(ProjectExplorer::BuildStepList *bc):
|
|||||||
m_releaseDeviceAfterLauncherFinish(true),
|
m_releaseDeviceAfterLauncherFinish(true),
|
||||||
m_handleDeviceRemoval(true), m_launcher(0), m_eventLoop(0)
|
m_handleDeviceRemoval(true), m_launcher(0), m_eventLoop(0)
|
||||||
{
|
{
|
||||||
|
ctor();
|
||||||
|
}
|
||||||
|
|
||||||
|
void S60DeployStep::ctor()
|
||||||
|
{
|
||||||
|
//: Qt4 Deploystep display name
|
||||||
|
setDefaultDisplayName(tr("Deploy"));
|
||||||
}
|
}
|
||||||
|
|
||||||
S60DeployStep::~S60DeployStep()
|
S60DeployStep::~S60DeployStep()
|
||||||
@@ -123,7 +131,6 @@ bool S60DeployStep::init()
|
|||||||
m_installationDrive = deployConfiguration->installationDrive();
|
m_installationDrive = deployConfiguration->installationDrive();
|
||||||
m_silentInstall = deployConfiguration->silentInstall();
|
m_silentInstall = deployConfiguration->silentInstall();
|
||||||
|
|
||||||
setDisplayName(tr("Deploy", "Qt4 DeployStep display name."));
|
|
||||||
QString message;
|
QString message;
|
||||||
if (m_launcher) {
|
if (m_launcher) {
|
||||||
trk::Launcher::releaseToDeviceManager(m_launcher);
|
trk::Launcher::releaseToDeviceManager(m_launcher);
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ signals:
|
|||||||
private:
|
private:
|
||||||
S60DeployStep(ProjectExplorer::BuildStepList *parent,
|
S60DeployStep(ProjectExplorer::BuildStepList *parent,
|
||||||
S60DeployStep *bs);
|
S60DeployStep *bs);
|
||||||
|
void ctor();
|
||||||
|
|
||||||
void start();
|
void start();
|
||||||
void stop();
|
void stop();
|
||||||
|
|||||||
@@ -125,9 +125,11 @@ S60DeviceRunConfiguration::S60DeviceRunConfiguration(Target *target, S60DeviceRu
|
|||||||
void S60DeviceRunConfiguration::ctor()
|
void S60DeviceRunConfiguration::ctor()
|
||||||
{
|
{
|
||||||
if (!m_proFilePath.isEmpty())
|
if (!m_proFilePath.isEmpty())
|
||||||
setDisplayName(tr("%1 on Symbian Device").arg(QFileInfo(m_proFilePath).completeBaseName()));
|
//: S60 device runconfiguration default display name, %1 is base pro-File name
|
||||||
|
setDefaultDisplayName(tr("%1 on Symbian Device").arg(QFileInfo(m_proFilePath).completeBaseName()));
|
||||||
else
|
else
|
||||||
setDisplayName(tr("QtS60DeviceRunConfiguration"));
|
//: S60 device runconfiguration default display name (no profile set)
|
||||||
|
setDefaultDisplayName(tr("Run on Symbian device"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void S60DeviceRunConfiguration::proFileUpdate(Qt4ProjectManager::Internal::Qt4ProFileNode *pro)
|
void S60DeviceRunConfiguration::proFileUpdate(Qt4ProjectManager::Internal::Qt4ProFileNode *pro)
|
||||||
@@ -204,6 +206,12 @@ bool S60DeviceRunConfiguration::fromMap(const QVariantMap &map)
|
|||||||
m_proFilePath = projectDir.filePath(map.value(QLatin1String(PRO_FILE_KEY)).toString());
|
m_proFilePath = projectDir.filePath(map.value(QLatin1String(PRO_FILE_KEY)).toString());
|
||||||
m_commandLineArguments = map.value(QLatin1String(COMMAND_LINE_ARGUMENTS_KEY)).toStringList();
|
m_commandLineArguments = map.value(QLatin1String(COMMAND_LINE_ARGUMENTS_KEY)).toStringList();
|
||||||
|
|
||||||
|
if (m_proFilePath.isEmpty())
|
||||||
|
return false;
|
||||||
|
if (!QFileInfo(m_proFilePath).exists())
|
||||||
|
return false;
|
||||||
|
setDefaultDisplayName(tr("%1 on Symbian Device").arg(QFileInfo(m_proFilePath).completeBaseName()));
|
||||||
|
|
||||||
return RunConfiguration::fromMap(map);
|
return RunConfiguration::fromMap(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,6 +95,7 @@ signals:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
S60DeviceRunConfiguration(ProjectExplorer::Target *parent, S60DeviceRunConfiguration *source);
|
S60DeviceRunConfiguration(ProjectExplorer::Target *parent, S60DeviceRunConfiguration *source);
|
||||||
|
QString defaultDisplayName() const;
|
||||||
virtual bool fromMap(const QVariantMap &map);
|
virtual bool fromMap(const QVariantMap &map);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -95,10 +95,11 @@ S60EmulatorRunConfiguration::S60EmulatorRunConfiguration(Target *parent, S60Emul
|
|||||||
void S60EmulatorRunConfiguration::ctor()
|
void S60EmulatorRunConfiguration::ctor()
|
||||||
{
|
{
|
||||||
if (!m_proFilePath.isEmpty())
|
if (!m_proFilePath.isEmpty())
|
||||||
setDisplayName(tr("%1 in Symbian Emulator").arg(QFileInfo(m_proFilePath).completeBaseName()));
|
//: S60 emulator run configuration default display name, %1 is base pro-File name
|
||||||
|
setDefaultDisplayName(tr("%1 in Symbian Emulator").arg(QFileInfo(m_proFilePath).completeBaseName()));
|
||||||
else
|
else
|
||||||
setDisplayName(tr("Qt Symbian Emulator RunConfiguration"));
|
//: S60 emulator run configuration default display name (no pro-file name)
|
||||||
|
setDefaultDisplayName(tr("Run on Symbian Emulator"));
|
||||||
connect(qt4Target()->qt4Project(), SIGNAL(proFileUpdated(Qt4ProjectManager::Internal::Qt4ProFileNode*)),
|
connect(qt4Target()->qt4Project(), SIGNAL(proFileUpdated(Qt4ProjectManager::Internal::Qt4ProFileNode*)),
|
||||||
this, SLOT(proFileUpdate(Qt4ProjectManager::Internal::Qt4ProFileNode*)));
|
this, SLOT(proFileUpdate(Qt4ProjectManager::Internal::Qt4ProFileNode*)));
|
||||||
}
|
}
|
||||||
@@ -150,6 +151,11 @@ bool S60EmulatorRunConfiguration::fromMap(const QVariantMap &map)
|
|||||||
const QDir projectDir = QDir(target()->project()->projectDirectory());
|
const QDir projectDir = QDir(target()->project()->projectDirectory());
|
||||||
m_proFilePath = projectDir.filePath(map.value(QLatin1String(PRO_FILE_KEY)).toString());
|
m_proFilePath = projectDir.filePath(map.value(QLatin1String(PRO_FILE_KEY)).toString());
|
||||||
|
|
||||||
|
if (m_proFilePath.isEmpty())
|
||||||
|
return false;
|
||||||
|
//: S60 emulator run configuration default display name, %1 is base pro-File name
|
||||||
|
setDefaultDisplayName(tr("%1 in Symbian Emulator").arg(QFileInfo(m_proFilePath).completeBaseName()));
|
||||||
|
|
||||||
return RunConfiguration::fromMap(map);
|
return RunConfiguration::fromMap(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -60,11 +60,11 @@ ProjectExplorer::DeployConfiguration *Qt4DeployConfigurationFactory::create(Proj
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (parent->id() == Constants::S60_DEVICE_TARGET_ID) {
|
if (parent->id() == Constants::S60_DEVICE_TARGET_ID) {
|
||||||
dc->setDisplayName(tr("Deploy to Symbian device"));
|
dc->setDefaultDisplayName(tr("Deploy to Symbian device"));
|
||||||
dc->stepList()->insertStep(0, new S60CreatePackageStep(dc->stepList()));
|
dc->stepList()->insertStep(0, new S60CreatePackageStep(dc->stepList()));
|
||||||
dc->stepList()->insertStep(1, new S60DeployStep(dc->stepList()));
|
dc->stepList()->insertStep(1, new S60DeployStep(dc->stepList()));
|
||||||
} else if (parent->id() == Constants::MAEMO_DEVICE_TARGET_ID) {
|
} else if (parent->id() == Constants::MAEMO_DEVICE_TARGET_ID) {
|
||||||
dc->setDisplayName(tr("Deploy to Maemo device"));
|
dc->setDefaultDisplayName(tr("Deploy to Maemo device"));
|
||||||
dc->stepList()->insertStep(0, new MaemoPackageCreationStep(dc->stepList()));
|
dc->stepList()->insertStep(0, new MaemoPackageCreationStep(dc->stepList()));
|
||||||
dc->stepList()->insertStep(1, new MaemoDeployStep(dc->stepList()));
|
dc->stepList()->insertStep(1, new MaemoDeployStep(dc->stepList()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,9 +163,7 @@ void Qt4RunConfiguration::proFileUpdate(Qt4ProjectManager::Internal::Qt4ProFileN
|
|||||||
|
|
||||||
void Qt4RunConfiguration::ctor()
|
void Qt4RunConfiguration::ctor()
|
||||||
{
|
{
|
||||||
QString name = defaultDisplayName();
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
if (name != displayName())
|
|
||||||
setDisplayName(name);
|
|
||||||
|
|
||||||
connect(qt4Target(), SIGNAL(environmentChanged()),
|
connect(qt4Target(), SIGNAL(environmentChanged()),
|
||||||
this, SIGNAL(baseEnvironmentChanged()));
|
this, SIGNAL(baseEnvironmentChanged()));
|
||||||
@@ -456,7 +454,6 @@ bool Qt4RunConfiguration::fromMap(const QVariantMap &map)
|
|||||||
m_userEnvironmentChanges = ProjectExplorer::EnvironmentItem::fromStringList(map.value(QLatin1String(USER_ENVIRONMENT_CHANGES_KEY)).toStringList());
|
m_userEnvironmentChanges = ProjectExplorer::EnvironmentItem::fromStringList(map.value(QLatin1String(USER_ENVIRONMENT_CHANGES_KEY)).toStringList());
|
||||||
m_baseEnvironmentBase = static_cast<BaseEnvironmentBase>(map.value(QLatin1String(BASE_ENVIRONMENT_BASE_KEY), static_cast<int>(Qt4RunConfiguration::BuildEnvironmentBase)).toInt());
|
m_baseEnvironmentBase = static_cast<BaseEnvironmentBase>(map.value(QLatin1String(BASE_ENVIRONMENT_BASE_KEY), static_cast<int>(Qt4RunConfiguration::BuildEnvironmentBase)).toInt());
|
||||||
|
|
||||||
// This will restore the display name for us:
|
|
||||||
return RunConfiguration::fromMap(map);
|
return RunConfiguration::fromMap(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -254,7 +254,7 @@ Qt4Target::Qt4Target(Qt4Project *parent, const QString &id) :
|
|||||||
connect(this, SIGNAL(activeRunConfigurationChanged(ProjectExplorer::RunConfiguration*)),
|
connect(this, SIGNAL(activeRunConfigurationChanged(ProjectExplorer::RunConfiguration*)),
|
||||||
this, SLOT(updateToolTipAndIcon()));
|
this, SLOT(updateToolTipAndIcon()));
|
||||||
|
|
||||||
setDisplayName(displayNameForId(id));
|
setDefaultDisplayName(displayNameForId(id));
|
||||||
setIcon(iconForId(id));
|
setIcon(iconForId(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -282,7 +282,7 @@ Qt4BuildConfiguration *Qt4Target::addQt4BuildConfiguration(QString displayName,
|
|||||||
|
|
||||||
// Add the buildconfiguration
|
// Add the buildconfiguration
|
||||||
Qt4BuildConfiguration *bc = new Qt4BuildConfiguration(this);
|
Qt4BuildConfiguration *bc = new Qt4BuildConfiguration(this);
|
||||||
bc->setDisplayName(displayName);
|
bc->setDefaultDisplayName(displayName);
|
||||||
|
|
||||||
BuildStepList *buildSteps = bc->stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
|
BuildStepList *buildSteps = bc->stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
|
||||||
BuildStepList *cleanSteps = bc->stepList(ProjectExplorer::Constants::BUILDSTEPS_CLEAN);
|
BuildStepList *cleanSteps = bc->stepList(ProjectExplorer::Constants::BUILDSTEPS_CLEAN);
|
||||||
@@ -404,13 +404,9 @@ QString Qt4Target::defaultShadowBuildDirectory(const QString &projectLocation, c
|
|||||||
|
|
||||||
bool Qt4Target::fromMap(const QVariantMap &map)
|
bool Qt4Target::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
if (!Target::fromMap(map))
|
bool success = Target::fromMap(map);
|
||||||
return false;
|
|
||||||
|
|
||||||
setDisplayName(displayNameForId(id()));
|
|
||||||
setIcon(iconForId(id()));
|
setIcon(iconForId(id()));
|
||||||
|
return success;
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Qt4Target::updateQtVersion()
|
void Qt4Target::updateQtVersion()
|
||||||
|
|||||||
Reference in New Issue
Block a user