Fix warnings about detatching Qt container via for loop
This commit is contained in:
parent
239f750028
commit
fbb7685f4b
|
@ -857,8 +857,9 @@ void SyncthingConnection::readErrors()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const QJsonValueRef errorVal : replyDoc.object().value(QLatin1String("errors")).toArray()) {
|
const auto errors = replyDoc.object().value(QLatin1String("errors")).toArray();
|
||||||
const QJsonObject errorObj(errorVal.toObject());
|
for (const QJsonValue &errorVal : errors) {
|
||||||
|
const QJsonObject errorObj = errorVal.toObject();
|
||||||
if (errorObj.isEmpty()) {
|
if (errorObj.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1959,7 +1960,8 @@ void SyncthingConnection::readFolderErrors(DateTime eventTime, const QJsonObject
|
||||||
dirInfo.itemErrors.clear();
|
dirInfo.itemErrors.clear();
|
||||||
|
|
||||||
// add errors
|
// add errors
|
||||||
for (const QJsonValueRef errorVal : eventData.value(QLatin1String("errors")).toArray()) {
|
const auto errors = eventData.value(QLatin1String("errors")).toArray();
|
||||||
|
for (const QJsonValue &errorVal : errors) {
|
||||||
const QJsonObject error(errorVal.toObject());
|
const QJsonObject error(errorVal.toObject());
|
||||||
if (error.isEmpty()) {
|
if (error.isEmpty()) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue