Merge remote-tracking branch 'origin/5.0'

Conflicts:
	src/plugins/clangtools/clangtoolssettings.cpp
	src/plugins/clangtools/executableinfo.cpp
	src/plugins/clangtools/executableinfo.h

Change-Id: Id8caf63e3e594792467d3447870086bd2d8f73b9
This commit is contained in:
Eike Ziller
2021-09-13 15:36:51 +02:00
98 changed files with 1321 additions and 445 deletions

View File

@@ -146,17 +146,27 @@ QmlProject::QmlProject(const Utils::FilePath &fileName)
QTimer::singleShot(0, this, lambda);
}
} else {
connect(this, &QmlProject::anyParsingFinished, this, [this](Target *target, bool success) {
if (target && success) {
const Utils::FilePath &folder = projectDirectory();
const Utils::FilePaths &uiFiles = files([&](const ProjectExplorer::Node *node) {
return node->filePath().completeSuffix() == "ui.qml"
&& node->filePath().parentDir() == folder;
});
if (!uiFiles.isEmpty())
Core::EditorManager::openEditor(uiFiles.first(), Utils::Id());
}
});
m_openFileConnection = connect(
this, &QmlProject::anyParsingFinished, this, [this](Target *target, bool success) {
if (m_openFileConnection)
disconnect(m_openFileConnection);
if (target && success) {
const Utils::FilePath &folder = projectDirectory();
const Utils::FilePaths &uiFiles = files([&](const ProjectExplorer::Node *node) {
return node->filePath().completeSuffix() == "ui.qml"
&& node->filePath().parentDir() == folder;
});
if (!uiFiles.isEmpty()) {
Utils::FilePath currentFile;
if (auto cd = Core::EditorManager::currentDocument())
currentFile = cd->filePath();
if (currentFile.isEmpty() || !isKnownFile(currentFile))
Core::EditorManager::openEditor(uiFiles.first(), Utils::Id());
}
}
});
}
}