Statusbar progress widget code cleanup: pass Mode to setMode
ClosedPublic

Authored by dfaure on May 7 2019, 9:26 AM.

Details

Summary

Every single call to setMode was setting mMode before...

Diff Detail

Repository
R89 PIM: Libraries
Branch
statusbarprogresswidget_cleanup
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11653
Build 11671: arc lint + arc unit
dfaure requested review of this revision.May 7 2019, 9:26 AM
dfaure created this revision.
dvratil requested changes to this revision.May 7 2019, 5:05 PM
dvratil added a subscriber: dvratil.
dvratil added inline comments.
src/libkdepim/progresswidget/statusbarprogresswidget.cpp
246

return when mMode == mode? Or does the code rely on the side-effects?

This revision now requires changes to proceed.May 7 2019, 5:05 PM
dfaure updated this revision to Diff 57740.May 8 2019, 12:27 AM

check mMode in setMode, which simplifies some callers (except the first one)

Restricted Application added a project: KDE PIM. · View Herald TranscriptMay 8 2019, 12:27 AM
mlaurent accepted this revision.May 8 2019, 7:39 AM

Seems ok for me

dfaure added a comment.May 9 2019, 9:06 AM

@dvratil I need your ok on this one before I can push it

dvratil accepted this revision.May 9 2019, 10:36 AM
This revision is now accepted and ready to land.May 9 2019, 10:36 AM
dfaure closed this revision.May 9 2019, 5:21 PM