Commit b9813b7c authored by Tobias Hunger's avatar Tobias Hunger

Qbs: Make "Reparse Qbs" force a reparsing

... even if Qt Creator thinks all is well.

Change-Id: I40fa61d51c8e18a389bedf7d8afb927bbb88acd5
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@digia.com>
parent 7af5674c
......@@ -112,7 +112,7 @@ QbsProject::QbsProject(QbsManager *manager, const QString &fileName) :
this, SLOT(targetWasAdded(ProjectExplorer::Target*)));
connect(this, SIGNAL(environmentChanged()), this, SLOT(delayParsing()));
connect(&m_parsingDelay, SIGNAL(timeout()), this, SLOT(parseCurrentBuildConfiguration()));
connect(&m_parsingDelay, SIGNAL(timeout()), this, SLOT(startParsing()));
updateDocuments(QSet<QString>() << fileName);
......@@ -357,6 +357,11 @@ void QbsProject::buildConfigurationChanged(BuildConfiguration *bc)
}
}
void QbsProject::startParsing()
{
parseCurrentBuildConfiguration(false);
}
void QbsProject::delayParsing()
{
m_parsingDelay.start();
......@@ -368,10 +373,13 @@ void QbsProject::delayForcedParsing()
delayParsing();
}
void QbsProject::parseCurrentBuildConfiguration()
void QbsProject::parseCurrentBuildConfiguration(bool force)
{
m_parsingDelay.stop();
if (!m_forceParsing)
m_forceParsing = force;
if (!activeTarget())
return;
QbsBuildConfiguration *bc = qobject_cast<QbsBuildConfiguration *>(activeTarget()->activeBuildConfiguration());
......
......@@ -90,6 +90,7 @@ public:
QString profileForTarget(const ProjectExplorer::Target *t) const;
bool isParsing() const;
bool hasParseResult() const;
void parseCurrentBuildConfiguration(bool force);
Utils::FileName defaultBuildDirectory() const;
static Utils::FileName defaultBuildDirectory(const QString &path);
......@@ -101,7 +102,6 @@ public:
public slots:
void invalidate();
void parseCurrentBuildConfiguration();
void delayParsing();
void delayForcedParsing();
......@@ -117,6 +117,7 @@ private slots:
void targetWasAdded(ProjectExplorer::Target *t);
void changeActiveTarget(ProjectExplorer::Target *t);
void buildConfigurationChanged(ProjectExplorer::BuildConfiguration *bc);
void startParsing();
private:
bool fromMap(const QVariantMap &map);
......
......@@ -405,7 +405,7 @@ void QbsProjectManagerPlugin::buildProducts(QbsProject *project, const QStringLi
void QbsProjectManagerPlugin::reparseCurrentProject()
{
if (m_currentProject)
m_currentProject->parseCurrentBuildConfiguration();
m_currentProject->parseCurrentBuildConfiguration(true);
}
} // namespace Internal
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment