forked from qt-creator/qt-creator
Update qbs submodule.
Plus some minor adjustments in the qbs project manager to an API change. Change-Id: I41ea8571fee7ec666344464ecc4f808bf92f13ce Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
committed by
Joerg Bornemann
parent
c884f629d6
commit
8a0c8081a0
@@ -117,7 +117,7 @@ void QbsBuildStep::run(QFutureInterface<bool> &fi)
|
|||||||
|
|
||||||
QbsProject *pro = static_cast<QbsProject *>(project());
|
QbsProject *pro = static_cast<QbsProject *>(project());
|
||||||
qbs::BuildOptions options(m_qbsBuildOptions);
|
qbs::BuildOptions options(m_qbsBuildOptions);
|
||||||
options.changedFiles = m_changedFiles;
|
options.setChangedFiles(m_changedFiles);
|
||||||
|
|
||||||
m_job = pro->build(options);
|
m_job = pro->build(options);
|
||||||
|
|
||||||
@@ -180,17 +180,17 @@ void QbsBuildStep::setQbsConfiguration(const QVariantMap &config)
|
|||||||
|
|
||||||
bool QbsBuildStep::dryRun() const
|
bool QbsBuildStep::dryRun() const
|
||||||
{
|
{
|
||||||
return m_qbsBuildOptions.dryRun;
|
return m_qbsBuildOptions.dryRun();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QbsBuildStep::keepGoing() const
|
bool QbsBuildStep::keepGoing() const
|
||||||
{
|
{
|
||||||
return m_qbsBuildOptions.keepGoing;
|
return m_qbsBuildOptions.keepGoing();
|
||||||
}
|
}
|
||||||
|
|
||||||
int QbsBuildStep::maxJobs() const
|
int QbsBuildStep::maxJobs() const
|
||||||
{
|
{
|
||||||
return m_qbsBuildOptions.maxJobCount;
|
return m_qbsBuildOptions.maxJobCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QbsBuildStep::fromMap(const QVariantMap &map)
|
bool QbsBuildStep::fromMap(const QVariantMap &map)
|
||||||
@@ -199,9 +199,9 @@ bool QbsBuildStep::fromMap(const QVariantMap &map)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
setQbsConfiguration(map.value(QLatin1String(QBS_CONFIG)).toMap());
|
setQbsConfiguration(map.value(QLatin1String(QBS_CONFIG)).toMap());
|
||||||
m_qbsBuildOptions.dryRun = map.value(QLatin1String(QBS_DRY_RUN)).toBool();
|
m_qbsBuildOptions.setDryRun(map.value(QLatin1String(QBS_DRY_RUN)).toBool());
|
||||||
m_qbsBuildOptions.keepGoing = map.value(QLatin1String(QBS_KEEP_GOING)).toBool();
|
m_qbsBuildOptions.setKeepGoing(map.value(QLatin1String(QBS_KEEP_GOING)).toBool());
|
||||||
m_qbsBuildOptions.maxJobCount = map.value(QLatin1String(QBS_MAXJOBCOUNT)).toInt();
|
m_qbsBuildOptions.setMaxJobCount(map.value(QLatin1String(QBS_MAXJOBCOUNT)).toInt());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,9 +209,9 @@ QVariantMap QbsBuildStep::toMap() const
|
|||||||
{
|
{
|
||||||
QVariantMap map = ProjectExplorer::BuildStep::toMap();
|
QVariantMap map = ProjectExplorer::BuildStep::toMap();
|
||||||
map.insert(QLatin1String(QBS_CONFIG), m_qbsConfiguration);
|
map.insert(QLatin1String(QBS_CONFIG), m_qbsConfiguration);
|
||||||
map.insert(QLatin1String(QBS_DRY_RUN), m_qbsBuildOptions.dryRun);
|
map.insert(QLatin1String(QBS_DRY_RUN), m_qbsBuildOptions.dryRun());
|
||||||
map.insert(QLatin1String(QBS_KEEP_GOING), m_qbsBuildOptions.keepGoing);
|
map.insert(QLatin1String(QBS_KEEP_GOING), m_qbsBuildOptions.keepGoing());
|
||||||
map.insert(QLatin1String(QBS_MAXJOBCOUNT), m_qbsBuildOptions.maxJobCount);
|
map.insert(QLatin1String(QBS_MAXJOBCOUNT), m_qbsBuildOptions.maxJobCount());
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -220,7 +220,7 @@ void QbsBuildStep::buildingDone(bool success)
|
|||||||
// Report errors:
|
// Report errors:
|
||||||
foreach (const qbs::ErrorData &data, m_job->error().entries())
|
foreach (const qbs::ErrorData &data, m_job->error().entries())
|
||||||
createTaskAndOutput(ProjectExplorer::Task::Error, data.description(),
|
createTaskAndOutput(ProjectExplorer::Task::Error, data.description(),
|
||||||
data.codeLocation().fileName, data.codeLocation().line);
|
data.codeLocation().fileName(), data.codeLocation().line());
|
||||||
|
|
||||||
QTC_ASSERT(m_fi, return);
|
QTC_ASSERT(m_fi, return);
|
||||||
m_fi->reportResult(success);
|
m_fi->reportResult(success);
|
||||||
@@ -250,7 +250,7 @@ void QbsBuildStep::handleWarningReport(const qbs::Error &error)
|
|||||||
{
|
{
|
||||||
foreach (const qbs::ErrorData &data, error.entries()) {
|
foreach (const qbs::ErrorData &data, error.entries()) {
|
||||||
createTaskAndOutput(ProjectExplorer::Task::Warning, data.description(),
|
createTaskAndOutput(ProjectExplorer::Task::Warning, data.description(),
|
||||||
data.codeLocation().fileName, data.codeLocation().line);
|
data.codeLocation().fileName(), data.codeLocation().line());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -262,17 +262,17 @@ void QbsBuildStep::handleCommandDescriptionReport(const QString &highlight, cons
|
|||||||
|
|
||||||
void QbsBuildStep::handleProcessResultReport(const qbs::ProcessResult &result)
|
void QbsBuildStep::handleProcessResultReport(const qbs::ProcessResult &result)
|
||||||
{
|
{
|
||||||
bool hasOutput = !result.stdOut.isEmpty() || !result.stdErr.isEmpty();
|
bool hasOutput = !result.stdOut().isEmpty() || !result.stdErr().isEmpty();
|
||||||
|
|
||||||
if (result.success && !hasOutput && !m_showCompilerOutput)
|
if (result.success() && !hasOutput && !m_showCompilerOutput)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_parser->setWorkingDirectory(result.workingDirectory);
|
m_parser->setWorkingDirectory(result.workingDirectory());
|
||||||
foreach (const QString &line, result.stdErr) {
|
foreach (const QString &line, result.stdErr()) {
|
||||||
m_parser->stdError(line);
|
m_parser->stdError(line);
|
||||||
addOutput(line, ErrorOutput);
|
addOutput(line, ErrorOutput);
|
||||||
}
|
}
|
||||||
foreach (const QString &line, result.stdOut) {
|
foreach (const QString &line, result.stdOut()) {
|
||||||
m_parser->stdOutput(line);
|
m_parser->stdOutput(line);
|
||||||
addOutput(line, NormalOutput);
|
addOutput(line, NormalOutput);
|
||||||
}
|
}
|
||||||
@@ -307,25 +307,25 @@ QString QbsBuildStep::profile() const
|
|||||||
|
|
||||||
void QbsBuildStep::setDryRun(bool dr)
|
void QbsBuildStep::setDryRun(bool dr)
|
||||||
{
|
{
|
||||||
if (m_qbsBuildOptions.dryRun == dr)
|
if (m_qbsBuildOptions.dryRun() == dr)
|
||||||
return;
|
return;
|
||||||
m_qbsBuildOptions.dryRun = dr;
|
m_qbsBuildOptions.setDryRun(dr);
|
||||||
emit qbsBuildOptionsChanged();
|
emit qbsBuildOptionsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QbsBuildStep::setKeepGoing(bool kg)
|
void QbsBuildStep::setKeepGoing(bool kg)
|
||||||
{
|
{
|
||||||
if (m_qbsBuildOptions.keepGoing == kg)
|
if (m_qbsBuildOptions.keepGoing() == kg)
|
||||||
return;
|
return;
|
||||||
m_qbsBuildOptions.keepGoing = kg;
|
m_qbsBuildOptions.setKeepGoing(kg);
|
||||||
emit qbsBuildOptionsChanged();
|
emit qbsBuildOptionsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QbsBuildStep::setMaxJobs(int jobcount)
|
void QbsBuildStep::setMaxJobs(int jobcount)
|
||||||
{
|
{
|
||||||
if (m_qbsBuildOptions.maxJobCount == jobcount)
|
if (m_qbsBuildOptions.maxJobCount() == jobcount)
|
||||||
return;
|
return;
|
||||||
m_qbsBuildOptions.maxJobCount = jobcount;
|
m_qbsBuildOptions.setMaxJobCount(jobcount);
|
||||||
emit qbsBuildOptionsChanged();
|
emit qbsBuildOptionsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -381,7 +381,7 @@ void QbsBuildStepConfigWidget::updateState()
|
|||||||
command += QLatin1String("--dryRun ");
|
command += QLatin1String("--dryRun ");
|
||||||
if (m_step->keepGoing())
|
if (m_step->keepGoing())
|
||||||
command += QLatin1String("--keepGoing ");
|
command += QLatin1String("--keepGoing ");
|
||||||
if (m_step->maxJobs() != defaultOptions.maxJobCount)
|
if (m_step->maxJobs() != defaultOptions.maxJobCount())
|
||||||
command += QString::fromLatin1("--jobs %1 ").arg(m_step->maxJobs());
|
command += QString::fromLatin1("--jobs %1 ").arg(m_step->maxJobs());
|
||||||
command += QString::fromLatin1("build profile:%1 %2").arg(m_step->profile(), buildVariant);
|
command += QString::fromLatin1("build profile:%1 %2").arg(m_step->profile(), buildVariant);
|
||||||
|
|
||||||
|
|||||||
@@ -134,12 +134,12 @@ void QbsCleanStep::cancel()
|
|||||||
|
|
||||||
bool QbsCleanStep::dryRun() const
|
bool QbsCleanStep::dryRun() const
|
||||||
{
|
{
|
||||||
return m_qbsCleanOptions.dryRun;
|
return m_qbsCleanOptions.dryRun();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QbsCleanStep::keepGoing() const
|
bool QbsCleanStep::keepGoing() const
|
||||||
{
|
{
|
||||||
return m_qbsCleanOptions.keepGoing;
|
return m_qbsCleanOptions.keepGoing();
|
||||||
}
|
}
|
||||||
|
|
||||||
int QbsCleanStep::maxJobs() const
|
int QbsCleanStep::maxJobs() const
|
||||||
@@ -149,7 +149,7 @@ int QbsCleanStep::maxJobs() const
|
|||||||
|
|
||||||
bool QbsCleanStep::cleanAll() const
|
bool QbsCleanStep::cleanAll() const
|
||||||
{
|
{
|
||||||
return m_qbsCleanOptions.cleanType == qbs::CleanOptions::CleanupAll;
|
return m_qbsCleanOptions.cleanType() == qbs::CleanOptions::CleanupAll;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QbsCleanStep::fromMap(const QVariantMap &map)
|
bool QbsCleanStep::fromMap(const QVariantMap &map)
|
||||||
@@ -157,10 +157,10 @@ bool QbsCleanStep::fromMap(const QVariantMap &map)
|
|||||||
if (!ProjectExplorer::BuildStep::fromMap(map))
|
if (!ProjectExplorer::BuildStep::fromMap(map))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_qbsCleanOptions.dryRun = map.value(QLatin1String(QBS_DRY_RUN)).toBool();
|
m_qbsCleanOptions.setDryRun(map.value(QLatin1String(QBS_DRY_RUN)).toBool());
|
||||||
m_qbsCleanOptions.keepGoing = map.value(QLatin1String(QBS_KEEP_GOING)).toBool();
|
m_qbsCleanOptions.setKeepGoing(map.value(QLatin1String(QBS_KEEP_GOING)).toBool());
|
||||||
m_qbsCleanOptions.cleanType = map.value(QLatin1String(QBS_CLEAN_ALL)).toBool()
|
m_qbsCleanOptions.setCleanType(map.value(QLatin1String(QBS_CLEAN_ALL)).toBool()
|
||||||
? qbs::CleanOptions::CleanupAll : qbs::CleanOptions::CleanupTemporaries;
|
? qbs::CleanOptions::CleanupAll : qbs::CleanOptions::CleanupTemporaries);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -168,10 +168,10 @@ bool QbsCleanStep::fromMap(const QVariantMap &map)
|
|||||||
QVariantMap QbsCleanStep::toMap() const
|
QVariantMap QbsCleanStep::toMap() const
|
||||||
{
|
{
|
||||||
QVariantMap map = ProjectExplorer::BuildStep::toMap();
|
QVariantMap map = ProjectExplorer::BuildStep::toMap();
|
||||||
map.insert(QLatin1String(QBS_DRY_RUN), m_qbsCleanOptions.dryRun);
|
map.insert(QLatin1String(QBS_DRY_RUN), m_qbsCleanOptions.dryRun());
|
||||||
map.insert(QLatin1String(QBS_KEEP_GOING), m_qbsCleanOptions.keepGoing);
|
map.insert(QLatin1String(QBS_KEEP_GOING), m_qbsCleanOptions.keepGoing());
|
||||||
map.insert(QLatin1String(QBS_CLEAN_ALL),
|
map.insert(QLatin1String(QBS_CLEAN_ALL),
|
||||||
m_qbsCleanOptions.cleanType == qbs::CleanOptions::CleanupAll);
|
m_qbsCleanOptions.cleanType() == qbs::CleanOptions::CleanupAll);
|
||||||
|
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
@@ -181,7 +181,7 @@ void QbsCleanStep::cleaningDone(bool success)
|
|||||||
// Report errors:
|
// Report errors:
|
||||||
foreach (const qbs::ErrorData &data, m_job->error().entries()) {
|
foreach (const qbs::ErrorData &data, m_job->error().entries()) {
|
||||||
createTaskAndOutput(ProjectExplorer::Task::Error, data.description(),
|
createTaskAndOutput(ProjectExplorer::Task::Error, data.description(),
|
||||||
data.codeLocation().fileName, data.codeLocation().line);
|
data.codeLocation().fileName(), data.codeLocation().line());
|
||||||
}
|
}
|
||||||
|
|
||||||
QTC_ASSERT(m_fi, return);
|
QTC_ASSERT(m_fi, return);
|
||||||
@@ -217,17 +217,17 @@ void QbsCleanStep::createTaskAndOutput(ProjectExplorer::Task::TaskType type, con
|
|||||||
|
|
||||||
void QbsCleanStep::setDryRun(bool dr)
|
void QbsCleanStep::setDryRun(bool dr)
|
||||||
{
|
{
|
||||||
if (m_qbsCleanOptions.dryRun == dr)
|
if (m_qbsCleanOptions.dryRun() == dr)
|
||||||
return;
|
return;
|
||||||
m_qbsCleanOptions.dryRun = dr;
|
m_qbsCleanOptions.setDryRun(dr);
|
||||||
emit changed();
|
emit changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QbsCleanStep::setKeepGoing(bool kg)
|
void QbsCleanStep::setKeepGoing(bool kg)
|
||||||
{
|
{
|
||||||
if (m_qbsCleanOptions.keepGoing == kg)
|
if (m_qbsCleanOptions.keepGoing() == kg)
|
||||||
return;
|
return;
|
||||||
m_qbsCleanOptions.keepGoing = kg;
|
m_qbsCleanOptions.setKeepGoing(kg);
|
||||||
emit changed();
|
emit changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -241,9 +241,9 @@ void QbsCleanStep::setCleanAll(bool ca)
|
|||||||
{
|
{
|
||||||
qbs::CleanOptions::CleanType newType = ca
|
qbs::CleanOptions::CleanType newType = ca
|
||||||
? qbs::CleanOptions::CleanupAll : qbs::CleanOptions::CleanupTemporaries;
|
? qbs::CleanOptions::CleanupAll : qbs::CleanOptions::CleanupTemporaries;
|
||||||
if (m_qbsCleanOptions.cleanType == newType)
|
if (m_qbsCleanOptions.cleanType() == newType)
|
||||||
return;
|
return;
|
||||||
m_qbsCleanOptions.cleanType = newType;
|
m_qbsCleanOptions.setCleanType(newType);
|
||||||
emit changed();
|
emit changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -295,7 +295,7 @@ void QbsCleanStepConfigWidget::updateState()
|
|||||||
command += QLatin1String("--dryRun ");
|
command += QLatin1String("--dryRun ");
|
||||||
if (m_step->keepGoing())
|
if (m_step->keepGoing())
|
||||||
command += QLatin1String("--keepGoing ");
|
command += QLatin1String("--keepGoing ");
|
||||||
if (m_step->maxJobs() != defaultOptions.maxJobCount)
|
if (m_step->maxJobs() != defaultOptions.maxJobCount())
|
||||||
command += QString::fromLatin1("--jobs %1 ").arg(m_step->maxJobs());
|
command += QString::fromLatin1("--jobs %1 ").arg(m_step->maxJobs());
|
||||||
if (m_step->cleanAll())
|
if (m_step->cleanAll())
|
||||||
command += QLatin1String(" --all-artifacts");
|
command += QLatin1String(" --all-artifacts");
|
||||||
|
|||||||
@@ -237,20 +237,20 @@ void QbsGroupNode::setGroup(const qbs::GroupData *group)
|
|||||||
if (group == m_group)
|
if (group == m_group)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
setPath(group->location().fileName);
|
setPath(group->location().fileName());
|
||||||
setDisplayName(group->name());
|
setDisplayName(group->name());
|
||||||
|
|
||||||
// Set Product file node used to jump to the product
|
// Set Product file node used to jump to the product
|
||||||
QbsFileNode *indexFile = 0;
|
QbsFileNode *indexFile = 0;
|
||||||
if (!m_group) {
|
if (!m_group) {
|
||||||
indexFile = new QbsFileNode(group->location().fileName,
|
indexFile = new QbsFileNode(group->location().fileName(),
|
||||||
ProjectExplorer::ProjectFileType, false,
|
ProjectExplorer::ProjectFileType, false,
|
||||||
group->location().line);
|
group->location().line());
|
||||||
addFileNodes(QList<ProjectExplorer::FileNode *>() << indexFile, this);
|
addFileNodes(QList<ProjectExplorer::FileNode *>() << indexFile, this);
|
||||||
} else {
|
} else {
|
||||||
indexFile = static_cast<QbsFileNode *>(fileNodes().first());
|
indexFile = static_cast<QbsFileNode *>(fileNodes().first());
|
||||||
indexFile->setPath(group->location().fileName);
|
indexFile->setPath(group->location().fileName());
|
||||||
indexFile->setLine(group->location().line);
|
indexFile->setLine(group->location().line());
|
||||||
indexFile->emitNodeUpdated();
|
indexFile->emitNodeUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -328,7 +328,7 @@ void QbsGroupNode::setupFolders(ProjectExplorer::FolderNode *root, FileTreeNode
|
|||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
QbsProductNode::QbsProductNode(const qbs::ProductData *prd) :
|
QbsProductNode::QbsProductNode(const qbs::ProductData *prd) :
|
||||||
QbsBaseProjectNode(prd->location().fileName),
|
QbsBaseProjectNode(prd->location().fileName()),
|
||||||
m_product(0)
|
m_product(0)
|
||||||
{
|
{
|
||||||
setProduct(prd);
|
setProduct(prd);
|
||||||
@@ -345,20 +345,20 @@ void QbsProductNode::setProduct(const qbs::ProductData *prd)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
setDisplayName(prd->name());
|
setDisplayName(prd->name());
|
||||||
setPath(prd->location().fileName);
|
setPath(prd->location().fileName());
|
||||||
|
|
||||||
// Set Product file node used to jump to the product
|
// Set Product file node used to jump to the product
|
||||||
QList<ProjectExplorer::FileNode *> files = fileNodes();
|
QList<ProjectExplorer::FileNode *> files = fileNodes();
|
||||||
if (files.isEmpty()) {
|
if (files.isEmpty()) {
|
||||||
addFileNodes(QList<ProjectExplorer::FileNode *>()
|
addFileNodes(QList<ProjectExplorer::FileNode *>()
|
||||||
<< new QbsFileNode(prd->location().fileName,
|
<< new QbsFileNode(prd->location().fileName(),
|
||||||
ProjectExplorer::ProjectFileType, false,
|
ProjectExplorer::ProjectFileType, false,
|
||||||
prd->location().line),
|
prd->location().line()),
|
||||||
this);
|
this);
|
||||||
} else {
|
} else {
|
||||||
QbsFileNode *qbsFile = static_cast<QbsFileNode *>(files.at(0));
|
QbsFileNode *qbsFile = static_cast<QbsFileNode *>(files.at(0));
|
||||||
qbsFile->setPath(prd->location().fileName);
|
qbsFile->setPath(prd->location().fileName());
|
||||||
qbsFile->setLine(prd->location().line);
|
qbsFile->setLine(prd->location().line());
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<ProjectExplorer::ProjectNode *> toAdd;
|
QList<ProjectExplorer::ProjectNode *> toAdd;
|
||||||
|
|||||||
@@ -312,8 +312,8 @@ void QbsProject::generateErrors(const qbs::Error &e)
|
|||||||
foreach (const qbs::ErrorData &data, e.entries())
|
foreach (const qbs::ErrorData &data, e.entries())
|
||||||
taskHub()->addTask(ProjectExplorer::Task(ProjectExplorer::Task::Error,
|
taskHub()->addTask(ProjectExplorer::Task(ProjectExplorer::Task::Error,
|
||||||
data.description(),
|
data.description(),
|
||||||
Utils::FileName::fromString(data.codeLocation().fileName),
|
Utils::FileName::fromString(data.codeLocation().fileName()),
|
||||||
data.codeLocation().line,
|
data.codeLocation().line(),
|
||||||
ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
|
ProjectExplorer::Constants::TASK_CATEGORY_BUILDSYSTEM));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -326,14 +326,14 @@ void QbsProject::parse(const QVariantMap &config, const QString &dir)
|
|||||||
|
|
||||||
QTC_ASSERT(!m_qbsSetupProjectJob, return);
|
QTC_ASSERT(!m_qbsSetupProjectJob, return);
|
||||||
qbs::SetupProjectParameters params;
|
qbs::SetupProjectParameters params;
|
||||||
params.buildConfiguration = m_qbsBuildConfig;
|
params.setBuildConfiguration(m_qbsBuildConfig);
|
||||||
params.buildRoot = m_qbsBuildRoot;
|
params.setBuildRoot(m_qbsBuildRoot);
|
||||||
params.projectFilePath = m_fileName;
|
params.setProjectFilePath(m_fileName);
|
||||||
params.ignoreDifferentProjectFilePath = false;
|
params.setIgnoreDifferentProjectFilePath(false);
|
||||||
qbs::Preferences *prefs = QbsManager::preferences();
|
qbs::Preferences *prefs = QbsManager::preferences();
|
||||||
const QString buildDir = qbsBuildDir();
|
const QString buildDir = qbsBuildDir();
|
||||||
params.searchPaths = prefs->searchPaths(buildDir);
|
params.setSearchPaths(prefs->searchPaths(buildDir));
|
||||||
params.pluginPaths = prefs->pluginPaths(buildDir);
|
params.setPluginPaths(prefs->pluginPaths(buildDir));
|
||||||
|
|
||||||
m_qbsSetupProjectJob
|
m_qbsSetupProjectJob
|
||||||
= qbs::Project::setupProject(params, m_manager->settings(), m_manager->logSink(), 0);
|
= qbs::Project::setupProject(params, m_manager->settings(), m_manager->logSink(), 0);
|
||||||
@@ -373,9 +373,9 @@ void QbsProject::updateDocuments(const qbs::ProjectData *prj)
|
|||||||
newFiles.insert(m_fileName); // make sure we always have the project file...
|
newFiles.insert(m_fileName); // make sure we always have the project file...
|
||||||
|
|
||||||
if (prj) {
|
if (prj) {
|
||||||
newFiles.insert(prj->location().fileName);
|
newFiles.insert(prj->location().fileName());
|
||||||
foreach (const qbs::ProductData &prd, prj->products())
|
foreach (const qbs::ProductData &prd, prj->products())
|
||||||
newFiles.insert(prd.location().fileName);
|
newFiles.insert(prd.location().fileName());
|
||||||
}
|
}
|
||||||
QSet<QString> oldFiles;
|
QSet<QString> oldFiles;
|
||||||
foreach (Core::IDocument *doc, m_qbsDocuments)
|
foreach (Core::IDocument *doc, m_qbsDocuments)
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ QbsStep::QbsStep(ProjectExplorer::BuildStepList *bsl, Core::Id id) :
|
|||||||
ProjectExplorer::BuildStep(bsl, id),
|
ProjectExplorer::BuildStep(bsl, id),
|
||||||
m_job(0)
|
m_job(0)
|
||||||
{
|
{
|
||||||
m_qbsBuildOptions.maxJobCount = QbsManager::preferences()->jobs();
|
m_qbsBuildOptions.setMaxJobCount(QbsManager::preferences()->jobs());
|
||||||
}
|
}
|
||||||
|
|
||||||
QbsStep::QbsStep(ProjectExplorer::BuildStepList *bsl, const QbsStep *other) :
|
QbsStep::QbsStep(ProjectExplorer::BuildStepList *bsl, const QbsStep *other) :
|
||||||
@@ -137,17 +137,17 @@ void QbsStep::cancel()
|
|||||||
|
|
||||||
bool QbsStep::dryRun() const
|
bool QbsStep::dryRun() const
|
||||||
{
|
{
|
||||||
return m_qbsBuildOptions.dryRun;
|
return m_qbsBuildOptions.dryRun();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QbsStep::keepGoing() const
|
bool QbsStep::keepGoing() const
|
||||||
{
|
{
|
||||||
return m_qbsBuildOptions.keepGoing;
|
return m_qbsBuildOptions.keepGoing();
|
||||||
}
|
}
|
||||||
|
|
||||||
int QbsStep::maxJobs() const
|
int QbsStep::maxJobs() const
|
||||||
{
|
{
|
||||||
return m_qbsBuildOptions.maxJobCount;
|
return m_qbsBuildOptions.maxJobCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QbsStep::fromMap(const QVariantMap &map)
|
bool QbsStep::fromMap(const QVariantMap &map)
|
||||||
@@ -155,12 +155,12 @@ bool QbsStep::fromMap(const QVariantMap &map)
|
|||||||
if (!ProjectExplorer::BuildStep::fromMap(map))
|
if (!ProjectExplorer::BuildStep::fromMap(map))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_qbsBuildOptions.dryRun = map.value(QLatin1String(QBS_DRY_RUN)).toBool();
|
m_qbsBuildOptions.setDryRun(map.value(QLatin1String(QBS_DRY_RUN)).toBool());
|
||||||
m_qbsBuildOptions.keepGoing = map.value(QLatin1String(QBS_KEEP_GOING)).toBool();
|
m_qbsBuildOptions.setKeepGoing(map.value(QLatin1String(QBS_KEEP_GOING)).toBool());
|
||||||
m_qbsBuildOptions.maxJobCount = map.value(QLatin1String(QBS_MAXJOBCOUNT)).toInt();
|
m_qbsBuildOptions.setMaxJobCount(map.value(QLatin1String(QBS_MAXJOBCOUNT)).toInt());
|
||||||
|
|
||||||
if (m_qbsBuildOptions.maxJobCount <= 0)
|
if (m_qbsBuildOptions.maxJobCount() <= 0)
|
||||||
m_qbsBuildOptions.maxJobCount = QbsManager::preferences()->jobs();
|
m_qbsBuildOptions.setMaxJobCount(QbsManager::preferences()->jobs());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -168,9 +168,9 @@ bool QbsStep::fromMap(const QVariantMap &map)
|
|||||||
QVariantMap QbsStep::toMap() const
|
QVariantMap QbsStep::toMap() const
|
||||||
{
|
{
|
||||||
QVariantMap map = ProjectExplorer::BuildStep::toMap();
|
QVariantMap map = ProjectExplorer::BuildStep::toMap();
|
||||||
map.insert(QLatin1String(QBS_DRY_RUN), m_qbsBuildOptions.dryRun);
|
map.insert(QLatin1String(QBS_DRY_RUN), m_qbsBuildOptions.dryRun());
|
||||||
map.insert(QLatin1String(QBS_KEEP_GOING), m_qbsBuildOptions.keepGoing);
|
map.insert(QLatin1String(QBS_KEEP_GOING), m_qbsBuildOptions.keepGoing());
|
||||||
map.insert(QLatin1String(QBS_MAXJOBCOUNT), m_qbsBuildOptions.maxJobCount);
|
map.insert(QLatin1String(QBS_MAXJOBCOUNT), m_qbsBuildOptions.maxJobCount());
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ void QbsStep::jobDone(bool success)
|
|||||||
if (m_job) {
|
if (m_job) {
|
||||||
foreach (const qbs::ErrorData &data, m_job->error().entries())
|
foreach (const qbs::ErrorData &data, m_job->error().entries())
|
||||||
createTaskAndOutput(ProjectExplorer::Task::Error, data.description(),
|
createTaskAndOutput(ProjectExplorer::Task::Error, data.description(),
|
||||||
data.codeLocation().fileName, data.codeLocation().line);
|
data.codeLocation().fileName(), data.codeLocation().line());
|
||||||
m_job->deleteLater();
|
m_job->deleteLater();
|
||||||
m_job = 0;
|
m_job = 0;
|
||||||
}
|
}
|
||||||
@@ -218,25 +218,25 @@ void QbsStep::createTaskAndOutput(ProjectExplorer::Task::TaskType type, const QS
|
|||||||
|
|
||||||
void QbsStep::setDryRun(bool dr)
|
void QbsStep::setDryRun(bool dr)
|
||||||
{
|
{
|
||||||
if (m_qbsBuildOptions.dryRun == dr)
|
if (m_qbsBuildOptions.dryRun() == dr)
|
||||||
return;
|
return;
|
||||||
m_qbsBuildOptions.dryRun = dr;
|
m_qbsBuildOptions.setDryRun(dr);
|
||||||
emit qbsBuildOptionsChanged();
|
emit qbsBuildOptionsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QbsStep::setKeepGoing(bool kg)
|
void QbsStep::setKeepGoing(bool kg)
|
||||||
{
|
{
|
||||||
if (m_qbsBuildOptions.keepGoing == kg)
|
if (m_qbsBuildOptions.keepGoing() == kg)
|
||||||
return;
|
return;
|
||||||
m_qbsBuildOptions.keepGoing = kg;
|
m_qbsBuildOptions.setKeepGoing(kg);
|
||||||
emit qbsBuildOptionsChanged();
|
emit qbsBuildOptionsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QbsStep::setMaxJobs(int jobcount)
|
void QbsStep::setMaxJobs(int jobcount)
|
||||||
{
|
{
|
||||||
if (m_qbsBuildOptions.maxJobCount == jobcount)
|
if (m_qbsBuildOptions.maxJobCount() == jobcount)
|
||||||
return;
|
return;
|
||||||
m_qbsBuildOptions.maxJobCount = jobcount;
|
m_qbsBuildOptions.setMaxJobCount(jobcount);
|
||||||
emit qbsBuildOptionsChanged();
|
emit qbsBuildOptionsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Submodule src/shared/qbs updated: 29bb66d2fd...32ae53690c
Reference in New Issue
Block a user