Use qobject_cast and static_cast in some places
ClosedPublic

Authored by asensi on Apr 18 2020, 7:42 PM.

Details

Summary

qobject_cast is used as in https://doc.qt.io/qt-5/qobject.html#qobject_cast:

The `qobject_cast()` function behaves similarly to the standard C++ `dynamic_cast()`, with the advantages that it doesn't require RTTI support and it works across dynamic library boundaries.

static_cast is used as in https://doc.qt.io/qt-5/qobject.html and https://doc.qt.io/qt-5/eventsandfilters.html.

Test Plan

Usual Krusader actions, like browsing directories, creating tabs, copying files, typing the name of a file (in order to use the search bar), or entering archives. Note: More tests will be performed when testing the next commits.

Diff Detail

Repository
R167 Krusader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
asensi requested review of this revision.Apr 18 2020, 7:42 PM
asensi created this revision.
gengisdave accepted this revision.Apr 27 2020, 8:20 PM
gengisdave added a subscriber: gengisdave.

Compiled and tested, no problems found.

This revision is now accepted and ready to land.Apr 27 2020, 8:20 PM
This revision was automatically updated to reflect the committed changes.