Resolve compiler fallthrough warnings

Authored by sharvey on Mar 17 2018, 11:07 PM.

Description

Resolve compiler fallthrough warnings

Summary:
Added "break;" and "return;" where needed to resolve fallthrough warnings

  • Resolve compiler fallthrough warning in Main.cpp, line 135

Added call to quitOnLastWindowClosed(false) at the end of BackgroundMode block,
ensuring this flag is set directly, rather than allowing it to be set via fallthrough into the
DBusMode block beneath. Added break to properly end the BackgroundMode block.

  • Resolve compiler fallthrough warning in SpectacleCore.cpp, line 212

Added explicit call to emit 'allDone()' signal, rather than allowing execution to fall through
into block for DBusMode, which previously emitted the signal. This change also removes the
emission of signal 'grabFailed()' during a BackgroundMode failure, which only happened due
to the fallthrough into the DBus block, but signaling on the bus is not needed in BackgroundMode.

Test Plan:

  • Compile Spectacle
  • Ensure warnings at Main.cpp:135 and SpectacleCore.cpp:212 are eliminated

Reviewers: Spectacle, rkflx, ngraham

Reviewed By: Spectacle, rkflx, ngraham

Differential Revision: https://phabricator.kde.org/D10936

Details

Committed
rkflxMar 17 2018, 11:09 PM
Reviewer
Spectacle
Differential Revision
D10936: Resolve compiler fallthrough warnings
Parents
R166:159b7d507b41: Add docbook content which was lost during a merge and more cleanup
Branches
Unknown
Tags
Unknown