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