QmlProject: Ignore generated files

Do not bother to look at generated files. Currently this makes no
big difference, considering that there usually are no generated files
in QmlProjects. That might change in the future with asset
conditioning though.

Change-Id: Ia773f09343efe5ebb006c69e4f41d724bba42d86
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Tobias Hunger
2019-08-22 11:19:41 +02:00
parent 567a0db6dd
commit 550c51c75e

View File

@@ -170,7 +170,7 @@ void MainQmlFileAspect::updateFileComboBox()
m_fileListModel.appendRow(new QStandardItem(QLatin1String(CURRENT_FILE))); m_fileListModel.appendRow(new QStandardItem(QLatin1String(CURRENT_FILE)));
QModelIndex currentIndex; QModelIndex currentIndex;
QStringList sortedFiles = Utils::transform(m_project->files(Project::AllFiles), QStringList sortedFiles = Utils::transform(m_project->files(Project::SourceFiles),
&Utils::FilePath::toString); &Utils::FilePath::toString);
// make paths relative to project directory // make paths relative to project directory
@@ -430,7 +430,7 @@ bool MainQmlFileAspect::isQmlFilePresent()
|| mainScriptMimeType.matchesName(QLatin1String(QmlJSTools::Constants::QMLPROJECT_MIMETYPE))) { || mainScriptMimeType.matchesName(QLatin1String(QmlJSTools::Constants::QMLPROJECT_MIMETYPE))) {
// find a qml file with lowercase filename. This is slow, but only done // find a qml file with lowercase filename. This is slow, but only done
// in initialization/other border cases. // in initialization/other border cases.
const auto files = m_project->files(Project::AllFiles); const auto files = m_project->files(Project::SourceFiles);
for (const Utils::FilePath &filename : files) { for (const Utils::FilePath &filename : files) {
const QFileInfo fi = filename.toFileInfo(); const QFileInfo fi = filename.toFileInfo();