Commit d43a36c8 authored by Christian Stenger's avatar Christian Stenger

Trigger parse when project parts have been updated

Change-Id: I8b81bd91671b3d855c617c63185baa2951a55e6e
Reviewed-by: default avatarDavid Schulz <david.schulz@theqtcompany.com>
parent 2182b2ad
......@@ -538,6 +538,13 @@ void TestCodeParser::onQmlDocumentUpdated(const QmlJS::Document::Ptr &document)
}
}
void TestCodeParser::onProjectPartsUpdated(ProjectExplorer::Project *project)
{
if (project != currentProject())
return;
updateTestTree();
}
void TestCodeParser::removeFiles(const QStringList &files)
{
foreach (const QString &file, files)
......
......@@ -83,6 +83,7 @@ public slots:
void onCppDocumentUpdated(const CPlusPlus::Document::Ptr &document);
void onQmlDocumentUpdated(const QmlJS::Document::Ptr &document);
void onProjectPartsUpdated(ProjectExplorer::Project *project);
void removeFiles(const QStringList &files);
void onProFileEvaluated();
......
......@@ -115,6 +115,8 @@ void TestTreeModel::enableParsing()
m_parser, &TestCodeParser::onCppDocumentUpdated, Qt::QueuedConnection);
connect(cppMM, &CppTools::CppModelManager::aboutToRemoveFiles,
m_parser, &TestCodeParser::removeFiles, Qt::QueuedConnection);
connect(cppMM, &CppTools::CppModelManager::projectPartsUpdated,
m_parser, &TestCodeParser::onProjectPartsUpdated);
QmlJS::ModelManagerInterface *qmlJsMM = QmlJS::ModelManagerInterface::instance();
connect(qmlJsMM, &QmlJS::ModelManagerInterface::documentUpdated,
......
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