aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/buildgraph
diff options
context:
space:
mode:
authorDenis Shienkov <denis.shienkov@gmail.com>2019-02-19 22:57:10 +0300
committerDenis Shienkov <denis.shienkov@gmail.com>2019-02-23 07:37:58 +0000
commit6615e52e4308962a7d10d606eead188fbfe198f3 (patch)
tree5c27ed9a2c962c668bcfd0e99518f79c4c85e847 /src/lib/corelib/buildgraph
parent1d479510cae797f875b53e6a3d11af94de675ab8 (diff)
Use 'const auto' keywords more at objects allocations
Change-Id: I592d433e7c473ae9f27ca08e701516efe53650ba Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/buildgraph')
-rw-r--r--src/lib/corelib/buildgraph/buildgraph.cpp2
-rw-r--r--src/lib/corelib/buildgraph/executor.cpp2
-rw-r--r--src/lib/corelib/buildgraph/inputartifactscanner.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/corelib/buildgraph/buildgraph.cpp b/src/lib/corelib/buildgraph/buildgraph.cpp
index e6d49f3d5..e28662434 100644
--- a/src/lib/corelib/buildgraph/buildgraph.cpp
+++ b/src/lib/corelib/buildgraph/buildgraph.cpp
@@ -620,7 +620,7 @@ Artifact *lookupArtifact(const ResolvedProductConstPtr &product, const Artifact
Artifact *createArtifact(const ResolvedProductPtr &product,
const SourceArtifactConstPtr &sourceArtifact)
{
- auto artifact = new Artifact;
+ const auto artifact = new Artifact;
artifact->artifactType = Artifact::SourceFile;
setArtifactData(artifact, sourceArtifact);
insertArtifact(product, artifact);
diff --git a/src/lib/corelib/buildgraph/executor.cpp b/src/lib/corelib/buildgraph/executor.cpp
index 0558980d6..b3f7e1f2a 100644
--- a/src/lib/corelib/buildgraph/executor.cpp
+++ b/src/lib/corelib/buildgraph/executor.cpp
@@ -767,7 +767,7 @@ void Executor::addExecutorJobs()
qCDebug(lcExec) << "preparing executor for" << m_buildOptions.maxJobCount()
<< "jobs in parallel";
for (int i = 1; i <= m_buildOptions.maxJobCount(); i++) {
- auto job = new ExecutorJob(m_logger, this);
+ const auto job = new ExecutorJob(m_logger, this);
job->setMainThreadScriptEngine(m_evalContext->engine());
job->setObjectName(QString::fromLatin1("J%1").arg(i));
job->setDryRun(m_buildOptions.dryRun());
diff --git a/src/lib/corelib/buildgraph/inputartifactscanner.cpp b/src/lib/corelib/buildgraph/inputartifactscanner.cpp
index 7e6ea4396..68f3b744b 100644
--- a/src/lib/corelib/buildgraph/inputartifactscanner.cpp
+++ b/src/lib/corelib/buildgraph/inputartifactscanner.cpp
@@ -200,7 +200,7 @@ Set<DependencyScanner *> InputArtifactScanner::scannersForArtifact(const Artifac
if (!cache.valid) {
cache.valid = true;
for (ScannerPlugin *scanner : ScannerPluginManager::scannersForFileTag(fileTag)) {
- auto pluginScanner = new PluginDependencyScanner(scanner);
+ const auto pluginScanner = new PluginDependencyScanner(scanner);
cache.scanners.push_back(DependencyScannerPtr(pluginScanner));
}
for (const ResolvedScannerConstPtr &scanner : product->scanners) {