diff options
author | Jocelyn Turcotte <jturcotte@woboq.com> | 2017-09-13 20:02:38 +0300 |
---|---|---|
committer | Olivier Goffart <olivier@woboq.com> | 2017-09-26 12:03:23 +0300 |
commit | 6f46764daa59460a4cbdc7327255a6dc4d631590 (patch) | |
tree | 48f83f647f7517d77f352ab5ce707a41c3d8d4d4 /test/testsyncengine.cpp | |
parent | e1d482ea7cded147dbac5c799a81d13687d9db99 (diff) |
SyncJournalDB: Allow callers of getFileRecord if the query failed
The current implementation would return the same value whether the query failed
or if no row would be found. This is something that is currently checked by csync
and needs to be provided if we want to use SyncJournalDB there.
Adjusted all call sites to also check the return value even though they
could still just rely on rec.isValid(), but makes it more explicit as to what
happens for database errors in those cases, if we ever want to gracefully handle
them.
Diffstat (limited to 'test/testsyncengine.cpp')
-rw-r--r-- | test/testsyncengine.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/testsyncengine.cpp b/test/testsyncengine.cpp index 9de20a015..032937b62 100644 --- a/test/testsyncengine.cpp +++ b/test/testsyncengine.cpp @@ -109,7 +109,8 @@ private slots: fakeFolder.syncOnce(); auto getDbChecksum = [&](QString path) { - auto record = fakeFolder.syncJournal().getFileRecord(path); + SyncJournalFileRecord record; + fakeFolder.syncJournal().getFileRecord(path, &record); return record._checksumHeader; }; |