Use consistent/new coding style in `readDirEvent` as well
This commit is contained in:
parent
92b305aa89
commit
25c8d3f69a
|
@ -1909,13 +1909,13 @@ void SyncthingConnection::readDownloadProgressEvent(const QJsonObject &eventData
|
||||||
void SyncthingConnection::readDirEvent(SyncthingEventId eventId, DateTime eventTime, const QString &eventType, const QJsonObject &eventData)
|
void SyncthingConnection::readDirEvent(SyncthingEventId eventId, DateTime eventTime, const QString &eventType, const QJsonObject &eventData)
|
||||||
{
|
{
|
||||||
// read dir ID
|
// read dir ID
|
||||||
const auto dirId([&eventData] {
|
const auto dirId = [&eventData] {
|
||||||
const auto folder(eventData.value(QLatin1String("folder")).toString());
|
const auto folder = eventData.value(QLatin1String("folder")).toString();
|
||||||
if (!folder.isEmpty()) {
|
if (!folder.isEmpty()) {
|
||||||
return folder;
|
return folder;
|
||||||
}
|
}
|
||||||
return eventData.value(QLatin1String("id")).toString();
|
return eventData.value(QLatin1String("id")).toString();
|
||||||
}());
|
}();
|
||||||
if (dirId.isEmpty()) {
|
if (dirId.isEmpty()) {
|
||||||
// handle events which don't necessarily require a corresponding dir info
|
// handle events which don't necessarily require a corresponding dir info
|
||||||
if (eventType == QLatin1String("FolderCompletion")) {
|
if (eventType == QLatin1String("FolderCompletion")) {
|
||||||
|
|
Loading…
Reference in New Issue