Use lambdas instead of QSignalMapper
ClosedPublic

Authored by volkov on Sep 5 2018, 12:06 PM.

Details

Summary

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

Diff Detail

Repository
R40 Kate
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 2527
Build 2545: arc lint + arc unit
volkov created this revision.Sep 5 2018, 12:06 PM
Restricted Application added a project: Kate. · View Herald TranscriptSep 5 2018, 12:06 PM
Restricted Application added a subscriber: kwrite-devel. · View Herald Transcript
volkov requested review of this revision.Sep 5 2018, 12:06 PM
volkov added a reviewer: Kate.Sep 5 2018, 12:08 PM
anthonyfieroni added inline comments.
addons/close-except-like/close_except_plugin.h
81

Make it lambda too.

volkov added inline comments.Sep 5 2018, 12:52 PM
addons/close-except-like/close_except_plugin.h
81

Why?

volkov added inline comments.Sep 5 2018, 12:54 PM
addons/close-except-like/close_except_plugin.h
81

The parameter of appendActionsFrom() still needs a type. It doesn't seem better if the type will be a type for lambda.

anthonyfieroni added inline comments.Sep 5 2018, 1:41 PM
addons/close-except-like/close_except_plugin.h
81

std::function<void(const QString &)> it's a type, function that returns noting and get 1 parameter.

volkov added inline comments.Sep 5 2018, 1:59 PM
addons/close-except-like/close_except_plugin.h
81

Why is it better than CloseFunction type?

cullmann accepted this revision.Sep 29 2018, 3:40 PM
cullmann added a subscriber: cullmann.

I think it is ok, as is.
Better than the old code.

This revision is now accepted and ready to land.Sep 29 2018, 3:40 PM
volkov closed this revision.Oct 1 2018, 7:47 PM