Use lambdas instead of QSignalMapper
ClosedPublic

Authored by volkov on Sep 3 2018, 3:46 PM.

Details

Summary

QSignalMapper is obsolete and code with lambdas is shorter and clearer.

Diff Detail

Repository
R260 Gwenview
Branch
use-lambdas
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 2486
Build 2504: arc lint + arc unit
volkov created this revision.Sep 3 2018, 3:46 PM
Restricted Application added a project: Gwenview. · View Herald TranscriptSep 3 2018, 3:46 PM
volkov requested review of this revision.Sep 3 2018, 3:46 PM

Nice simplification. :)
Works good, just one maybe unnecessary call (see inline comment).

app/semanticinfocontextmanageritem.cpp
215

Is there any situation where this is needed? As far as I can see mRatingWidget emits the ratingChanged signal and this triggers slotRatingChanged().

volkov added inline comments.Sep 4 2018, 11:15 AM
app/semanticinfocontextmanageritem.cpp
215

The connection to slotRatingChanged() was added in c96e084bafbef3bceab3a8420e30d86178ee6818
I guess it was done just in case. Seem reasonable to remove it.

volkov updated this revision to Diff 40969.Sep 4 2018, 11:17 AM

remove extra slotRatingChanged() calling

muhlenpfordt accepted this revision.Sep 4 2018, 3:45 PM
This revision is now accepted and ready to land.Sep 4 2018, 3:45 PM
volkov closed this revision.Sep 4 2018, 3:58 PM