aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2018-07-03 11:31:43 +0300
committerOrgad Shaneh <orgads@gmail.com>2018-07-03 14:36:19 +0000
commit6b0dfb2c3a185bdd12437e0bedcca7dd6ceba9b2 (patch)
treeec9519c2e96a70518e224600a39040f5e84f4723
parentf0c28b38f40057d334e1cbf77916462267147369 (diff)
Remove quotes and escaping from debug logs
Before: qbs.exec: adding leaf "RULE [c_pch][c_pch_src] [test] located at F:\\Projects\\qt-creator\\build-qtc\\share\\qtcreator\\qbs\\share\\qbs\\modules\\cpp\\GenericGCC.qbs:616:18" After: qbs.exec: adding leaf RULE [c_pch][c_pch_src] [test] located at F:\Projects\qt-creator\build-qtc\share\qtcreator\qbs\share\qbs\modules\cpp\GenericGCC.qbs:616:18 Change-Id: Ia1bcc197b9ce71934febbde7515b5d71d3cde0db Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--src/lib/corelib/buildgraph/buildgraph.cpp8
-rw-r--r--src/lib/corelib/buildgraph/executor.cpp37
-rw-r--r--src/lib/corelib/buildgraph/projectbuilddata.cpp4
-rw-r--r--src/lib/corelib/buildgraph/qtmocscanner.cpp2
-rw-r--r--src/lib/corelib/buildgraph/rulesapplicator.cpp4
5 files changed, 28 insertions, 27 deletions
diff --git a/src/lib/corelib/buildgraph/buildgraph.cpp b/src/lib/corelib/buildgraph/buildgraph.cpp
index 3862e9da4..f12c27ab6 100644
--- a/src/lib/corelib/buildgraph/buildgraph.cpp
+++ b/src/lib/corelib/buildgraph/buildgraph.cpp
@@ -446,7 +446,7 @@ bool findPath(BuildGraphNode *u, BuildGraphNode *v, QList<BuildGraphNode *> &pat
void connect(BuildGraphNode *p, BuildGraphNode *c)
{
QBS_CHECK(p != c);
- qCDebug(lcBuildGraph) << "connect" << p->toString() << "->" << c->toString();
+ qCDebug(lcBuildGraph).noquote() << "connect" << p->toString() << "->" << c->toString();
if (c->type() == BuildGraphNode::ArtifactNodeType) {
Artifact * const ac = static_cast<Artifact *>(c);
for (const Artifact *child : filterByType<Artifact>(p->children)) {
@@ -516,7 +516,7 @@ bool safeConnect(Artifact *u, Artifact *v)
void disconnect(BuildGraphNode *u, BuildGraphNode *v)
{
- qCDebug(lcBuildGraph) << "disconnect:" << u->toString() << v->toString();
+ qCDebug(lcBuildGraph).noquote() << "disconnect:" << u->toString() << v->toString();
u->children.remove(v);
v->parents.remove(u);
u->onChildDisconnected(v);
@@ -637,12 +637,12 @@ static void doSanityChecksForProduct(const ResolvedProductConstPtr &product,
if (!product->buildData)
return;
for (BuildGraphNode * const node : qAsConst(buildData->rootNodes())) {
- qCDebug(lcBuildGraph) << "Checking root node" << node->toString();
+ qCDebug(lcBuildGraph).noquote() << "Checking root node" << node->toString();
QBS_CHECK(buildData->allNodes().contains(node));
}
Set<QString> filePaths;
for (BuildGraphNode * const node : qAsConst(buildData->allNodes())) {
- qCDebug(lcBuildGraph) << "Sanity checking node" << node->toString();
+ qCDebug(lcBuildGraph).noquote() << "Sanity checking node" << node->toString();
QBS_CHECK(node->product == product);
for (const BuildGraphNode * const parent : qAsConst(node->parents))
QBS_CHECK(parent->children.contains(node));
diff --git a/src/lib/corelib/buildgraph/executor.cpp b/src/lib/corelib/buildgraph/executor.cpp
index 980e2182a..022929794 100644
--- a/src/lib/corelib/buildgraph/executor.cpp
+++ b/src/lib/corelib/buildgraph/executor.cpp
@@ -338,7 +338,7 @@ void Executor::updateLeaves(BuildGraphNode *node, NodeSet &seenNodes)
}
if (isLeaf) {
- qCDebug(lcExec) << "adding leaf" << node->toString();
+ qCDebug(lcExec).noquote() << "adding leaf" << node->toString();
m_leaves.push(node);
}
}
@@ -361,11 +361,11 @@ bool Executor::scheduleJobs()
nodeToBuild->accept(this);
break;
case BuildGraphNode::Building:
- qCDebug(lcExec) << nodeToBuild->toString();
+ qCDebug(lcExec).noquote() << nodeToBuild->toString();
qCDebug(lcExec) << "node is currently being built. Skipping.";
break;
case BuildGraphNode::Built:
- qCDebug(lcExec) << nodeToBuild->toString();
+ qCDebug(lcExec).noquote() << nodeToBuild->toString();
qCDebug(lcExec) << "node already built. Skipping.";
break;
}
@@ -520,9 +520,9 @@ void Executor::executeRuleNode(RuleNode *ruleNode)
ruleNode->apply(m_logger, changedInputArtifacts, m_productsByName, m_projectsByName, &result);
if (result.upToDate) {
- qCDebug(lcExec) << ruleNode->toString() << "is up to date. Skipping.";
+ qCDebug(lcExec).noquote() << ruleNode->toString() << "is up to date. Skipping.";
} else {
- qCDebug(lcExec) << ruleNode->toString();
+ qCDebug(lcExec).noquote() << ruleNode->toString();
const WeakPointer<ResolvedProduct> &product = ruleNode->product;
Set<RuleNode *> parentRules;
if (!result.createdNodes.empty()) {
@@ -532,7 +532,7 @@ void Executor::executeRuleNode(RuleNode *ruleNode)
}
}
for (BuildGraphNode *node : qAsConst(result.createdNodes)) {
- qCDebug(lcExec) << "rule created" << node->toString();
+ qCDebug(lcExec).noquote() << "rule created" << node->toString();
Internal::connect(node, ruleNode);
if (node->type() != BuildGraphNode::ArtifactNodeType)
continue;
@@ -629,18 +629,18 @@ void Executor::finishNode(BuildGraphNode *leaf)
leaf->buildState = BuildGraphNode::Built;
for (BuildGraphNode * const parent : qAsConst(leaf->parents)) {
if (parent->buildState != BuildGraphNode::Buildable) {
- qCDebug(lcExec) << "parent" << parent->toString()
- << "build state:" << toString(parent->buildState);
+ qCDebug(lcExec).noquote() << "parent" << parent->toString()
+ << "build state:" << toString(parent->buildState);
continue;
}
if (allChildrenBuilt(parent)) {
m_leaves.push(parent);
- qCDebug(lcExec) << "finishNode adds leaf"
- << parent->toString() << toString(parent->buildState);
+ qCDebug(lcExec).noquote() << "finishNode adds leaf"
+ << parent->toString() << toString(parent->buildState);
} else {
- qCDebug(lcExec) << "parent" << parent->toString()
- << "build state:" << toString(parent->buildState);
+ qCDebug(lcExec).noquote() << "parent" << parent->toString()
+ << "build state:" << toString(parent->buildState);
}
}
}
@@ -889,11 +889,11 @@ bool Executor::checkForUnbuiltDependencies(Artifact *artifact)
switch (dependency->buildState) {
case BuildGraphNode::Untouched:
case BuildGraphNode::Buildable:
- qCDebug(lcExec) << "unbuilt dependency:" << dependency->toString();
+ qCDebug(lcExec).noquote() << "unbuilt dependency:" << dependency->toString();
unbuiltDependencies += dependency;
break;
case BuildGraphNode::Building: {
- qCDebug(lcExec) << "dependency in state 'Building':" << dependency->toString();
+ qCDebug(lcExec).noquote() << "dependency in state 'Building':" << dependency->toString();
buildingDependenciesFound = true;
break;
}
@@ -1082,10 +1082,11 @@ bool Executor::checkNodeProduct(BuildGraphNode *node)
return true;
// TODO: Turn this into a warning once we have a reliable C++ scanner.
- qCDebug(lcExec) << "Ignoring node " << node->toString() << ", which belongs to a "
- "product that is not part of the list of products to build. "
- "Possible reasons are an erroneous project design or a false "
- "positive from a dependency scanner.";
+ qCDebug(lcExec).noquote()
+ << "Ignoring node " << node->toString() << ", which belongs to a "
+ "product that is not part of the list of products to build. "
+ "Possible reasons are an erroneous project design or a false "
+ "positive from a dependency scanner.";
finishNode(node);
return false;
}
diff --git a/src/lib/corelib/buildgraph/projectbuilddata.cpp b/src/lib/corelib/buildgraph/projectbuilddata.cpp
index 87e79c7b9..88de0f392 100644
--- a/src/lib/corelib/buildgraph/projectbuilddata.cpp
+++ b/src/lib/corelib/buildgraph/projectbuilddata.cpp
@@ -363,8 +363,8 @@ private:
node->product = m_product;
node->setRule(rule);
m_product->buildData->addNode(node);
- qCDebug(lcBuildGraph) << "create" << node->toString()
- << "for product" << m_product->uniqueName();
+ qCDebug(lcBuildGraph).noquote() << "create" << node->toString()
+ << "for product" << m_product->uniqueName();
}
if (parentRule) {
RuleNode *parent = m_nodePerRule.value(parentRule);
diff --git a/src/lib/corelib/buildgraph/qtmocscanner.cpp b/src/lib/corelib/buildgraph/qtmocscanner.cpp
index ab03ac3de..a2e9786aa 100644
--- a/src/lib/corelib/buildgraph/qtmocscanner.cpp
+++ b/src/lib/corelib/buildgraph/qtmocscanner.cpp
@@ -221,7 +221,7 @@ QScriptValue QtMocScanner::apply(QScriptEngine *engine, const Artifact *artifact
findIncludedMocCppFiles();
- qCDebug(lcMocScan) << "scanning" << artifact->toString();
+ qCDebug(lcMocScan).noquote() << "scanning" << artifact->toString();
bool hasQObjectMacro = false;
bool mustCompile = false;
diff --git a/src/lib/corelib/buildgraph/rulesapplicator.cpp b/src/lib/corelib/buildgraph/rulesapplicator.cpp
index da0e78592..2bf20496a 100644
--- a/src/lib/corelib/buildgraph/rulesapplicator.cpp
+++ b/src/lib/corelib/buildgraph/rulesapplicator.cpp
@@ -132,8 +132,8 @@ void RulesApplicator::handleRemovedRuleOutputs(const ArtifactSet &inputArtifacts
ArtifactSet artifactsToRemove;
const TopLevelProject *project = nullptr;
for (Artifact * const removedArtifact : outputArtifactsToRemove) {
- qCDebug(lcBuildGraph) << "dynamic rule removed output artifact"
- << removedArtifact->toString();
+ qCDebug(lcBuildGraph).noquote() << "dynamic rule removed output artifact"
+ << removedArtifact->toString();
if (!project)
project = removedArtifact->product->topLevelProject();
project->buildData->removeArtifactAndExclusiveDependents(removedArtifact, logger, true,