Const autofy variables in ProcessDirectoryJob::processFile

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2023-07-10 17:14:40 +08:00
parent a93279bcbf
commit 74c4ec88a2
No known key found for this signature in database
GPG key ID: C839200C384636B0

View file

@ -457,8 +457,8 @@ void ProcessDirectoryJob::processFile(PathTuple path,
const LocalInfo &localEntry, const RemoteInfo &serverEntry, const LocalInfo &localEntry, const RemoteInfo &serverEntry,
const SyncJournalFileRecord &dbEntry) const SyncJournalFileRecord &dbEntry)
{ {
const char *hasServer = serverEntry.isValid() ? "true" : _queryServer == ParentNotChanged ? "db" : "false"; const auto hasServer = serverEntry.isValid() ? "true" : _queryServer == ParentNotChanged ? "db" : "false";
const char *hasLocal = localEntry.isValid() ? "true" : _queryLocal == ParentNotChanged ? "db" : "false"; const auto hasLocal = localEntry.isValid() ? "true" : _queryLocal == ParentNotChanged ? "db" : "false";
const auto serverFileIsLocked = (serverEntry.isValid() ? (serverEntry.locked == SyncFileItem::LockStatus::LockedItem ? "locked" : "not locked") : ""); const auto serverFileIsLocked = (serverEntry.isValid() ? (serverEntry.locked == SyncFileItem::LockStatus::LockedItem ? "locked" : "not locked") : "");
const auto localFileIsLocked = dbEntry._lockstate._locked ? "locked" : "not locked"; const auto localFileIsLocked = dbEntry._lockstate._locked ? "locked" : "not locked";
qCInfo(lcDisco).nospace() << "Processing " << path._original qCInfo(lcDisco).nospace() << "Processing " << path._original
@ -488,7 +488,7 @@ void ProcessDirectoryJob::processFile(PathTuple path,
return; // Ignore this. return; // Ignore this.
} }
auto item = SyncFileItem::fromSyncJournalFileRecord(dbEntry); const auto item = SyncFileItem::fromSyncJournalFileRecord(dbEntry);
item->_file = path._target; item->_file = path._target;
item->_originalFile = path._original; item->_originalFile = path._original;
item->_previousSize = dbEntry._fileSize; item->_previousSize = dbEntry._fileSize;