Skip to content

Fix RTTI with clang

Jonas Rakebrandt requested to merge xarblu/kile:fix-clang-rtti into master

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
    (In src/kileviewmanager.cpp:Manager::createViewerPart OkularPart is found but viewerInterface is a nullprt)
  • "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_casted they may or may not need similar treatment but this fixes all the issues I encountered.

Merge request reports