summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2021-08-24 15:23:59 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-24 14:20:27 +0000
commit7c78274f64302cebe4482adbd1543cbcccab6bef (patch)
tree79968fc9ed4aa52a227dd1a43cc6f754456a67c7
parenta24f6c636659bed97e1ea78e65d4417ba7b6454f (diff)
Allow automatic move for local variables
Removed constness from some local variables to allow automatic move. Found by the codechecker. Task-number: QTBUG-95752 Change-Id: Ic022f823c8fcf028b81d97ba877fe0409305697f Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Brett Stottlemyer <bstottle@ford.com> (cherry picked from commit dda77d7f586bebfbe3d0ac42bbc1f8370b188c4a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/remoteobjects/qremoteobjectsettingsstore.cpp2
-rw-r--r--tools/repc/utils.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/remoteobjects/qremoteobjectsettingsstore.cpp b/src/remoteobjects/qremoteobjectsettingsstore.cpp
index 83e29de..2c4c66d 100644
--- a/src/remoteobjects/qremoteobjectsettingsstore.cpp
+++ b/src/remoteobjects/qremoteobjectsettingsstore.cpp
@@ -92,7 +92,7 @@ QVariantList QRemoteObjectSettingsStore::restoreProperties(const QString &repNam
{
Q_D(QRemoteObjectSettingsStore);
d->settings.beginGroup(repName + QLatin1Char('/') + QString::fromLatin1(repSig));
- const QVariantList values = d->settings.value(QStringLiteral("values")).toList();
+ QVariantList values = d->settings.value(QStringLiteral("values")).toList();
d->settings.endGroup();
return values;
}
diff --git a/tools/repc/utils.cpp b/tools/repc/utils.cpp
index b6260a3..1fbad74 100644
--- a/tools/repc/utils.cpp
+++ b/tools/repc/utils.cpp
@@ -53,7 +53,7 @@ namespace JSON
qCritical() << "Invalid metadata json file. Unexpected Undefined value when looking for key:" << key;
if (!json.isObject())
qCritical() << "Invalid metadata json file. Input (" << json << ") is not an object when looking for key:" << key;
- const QJsonValue value = json.toObject()[_(key)];
+ QJsonValue value = json.toObject()[_(key)];
switch (type) {
case JSON::Any: break;
case JSON::Array: