Skip to content

Commit

Permalink
Add {} for single line if statements.
Browse files Browse the repository at this point in the history
Signed-off-by: Camila <[email protected]>
  • Loading branch information
Camila committed Sep 12, 2023
1 parent 16f8f7d commit 08f7fc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/libsync/owncloudpropagator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1259,8 +1259,9 @@ void PropagatorCompositeJob::finalize()
{
// The propagator will do parallel scheduling and this could be posted
// multiple times on the event loop, ignore the duplicate calls.
if (_state == Finished)
if (_state == Finished) {
return;
}

_state = Finished;
emit finished(_hasError == SyncFileItem::NoStatus ? SyncFileItem::Success : _hasError);
Expand Down
3 changes: 2 additions & 1 deletion src/libsync/owncloudpropagator.h
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,9 @@ private slots:
/** Emit the finished signal and make sure it is only emitted once */
void emitFinished(OCC::SyncFileItem::Status status)
{
if (!_finishedEmited)
if (!_finishedEmited) {
emit finished(status == SyncFileItem::Success);
}
_abortRequested = false;
_finishedEmited = true;
}
Expand Down

0 comments on commit 08f7fc2

Please sign in to comment.