forked from qt-creator/qt-creator
Make buildDirectoryInitialized a Qt4Project specific signal again
And fix it to the old behaviour while at it. Change-Id: Ifd786e085c621fb3cd59b98cc665d9e3c7fcce51 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
@@ -254,8 +254,3 @@ BuildConfiguration::BuildType AutotoolsBuildConfiguration::buildType() const
|
|||||||
// TODO: Should I return something different from Unknown?
|
// TODO: Should I return something different from Unknown?
|
||||||
return Unknown;
|
return Unknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutotoolsBuildConfiguration::emitBuildDirectoryInitialized()
|
|
||||||
{
|
|
||||||
emit buildDirectoryInitialized();
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -59,8 +59,6 @@ public:
|
|||||||
ProjectExplorer::IOutputParser *createOutputParser() const;
|
ProjectExplorer::IOutputParser *createOutputParser() const;
|
||||||
BuildType buildType() const;
|
BuildType buildType() const;
|
||||||
|
|
||||||
void emitBuildDirectoryInitialized();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AutotoolsBuildConfiguration(ProjectExplorer::Target *parent, const Core::Id id);
|
AutotoolsBuildConfiguration(ProjectExplorer::Target *parent, const Core::Id id);
|
||||||
AutotoolsBuildConfiguration(ProjectExplorer::Target *parent, AutotoolsBuildConfiguration *source);
|
AutotoolsBuildConfiguration(ProjectExplorer::Target *parent, AutotoolsBuildConfiguration *source);
|
||||||
|
|||||||
@@ -230,19 +230,6 @@ QVariantMap ConfigureStep::toMap() const
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConfigureStep::processSucceeded(int exitCode, QProcess::ExitStatus status)
|
|
||||||
{
|
|
||||||
if (exitCode != 0 || status != QProcess::NormalExit)
|
|
||||||
return false;
|
|
||||||
AutotoolsBuildConfiguration *bc = qobject_cast<AutotoolsBuildConfiguration *>(buildConfiguration());
|
|
||||||
if (!bc)
|
|
||||||
bc = qobject_cast<AutotoolsBuildConfiguration *>(target()->activeBuildConfiguration());
|
|
||||||
if (!bc)
|
|
||||||
return true;
|
|
||||||
bc->emitBuildDirectoryInitialized();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ConfigureStep::fromMap(const QVariantMap &map)
|
bool ConfigureStep::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
m_additionalArguments = map.value(QLatin1String(CONFIGURE_ADDITIONAL_ARGUMENTS_KEY)).toString();
|
m_additionalArguments = map.value(QLatin1String(CONFIGURE_ADDITIONAL_ARGUMENTS_KEY)).toString();
|
||||||
|
|||||||
@@ -106,8 +106,6 @@ public:
|
|||||||
QString additionalArguments() const;
|
QString additionalArguments() const;
|
||||||
QVariantMap toMap() const;
|
QVariantMap toMap() const;
|
||||||
|
|
||||||
bool processSucceeded(int exitCode, QProcess::ExitStatus status);
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setAdditionalArguments(const QString &list);
|
void setAdditionalArguments(const QString &list);
|
||||||
|
|
||||||
|
|||||||
@@ -104,8 +104,6 @@ signals:
|
|||||||
void enabledChanged();
|
void enabledChanged();
|
||||||
/// Emitted whenever the build system needs to be (re-) evaluated
|
/// Emitted whenever the build system needs to be (re-) evaluated
|
||||||
void requestBuildSystemEvaluation();
|
void requestBuildSystemEvaluation();
|
||||||
/// Emitter whenever the build directory was successfully initialized (configured).
|
|
||||||
void buildDirectoryInitialized();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
BuildConfiguration(Target *target, const Core::Id id);
|
BuildConfiguration(Target *target, const Core::Id id);
|
||||||
|
|||||||
@@ -456,13 +456,6 @@ void Project::buildSystemEvaluationFinished(bool success)
|
|||||||
emit buildSystemEvaluated();
|
emit buildSystemEvaluated();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Project::onBuildDirectoryInitialized()
|
|
||||||
{
|
|
||||||
Target *target = qobject_cast<Target *>(sender());
|
|
||||||
if (target && target == activeTarget())
|
|
||||||
emit buildDirectoryInitialized();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Project::onBuildDirectoryChanged()
|
void Project::onBuildDirectoryChanged()
|
||||||
{
|
{
|
||||||
Target *target = qobject_cast<Target *>(sender());
|
Target *target = qobject_cast<Target *>(sender());
|
||||||
|
|||||||
@@ -143,9 +143,6 @@ signals:
|
|||||||
|
|
||||||
void environmentChanged();
|
void environmentChanged();
|
||||||
void buildConfigurationEnabledChanged();
|
void buildConfigurationEnabledChanged();
|
||||||
// The build directory of the current target/build configuration was successfully
|
|
||||||
// initialized (or configured).
|
|
||||||
void buildDirectoryInitialized();
|
|
||||||
void buildDirectoryChanged();
|
void buildDirectoryChanged();
|
||||||
void buildSystemEvaluated();
|
void buildSystemEvaluated();
|
||||||
|
|
||||||
@@ -168,7 +165,6 @@ protected:
|
|||||||
private slots:
|
private slots:
|
||||||
void changeEnvironment();
|
void changeEnvironment();
|
||||||
void changeBuildConfigurationEnabled();
|
void changeBuildConfigurationEnabled();
|
||||||
void onBuildDirectoryInitialized();
|
|
||||||
void onBuildDirectoryChanged();
|
void onBuildDirectoryChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -845,13 +845,4 @@ void Target::onRequestBuildSystemEvaluation()
|
|||||||
emit requestBuildSystemEvaluation();
|
emit requestBuildSystemEvaluation();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Target::onBuildDirectoryInitialized()
|
|
||||||
{
|
|
||||||
BuildConfiguration *bc = qobject_cast<BuildConfiguration *>(sender());
|
|
||||||
if (!bc)
|
|
||||||
return;
|
|
||||||
if (bc == activeBuildConfiguration())
|
|
||||||
emit buildDirectoryInitialized();
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace ProjectExplorer
|
} // namespace ProjectExplorer
|
||||||
|
|||||||
@@ -152,15 +152,12 @@ signals:
|
|||||||
|
|
||||||
/// Emitted whenever the project should (re-)evaluate the build system
|
/// Emitted whenever the project should (re-)evaluate the build system
|
||||||
void requestBuildSystemEvaluation();
|
void requestBuildSystemEvaluation();
|
||||||
/// Emitted whenever the current build configuration has finished to initialize its build directory.
|
|
||||||
void buildDirectoryInitialized();
|
|
||||||
/// Emitted whenever the current build configuartion changed or the build directory of the current
|
/// Emitted whenever the current build configuartion changed or the build directory of the current
|
||||||
/// build configuration was changed.
|
/// build configuration was changed.
|
||||||
void buildDirectoryChanged();
|
void buildDirectoryChanged();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void onRequestBuildSystemEvaluation();
|
void onRequestBuildSystemEvaluation();
|
||||||
void onBuildDirectoryInitialized();
|
|
||||||
void onBuildDirectoryChanged();
|
void onBuildDirectoryChanged();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
@@ -362,7 +362,8 @@ bool QMakeStep::processSucceeded(int exitCode, QProcess::ExitStatus status)
|
|||||||
bool result = AbstractProcessStep::processSucceeded(exitCode, status);
|
bool result = AbstractProcessStep::processSucceeded(exitCode, status);
|
||||||
if (!result)
|
if (!result)
|
||||||
m_needToRunQMake = true;
|
m_needToRunQMake = true;
|
||||||
qt4BuildConfiguration()->emitBuildDirectoryInitialized();
|
Qt4Project *project = static_cast<Qt4Project *>(qt4BuildConfiguration()->target()->project());
|
||||||
|
project->emitBuildDirectoryInitialized();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -309,11 +309,6 @@ void Qt4BuildConfiguration::emitQMakeBuildConfigurationChanged()
|
|||||||
emit qmakeBuildConfigurationChanged();
|
emit qmakeBuildConfigurationChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Qt4BuildConfiguration::emitBuildDirectoryInitialized()
|
|
||||||
{
|
|
||||||
emit buildDirectoryInitialized();
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList Qt4BuildConfiguration::configCommandLineArguments() const
|
QStringList Qt4BuildConfiguration::configCommandLineArguments() const
|
||||||
{
|
{
|
||||||
QStringList result;
|
QStringList result;
|
||||||
|
|||||||
@@ -78,9 +78,6 @@ public:
|
|||||||
// not really nice, the build configuration should save the arguments
|
// not really nice, the build configuration should save the arguments
|
||||||
// since they are needed for reevaluation
|
// since they are needed for reevaluation
|
||||||
void emitQMakeBuildConfigurationChanged();
|
void emitQMakeBuildConfigurationChanged();
|
||||||
// used by qmake step to notify that the build directory was initialized
|
|
||||||
// not really nice
|
|
||||||
void emitBuildDirectoryInitialized();
|
|
||||||
|
|
||||||
QStringList configCommandLineArguments() const;
|
QStringList configCommandLineArguments() const;
|
||||||
|
|
||||||
|
|||||||
@@ -1543,6 +1543,10 @@ void Qt4Project::collectLibraryData(const Qt4ProFileNode *node, DeploymentData &
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Qt4Project::emitBuildDirectoryInitialized()
|
||||||
|
{
|
||||||
|
emit buildDirectoryInitialized();
|
||||||
|
}
|
||||||
} // namespace Qt4ProjectManager
|
} // namespace Qt4ProjectManager
|
||||||
|
|
||||||
#include "qt4project.moc"
|
#include "qt4project.moc"
|
||||||
|
|||||||
@@ -140,8 +140,11 @@ public:
|
|||||||
|
|
||||||
ProjectExplorer::Target *createTarget(ProjectExplorer::Profile *p, const QList<BuildConfigurationInfo> &infoList);
|
ProjectExplorer::Target *createTarget(ProjectExplorer::Profile *p, const QList<BuildConfigurationInfo> &infoList);
|
||||||
|
|
||||||
|
void emitBuildDirectoryInitialized();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void proFileUpdated(Qt4ProjectManager::Qt4ProFileNode *node, bool, bool);
|
void proFileUpdated(Qt4ProjectManager::Qt4ProFileNode *node, bool, bool);
|
||||||
|
void buildDirectoryInitialized();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void proFileParseError(const QString &errorMessage);
|
void proFileParseError(const QString &errorMessage);
|
||||||
|
|||||||
@@ -96,11 +96,9 @@ Qt4ProjectConfigWidget::Qt4ProjectConfigWidget(ProjectExplorer::Target *target)
|
|||||||
connect(m_ui->shadowBuildDirEdit, SIGNAL(changed(QString)),
|
connect(m_ui->shadowBuildDirEdit, SIGNAL(changed(QString)),
|
||||||
this, SLOT(shadowBuildEdited()));
|
this, SLOT(shadowBuildEdited()));
|
||||||
|
|
||||||
Project *project = target->project();
|
Qt4Project *project = static_cast<Qt4Project *>(target->project());
|
||||||
if (project) {
|
connect(project, SIGNAL(environmentChanged()), this, SLOT(environmentChanged()));
|
||||||
connect(project, SIGNAL(environmentChanged()), this, SLOT(environmentChanged()));
|
connect(project, SIGNAL(buildDirectoryInitialized()), this, SLOT(updateProblemLabel()));
|
||||||
connect(project, SIGNAL(buildDirectoryInitialized()), this, SLOT(updateProblemLabel()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Qt4ProjectConfigWidget::~Qt4ProjectConfigWidget()
|
Qt4ProjectConfigWidget::~Qt4ProjectConfigWidget()
|
||||||
|
|||||||
Reference in New Issue
Block a user