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