Commit 5d8c0f9c authored by Christian Kandeler's avatar Christian Kandeler

Update qbs submodule.

To HEAD of master branch.
Also do the necessary adaptations.

Change-Id: I51830dee41341c9be294caf69fdb0459ed8c8bfe
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@theqtcompany.com>
parent 4a0df73b
......@@ -216,7 +216,7 @@ void QbsBuildStep::buildingDone(bool success)
// Report errors:
foreach (const qbs::ErrorItem &item, m_job->error().items())
createTaskAndOutput(ProjectExplorer::Task::Error, item.description(),
item.codeLocation().fileName(), item.codeLocation().line());
item.codeLocation().filePath(), item.codeLocation().line());
QbsProject *pro = static_cast<QbsProject *>(project());
......
......@@ -182,7 +182,7 @@ void QbsCleanStep::cleaningDone(bool success)
// Report errors:
foreach (const qbs::ErrorItem &item, m_job->error().items()) {
createTaskAndOutput(ProjectExplorer::Task::Error, item.description(),
item.codeLocation().fileName(), item.codeLocation().line());
item.codeLocation().filePath(), item.codeLocation().line());
}
QTC_ASSERT(m_fi, return);
......
......@@ -192,7 +192,7 @@ void QbsInstallStep::installDone(bool success)
// Report errors:
foreach (const qbs::ErrorItem &item, m_job->error().items()) {
createTaskAndOutput(ProjectExplorer::Task::Error, item.description(),
item.codeLocation().fileName(), item.codeLocation().line());
item.codeLocation().filePath(), item.codeLocation().line());
}
QTC_ASSERT(m_fi, return);
......
......@@ -73,7 +73,7 @@ void QbsLogSink::doPrintWarning(const qbs::ErrorInfo &warning)
foreach (const qbs::ErrorItem &item, warning.items())
emit newTask(ProjectExplorer::Task(ProjectExplorer::Task::Warning,
item.description(),
Utils::FileName::fromString(item.codeLocation().fileName()),
Utils::FileName::fromString(item.codeLocation().filePath()),
item.codeLocation().line(),
ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
}
......
......@@ -353,7 +353,7 @@ QbsGroupNode::QbsGroupNode(const qbs::GroupData &grp, const QString &productPath
setIcon(m_groupIcon);
QbsFileNode *idx = new QbsFileNode(grp.location().fileName(),
QbsFileNode *idx = new QbsFileNode(grp.location().filePath(),
ProjectExplorer::ProjectFileType, false,
grp.location().line());
addFileNodes(QList<ProjectExplorer::FileNode *>() << idx);
......@@ -447,7 +447,7 @@ void QbsGroupNode::updateQbsGroupData(const qbs::GroupData &grp, const QString &
m_productPath = productPath;
m_qbsGroupData = grp;
setPath(grp.location().fileName());
setPath(grp.location().filePath());
setDisplayName(grp.name());
QbsFileNode *idx = 0;
......@@ -457,7 +457,7 @@ void QbsGroupNode::updateQbsGroupData(const qbs::GroupData &grp, const QString &
break;
}
QTC_ASSERT(idx, return);
idx->setPathAndLine(grp.location().fileName(), grp.location().line());
idx->setPathAndLine(grp.location().filePath(), grp.location().line());
setupFiles(this, grp.allFilePaths(), productPath, updateExisting);
......@@ -565,14 +565,14 @@ void QbsGroupNode::setupFolder(ProjectExplorer::FolderNode *root,
// --------------------------------------------------------------------
QbsProductNode::QbsProductNode(const qbs::Project &project, const qbs::ProductData &prd) :
QbsBaseProjectNode(prd.location().fileName())
QbsBaseProjectNode(prd.location().filePath())
{
if (m_productIcon.isNull())
m_productIcon = generateIcon(QString::fromLatin1(Constants::QBS_PRODUCT_OVERLAY_ICON));
setIcon(m_productIcon);
ProjectExplorer::FileNode *idx = new QbsFileNode(prd.location().fileName(),
ProjectExplorer::FileNode *idx = new QbsFileNode(prd.location().filePath(),
ProjectExplorer::ProjectFileType, false,
prd.location().line());
addFileNodes(QList<ProjectExplorer::FileNode *>() << idx);
......@@ -658,8 +658,8 @@ void QbsProductNode::setQbsProductData(const qbs::Project &project, const qbs::P
bool updateExisting = productWasEnabled != productIsEnabled;
setDisplayName(QbsProject::productDisplayName(project, prd));
setPath(prd.location().fileName());
const QString &productPath = QFileInfo(prd.location().fileName()).absolutePath();
setPath(prd.location().filePath());
const QString &productPath = QFileInfo(prd.location().filePath()).absolutePath();
// Find the QbsFileNode we added earlier:
QbsFileNode *idx = 0;
......@@ -669,7 +669,7 @@ void QbsProductNode::setQbsProductData(const qbs::Project &project, const qbs::P
break;
}
QTC_ASSERT(idx, return);
idx->setPathAndLine(prd.location().fileName(), prd.location().line());
idx->setPathAndLine(prd.location().filePath(), prd.location().line());
QList<ProjectExplorer::ProjectNode *> toAdd;
QList<ProjectExplorer::ProjectNode *> toRemove = subProjectNodes();
......@@ -751,7 +751,7 @@ void QbsProjectNode::update(const qbs::Project &qbsProject, const qbs::ProjectDa
foreach (const qbs::ProjectData &subData, prjData.subProjects()) {
QbsProjectNode *qn = findProjectNode(subData.name());
if (!qn) {
QbsProjectNode *subProject = new QbsProjectNode(subData.location().fileName());
QbsProjectNode *subProject = new QbsProjectNode(subData.location().filePath());
subProject->update(qbsProject, subData);
toAdd << subProject;
} else {
......@@ -856,13 +856,13 @@ void QbsRootProjectNode::update()
static QSet<QString> referencedBuildSystemFiles(const qbs::ProjectData &data)
{
QSet<QString> result;
result.insert(data.location().fileName());
result.insert(data.location().filePath());
foreach (const qbs::ProjectData &subProject, data.subProjects())
result.unite(referencedBuildSystemFiles(subProject));
foreach (const qbs::ProductData &product, data.products()) {
result.insert(product.location().fileName());
result.insert(product.location().filePath());
foreach (const qbs::GroupData &group, product.groups())
result.insert(group.location().fileName());
result.insert(group.location().filePath());
}
return result;
......
......@@ -174,14 +174,14 @@ ProjectNode *QbsProject::rootProjectNode() const
static void collectFilesForProject(const qbs::ProjectData &project, QSet<QString> &result)
{
result.insert(project.location().fileName());
result.insert(project.location().filePath());
foreach (const qbs::ProductData &prd, project.products()) {
foreach (const qbs::GroupData &grp, prd.groups()) {
foreach (const QString &file, grp.allFilePaths())
result.insert(file);
result.insert(grp.location().fileName());
result.insert(grp.location().filePath());
}
result.insert(prd.location().fileName());
result.insert(prd.location().filePath());
}
foreach (const qbs::ProjectData &subProject, project.subProjects())
collectFilesForProject(subProject, result);
......@@ -259,7 +259,7 @@ bool QbsProject::addFilesToProduct(QbsBaseProjectNode *node, const QStringList &
{
QTC_ASSERT(m_qbsProject.isValid(), return false);
QStringList allPaths = groupData.allFilePaths();
const QString productFilePath = productData.location().fileName();
const QString productFilePath = productData.location().filePath();
ChangeExpector expector(productFilePath, m_qbsDocuments);
ensureWriteableQbsFile(productFilePath);
foreach (const QString &path, filePaths) {
......@@ -285,7 +285,7 @@ bool QbsProject::removeFilesFromProduct(QbsBaseProjectNode *node, const QStringL
{
QTC_ASSERT(m_qbsProject.isValid(), return false);
QStringList allPaths = groupData.allFilePaths();
const QString productFilePath = productData.location().fileName();
const QString productFilePath = productData.location().filePath();
ChangeExpector expector(productFilePath, m_qbsDocuments);
ensureWriteableQbsFile(productFilePath);
foreach (const QString &path, filePaths) {
......@@ -598,7 +598,7 @@ void QbsProject::generateErrors(const qbs::ErrorInfo &e)
foreach (const qbs::ErrorItem &item, e.items())
TaskHub::addTask(Task::Error, item.description(),
ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM,
FileName::fromString(item.codeLocation().fileName()),
FileName::fromString(item.codeLocation().filePath()),
item.codeLocation().line());
}
......@@ -754,7 +754,7 @@ void QbsProject::updateCppCodeModel()
ppBuilder.setDisplayName(grp.name());
ppBuilder.setProjectFile(QString::fromLatin1("%1:%2:%3")
.arg(grp.location().fileName())
.arg(grp.location().filePath())
.arg(grp.location().line())
.arg(grp.location().column()));
......@@ -807,7 +807,7 @@ void QbsProject::updateApplicationTargets()
if (productData.targetArtifacts().isEmpty()) { // No build yet.
applications.list << ProjectExplorer::BuildTargetInfo(displayName,
Utils::FileName(),
Utils::FileName::fromString(productData.location().fileName()));
Utils::FileName::fromString(productData.location().filePath()));
continue;
}
foreach (const qbs::TargetArtifact &ta, productData.targetArtifacts()) {
......@@ -816,7 +816,7 @@ void QbsProject::updateApplicationTargets()
continue;
applications.list << ProjectExplorer::BuildTargetInfo(displayName,
Utils::FileName::fromString(ta.filePath()),
Utils::FileName::fromString(productData.location().fileName()));
Utils::FileName::fromString(productData.location().filePath()));
}
}
activeTarget()->setApplicationTargets(applications);
......
Subproject commit 0d1b18c7ad5bbfe4507f33d5f726b46f39d08677
Subproject commit 44016e08d1ea2b2e09a55db00d17078014a7d76b
......@@ -21,6 +21,7 @@ Project {
id: qbsProject
property string qbsBaseDir: path + "/shared/qbs"
condition: qbsSubModuleExists && !useExternalQbs
qbsSearchPaths: [qbsBaseDir + "/qbs-resources"]
property bool enableUnitTests: false
property bool enableProjectFileUpdates: true
......
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