forked from qt-creator/qt-creator
QmakeProjectManager: Do not start parsing without a target
This "feature" generated misleading output when opening a project initially. Change-Id: I86c541266ffbf576899004f4e6401feea6f38173 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -197,12 +197,12 @@ Project::RestoreResult QmakeProject::fromMap(const QVariantMap &map, QString *er
|
|||||||
if (m_activeTarget) {
|
if (m_activeTarget) {
|
||||||
connect(m_activeTarget, &Target::activeBuildConfigurationChanged,
|
connect(m_activeTarget, &Target::activeBuildConfigurationChanged,
|
||||||
this, &QmakeProject::scheduleAsyncUpdateLater);
|
this, &QmakeProject::scheduleAsyncUpdateLater);
|
||||||
|
scheduleAsyncUpdate(QmakeProFile::ParseNow);
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(this, &Project::activeTargetChanged,
|
connect(this, &Project::activeTargetChanged,
|
||||||
this, &QmakeProject::activeTargetWasChanged);
|
this, &QmakeProject::activeTargetWasChanged);
|
||||||
|
|
||||||
scheduleAsyncUpdate(QmakeProFile::ParseNow);
|
|
||||||
return RestoreResult::Ok;
|
return RestoreResult::Ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -707,7 +707,8 @@ QmakeProFileNode *QmakeProject::rootProjectNode() const
|
|||||||
|
|
||||||
void QmakeProject::activeTargetWasChanged()
|
void QmakeProject::activeTargetWasChanged()
|
||||||
{
|
{
|
||||||
if (m_activeTarget) {
|
const bool hadActiveTarget = m_activeTarget;
|
||||||
|
if (hadActiveTarget) {
|
||||||
disconnect(m_activeTarget, &Target::activeBuildConfigurationChanged,
|
disconnect(m_activeTarget, &Target::activeBuildConfigurationChanged,
|
||||||
this, &QmakeProject::scheduleAsyncUpdateLater);
|
this, &QmakeProject::scheduleAsyncUpdateLater);
|
||||||
}
|
}
|
||||||
@@ -721,7 +722,7 @@ void QmakeProject::activeTargetWasChanged()
|
|||||||
connect(m_activeTarget, &Target::activeBuildConfigurationChanged,
|
connect(m_activeTarget, &Target::activeBuildConfigurationChanged,
|
||||||
this, &QmakeProject::scheduleAsyncUpdateLater);
|
this, &QmakeProject::scheduleAsyncUpdateLater);
|
||||||
|
|
||||||
scheduleAsyncUpdate();
|
scheduleAsyncUpdate(hadActiveTarget ? QmakeProFile::ParseLater : QmakeProFile::ParseNow);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void notifyChangedHelper(const FilePath &fileName, QmakeProFile *file)
|
static void notifyChangedHelper(const FilePath &fileName, QmakeProFile *file)
|
||||||
|
Reference in New Issue
Block a user