SyncJournalDB: Allow callers of getFileRecord if the query failed
authorJocelyn Turcotte <jturcotte@woboq.com>
Wed, 13 Sep 2017 17:02:38 +0000 (19:02 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Thu, 5 Oct 2017 20:01:37 +0000 (22:01 +0200)
commitc6610f6fbf9b41ba101726783730f536b040a5c7
tree3834b0f1fc419b69c4c76775c143fb2fd0aed619
parentd76ecf015c52029c554726944bdebd7a41971b30
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.
13 files changed:
src/common/syncjournaldb.cpp
src/common/syncjournaldb.h
src/gui/folder.cpp
src/gui/owncloudgui.cpp
src/gui/socketapi.cpp
src/libsync/owncloudpropagator.cpp
src/libsync/propagatedownload.cpp
src/libsync/propagateremotemove.cpp
src/libsync/propagatorjobs.cpp
src/libsync/syncengine.cpp
src/libsync/syncfilestatustracker.cpp
test/testsyncengine.cpp
test/testsyncjournaldb.cpp