forked from qt-creator/qt-creator
Have qmakestep trigger the import label
* Do not use the BuildManager but have the qmakestep trigger the update via the target and project. Reviewed-by: dt
This commit is contained in:
@@ -225,6 +225,7 @@ bool QMakeStep::processFinished(int exitCode, QProcess::ExitStatus status)
|
||||
bool result = AbstractProcessStep::processFinished(exitCode, status);
|
||||
if (!result)
|
||||
m_forced = true;
|
||||
qt4BuildConfiguration()->emitBuildDirectoryInitialized();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -372,6 +372,11 @@ void Qt4BuildConfiguration::emitQMakeBuildConfigurationChanged()
|
||||
emit qmakeBuildConfigurationChanged();
|
||||
}
|
||||
|
||||
void Qt4BuildConfiguration::emitBuildDirectoryInitialized()
|
||||
{
|
||||
emit buildDirectoryInitialized();
|
||||
}
|
||||
|
||||
void Qt4BuildConfiguration::getConfigCommandLineArguments(QStringList *addedUserConfigs, QStringList *removedUserConfigs) const
|
||||
{
|
||||
QtVersion::QmakeBuildConfigs defaultBuildConfiguration = qtVersion()->defaultBuildConfig();
|
||||
|
||||
@@ -86,6 +86,9 @@ public:
|
||||
// used by qmake step to notify that the qmake args have changed
|
||||
// not really nice
|
||||
void emitQMakeBuildConfigurationChanged();
|
||||
// used by qmake step to notify that the build directory was initialized
|
||||
// not really nice
|
||||
void emitBuildDirectoryInitialized();
|
||||
void getConfigCommandLineArguments(QStringList *addedUserConfigs, QStringList *removedUserConfigs) const;
|
||||
|
||||
// Those functions are used in a few places.
|
||||
@@ -120,6 +123,8 @@ signals:
|
||||
/// configuration changed
|
||||
void targetInformationChanged();
|
||||
|
||||
void buildDirectoryInitialized();
|
||||
|
||||
private slots:
|
||||
void qtVersionsChanged(const QList<int> &changedVersions);
|
||||
|
||||
|
||||
@@ -390,6 +390,10 @@ void Qt4Project::onAddedTarget(ProjectExplorer::Target *t)
|
||||
Q_ASSERT(t);
|
||||
connect(t, SIGNAL(targetInformationChanged()),
|
||||
this, SLOT(changeTargetInformation()));
|
||||
Qt4Target *qt4target = qobject_cast<Qt4Target *>(t);
|
||||
Q_ASSERT(qt4target);
|
||||
connect(qt4target, SIGNAL(buildDirectoryInitialized()),
|
||||
this, SIGNAL(buildDirectoryInitialized()));
|
||||
}
|
||||
|
||||
void Qt4Project::updateCodeModel()
|
||||
|
||||
@@ -172,6 +172,7 @@ signals:
|
||||
/// (which can happen by the active target changing, too).
|
||||
void targetInformationChanged();
|
||||
void proFileUpdated(Qt4ProjectManager::Internal::Qt4ProFileNode *node);
|
||||
void buildDirectoryInitialized();
|
||||
|
||||
public slots:
|
||||
void proFileParseError(const QString &errorMessage);
|
||||
|
||||
@@ -41,7 +41,6 @@
|
||||
#include <coreplugin/mainwindow.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/buildconfiguration.h>
|
||||
#include <projectexplorer/buildmanager.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
|
||||
@@ -103,8 +102,7 @@ Qt4ProjectConfigWidget::Qt4ProjectConfigWidget(Qt4Project *project)
|
||||
connect(m_ui->manageQtVersionPushButtons, SIGNAL(clicked()),
|
||||
this, SLOT(manageQtVersions()));
|
||||
|
||||
connect(ProjectExplorer::ProjectExplorerPlugin::instance()->buildManager(),
|
||||
SIGNAL(buildQueueFinished(bool)),
|
||||
connect(project, SIGNAL(buildDirectoryInitialized()),
|
||||
this, SLOT(updateImportLabel()));
|
||||
|
||||
QtVersionManager *vm = QtVersionManager::instance();
|
||||
|
||||
@@ -190,6 +190,8 @@ Qt4Target::Qt4Target(Qt4Project *parent, const QString &id) :
|
||||
this, SIGNAL(environmentChanged()));
|
||||
connect(this, SIGNAL(addedRunConfiguration(ProjectExplorer::RunConfiguration*)),
|
||||
this, SLOT(onAddedRunConfiguration(ProjectExplorer::RunConfiguration*)));
|
||||
connect(this, SIGNAL(addedBuildConfiguration(ProjectExplorer::BuildConfiguration*)),
|
||||
this, SLOT(onAddedBuildConfiguration(ProjectExplorer::BuildConfiguration*)));
|
||||
connect(this, SIGNAL(activeRunConfigurationChanged(ProjectExplorer::RunConfiguration*)),
|
||||
this, SLOT(updateToolTipAndIcon()));
|
||||
|
||||
@@ -403,6 +405,15 @@ void Qt4Target::onAddedRunConfiguration(ProjectExplorer::RunConfiguration *rc)
|
||||
this, SLOT(slotUpdateDeviceInformation()));
|
||||
}
|
||||
|
||||
void Qt4Target::onAddedBuildConfiguration(ProjectExplorer::BuildConfiguration *bc)
|
||||
{
|
||||
Q_ASSERT(bc);
|
||||
Qt4BuildConfiguration *qt4bc = qobject_cast<Qt4BuildConfiguration *>(bc);
|
||||
Q_ASSERT(qt4bc);
|
||||
connect(qt4bc, SIGNAL(buildDirectoryInitialized()),
|
||||
this, SIGNAL(buildDirectoryInitialized()));
|
||||
}
|
||||
|
||||
void Qt4Target::slotUpdateDeviceInformation()
|
||||
{
|
||||
S60DeviceRunConfiguration *deviceRc(qobject_cast<S60DeviceRunConfiguration *>(sender()));
|
||||
|
||||
@@ -99,12 +99,15 @@ signals:
|
||||
/// targetInformationChanged() or if the active build configuration changes
|
||||
void targetInformationChanged();
|
||||
|
||||
void buildDirectoryInitialized();
|
||||
|
||||
protected:
|
||||
bool fromMap(const QVariantMap &map);
|
||||
|
||||
private slots:
|
||||
void updateQtVersion();
|
||||
void onAddedRunConfiguration(ProjectExplorer::RunConfiguration *rc);
|
||||
void onAddedBuildConfiguration(ProjectExplorer::BuildConfiguration *bc);
|
||||
void slotUpdateDeviceInformation();
|
||||
void updateToolTipAndIcon();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user