forked from qt-creator/qt-creator
qmljs: fix race in qmljstodoitemsscanner
avoid calling ui-only method on the ProjectExplorer::Project, use information cached in ProjectInfo instead. This (as before) does not automatically scans files in qrc. Contents of qrc should most likely be added to ProjectInfo.sourceFiles Task-number: QTCREATORBUG-12556 Change-Id: Ic7f72589cc5bb132ef9d3d03be9d9fc47f1196fd Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
This commit is contained in:
@@ -47,7 +47,7 @@ bool QmlJsTodoItemsScanner::shouldProcessFile(const QString &fileName)
|
|||||||
{
|
{
|
||||||
QmlJS::ModelManagerInterface *modelManager = QmlJS::ModelManagerInterface::instance();
|
QmlJS::ModelManagerInterface *modelManager = QmlJS::ModelManagerInterface::instance();
|
||||||
foreach (const QmlJS::ModelManagerInterface::ProjectInfo &info, modelManager->projectInfos())
|
foreach (const QmlJS::ModelManagerInterface::ProjectInfo &info, modelManager->projectInfos())
|
||||||
if (info.project->files(ProjectExplorer::Project::ExcludeGeneratedFiles).contains(fileName))
|
if (info.sourceFiles.contains(fileName))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user