forked from qt-creator/qt-creator
AutoTest: Restore former check state on reparse
When reparsing while modifying a file it can happen that the parse failed for some reason or did not provide full information due to syntax errors the code model cannot cope with. This in turn can purge items from the test tree. Re-adding the items in a later reparse had just added the item and did not take care of (former) check states. Add simple caching mechanism to keep track of check states and use them if available. Task-number: QTCREATORBUG-24099 Change-Id: I3ca04f5fd58810df71582972e6fe96a00cfc48f1 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -334,6 +334,7 @@ void TestCodeParser::scanForTests(const QStringList &fileList, const QList<ITest
|
||||
}
|
||||
|
||||
parsingHasFailed = false;
|
||||
TestTreeModel::instance()->updateCheckStateCache();
|
||||
if (isFullParse) {
|
||||
// remove qml files as they will be found automatically by the referencing cpp file
|
||||
list = Utils::filtered(list, [] (const QString &fn) {
|
||||
|
||||
Reference in New Issue
Block a user