Commit c09c5ec9 authored by dt's avatar dt
Browse files

Qt4ProjectManager: Emit correct state once on restoring

parent fe4549f7
......@@ -1308,6 +1308,20 @@ QStringList Qt4ProFileNode::variableValue(const Qt4Variable var) const
return m_varValues.value(var);
}
void Qt4ProFileNode::emitProFileUpdated()
{
foreach (NodesWatcher *watcher, watchers())
if (Qt4NodesWatcher *qt4Watcher = qobject_cast<Qt4NodesWatcher*>(watcher))
emit qt4Watcher->proFileUpdated(this, m_validParse);
foreach (ProjectNode *subNode, subProjectNodes()) {
if (Qt4ProFileNode *node = qobject_cast<Qt4ProFileNode *>(subNode)) {
node->emitProFileUpdated();
}
}
}
void Qt4ProFileNode::emitProFileInvalidated()
{
foreach (NodesWatcher *watcher, watchers())
......
......@@ -299,6 +299,7 @@ public:
void scheduleUpdate();
void emitProFileInvalidated();
void emitProFileUpdated();
bool validParse() const;
......
......@@ -331,12 +331,6 @@ bool Qt4Project::fromMap(const QVariantMap &map)
setSupportedTargetIds(QtVersionManager::instance()->supportedTargetIds());
// Setup Qt versions supported (== possible targets).
connect(this, SIGNAL(addedTarget(ProjectExplorer::Target*)),
this, SLOT(onAddedTarget(ProjectExplorer::Target*)));
connect(QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>)),
this, SLOT(qtVersionsChanged()));
connect(m_nodesWatcher, SIGNAL(proFileUpdated(Qt4ProjectManager::Internal::Qt4ProFileNode*,bool)),
this, SIGNAL(proFileUpdated(Qt4ProjectManager::Internal::Qt4ProFileNode *,bool)));
......@@ -344,6 +338,17 @@ bool Qt4Project::fromMap(const QVariantMap &map)
connect(m_nodesWatcher, SIGNAL(proFileInvalidated(Qt4ProjectManager::Internal::Qt4ProFileNode*)),
this, SIGNAL(proFileInvalidated(Qt4ProjectManager::Internal::Qt4ProFileNode*)));
// Now we emit update once :)
m_rootProjectNode->emitProFileUpdated();
// Setup Qt versions supported (== possible targets).
connect(this, SIGNAL(addedTarget(ProjectExplorer::Target*)),
this, SLOT(onAddedTarget(ProjectExplorer::Target*)));
connect(QtVersionManager::instance(), SIGNAL(qtVersionsChanged(QList<int>)),
this, SLOT(qtVersionsChanged()));
connect(this, SIGNAL(activeTargetChanged(ProjectExplorer::Target*)),
this, SLOT(activeTargetWasChanged()));
......
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