Use consistent/new coding style in `readDirEvent` as well

This commit is contained in:
Martchus 2023-09-01 23:34:26 +02:00
parent 92b305aa89
commit 25c8d3f69a
1 changed files with 3 additions and 3 deletions

View File

@ -1909,13 +1909,13 @@ void SyncthingConnection::readDownloadProgressEvent(const QJsonObject &eventData
void SyncthingConnection::readDirEvent(SyncthingEventId eventId, DateTime eventTime, const QString &eventType, const QJsonObject &eventData)
{
// read dir ID
const auto dirId([&eventData] {
const auto folder(eventData.value(QLatin1String("folder")).toString());
const auto dirId = [&eventData] {
const auto folder = eventData.value(QLatin1String("folder")).toString();
if (!folder.isEmpty()) {
return folder;
}
return eventData.value(QLatin1String("id")).toString();
}());
}();
if (dirId.isEmpty()) {
// handle events which don't necessarily require a corresponding dir info
if (eventType == QLatin1String("FolderCompletion")) {