diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-03-02 22:23:40 +0100 |
---|---|---|
committer | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-07 00:13:35 +0200 |
commit | 76a41f45c7e69375f13b3942523e0f8753b1f9b7 (patch) | |
tree | 24c31356dc3782eec48e4eb9003ed045a8c006f1 /README_TESTING.md | |
parent | 83d10ce89a1544044ea907e39f498183adb554f2 (diff) | |
download | subsurface-76a41f45c7e69375f13b3942523e0f8753b1f9b7.tar.gz |
cleanup: use lambdas to transport DiveEventItem to actions
The removeEvent(), hideEvents() and editName() actions need
the DiveEventItem they are applied to. This was transported
via QAction's user-data, which means casting to void and
back.
By using lambdas instead, this can be made perfectly type-safe:
First we are 100% sure that we have a DiveEventItem because
we check the result of a dynamic_cast<>. Then we can pass
it to the even using its proper type.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'README_TESTING.md')
0 files changed, 0 insertions, 0 deletions