summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/autotest/testcodeparser.cpp7
-rw-r--r--plugins/autotest/testcodeparser.h1
-rw-r--r--plugins/autotest/testtreemodel.cpp2
3 files changed, 10 insertions, 0 deletions
diff --git a/plugins/autotest/testcodeparser.cpp b/plugins/autotest/testcodeparser.cpp
index 71e5eaff6d..c3ae634b59 100644
--- a/plugins/autotest/testcodeparser.cpp
+++ b/plugins/autotest/testcodeparser.cpp
@@ -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)
diff --git a/plugins/autotest/testcodeparser.h b/plugins/autotest/testcodeparser.h
index dc313ffa29..f4894e9674 100644
--- a/plugins/autotest/testcodeparser.h
+++ b/plugins/autotest/testcodeparser.h
@@ -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();
diff --git a/plugins/autotest/testtreemodel.cpp b/plugins/autotest/testtreemodel.cpp
index 5bba6b7c3c..0040b4d903 100644
--- a/plugins/autotest/testtreemodel.cpp
+++ b/plugins/autotest/testtreemodel.cpp
@@ -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,