Commit 848b8c0f authored by Joerg Bornemann's avatar Joerg Bornemann
Browse files

Update qbs submodule



To HEAD of 1.8 branch, and adapt to changed API.

Change-Id: Ie180b114726134a06dfefe9dc3a6dc27997f246c
Reviewed-by: Christian Kandeler's avatarChristian Kandeler <christian.kandeler@qt.io>
parent 8bfc47c8
......@@ -232,8 +232,14 @@ static QList<ProjectExplorer::ProjectAction> supportedNodeActions(ProjectExplore
return actions;
if (managesFiles)
actions << ProjectExplorer::AddNewFile << ProjectExplorer::AddExistingFile;
auto equalsNodeFilePath = [node](const QString &str)
{
return str == node->filePath().toString();
};
if (node->nodeType() == ProjectExplorer::NodeType::File
&& !project->qbsProject().buildSystemFiles().contains(node->filePath().toString())) {
&& !Utils::contains(project->qbsProject().buildSystemFiles(), equalsNodeFilePath)) {
actions << ProjectExplorer::RemoveFile << ProjectExplorer::Rename;
}
return actions;
......
......@@ -169,9 +169,16 @@ QSet<QString> referencedBuildSystemFiles(const qbs::ProjectData &data)
QStringList unreferencedBuildSystemFiles(const qbs::Project &p)
{
return p.isValid()
? p.buildSystemFiles().subtract(referencedBuildSystemFiles(p.projectData())).toList()
: QStringList();
QStringList result;
if (!p.isValid())
return result;
const std::set<QString> &available = p.buildSystemFiles();
const QSet<QString> &referenced = referencedBuildSystemFiles(p.projectData());
std::set_difference(available.begin(), available.end(), referenced.begin(), referenced.end(),
std::back_inserter(result));
return result;
}
} // namespace
......
......@@ -411,12 +411,20 @@ bool QbsProject::checkCancelStatus()
return true;
}
static QSet<QString> toQStringSet(const std::set<QString> &src)
{
QSet<QString> result;
result.reserve(src.size());
std::copy(src.begin(), src.end(), Utils::inserter(result));
return result;
}
void QbsProject::updateAfterParse()
{
qCDebug(qbsPmLog) << "Updating data after parse";
OpTimer opTimer("updateAfterParse");
updateProjectNodes();
updateDocuments(m_qbsProject.buildSystemFiles());
updateDocuments(toQStringSet(m_qbsProject.buildSystemFiles()));
updateBuildTargetData();
updateCppCodeModel();
updateQmlJsCodeModel();
......
Subproject commit 28f803d359c5f3102514d7817478cb4927114102
Subproject commit 24000d556fefdb3dcd4103d3d1679429434e6f58
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment