[DeckSync] Use designated initializer for ServerFile per review

This commit is contained in:
BruebachL 2026-10-13 11:45:54 +02:00 • committed by Lukas Brübach
parent 2db9760170
commit c2a1508a2e

View file

@ -152,11 +152,12 @@ void DeckSyncManager::collectServerFiles(const ServerInfo_DeckStorage_Folder &fo
} else if (item.has_file()) { } else if (item.has_file()) {
const QString path = prefix.isEmpty() ? name : prefix + "/" + name; const QString path = prefix.isEmpty() ? name : prefix + "/" + name;
const ServerInfo_DeckStorage_File &file = item.file(); const ServerInfo_DeckStorage_File &file = item.file();
ServerFile entry; ServerFile entry{
entry.id = item.id(); .id = item.id(),
entry.guid = QString::fromStdString(file.guid()); .guid = QString::fromStdString(file.guid()),
entry.hash = QString::fromStdString(file.hash()); .hash = QString::fromStdString(file.hash()),
entry.lastModifiedSecs = file.has_last_modified() ? static_cast<qint64>(file.last_modified()) : 0; .lastModifiedSecs = file.has_last_modified() ? static_cast<qint64>(file.last_modified()) : 0,
};
files.insert(path, entry); files.insert(path, entry);
} }
} }