Fix RTTI with clang
dynamic_cast
fails on clang(+libc++) systems resulting in the issues:
- Startup fail:
org.kde.kile.main: couldn't find a recent version of the Okular library
(Insrc/kileviewmanager.cpp:Manager::createViewerPart
OkularPart is found butviewerInterface
is anullprt
) - "ViewPDF" Button doesn't do anything (but console claims it succeeded)
- probably more I didn't encounter
This is pretty much what Okular does too in graphics/okular!283 (merged)
For now I only changed the Okular::ViewerInterface
casts as everything else seems to work.
If there are other runtime-loaded parts that get dynamic_cast
ed they may or may not need similar treatment
but this fixes all the issues I encountered.