Fix RTTI with clang
Clang's RTTI support don't work here, use qobject_cast<> to avoid runtime crashes.
Env
System
OpenBSD 6.7-current (GENERIC.MP) #36: Sat Aug 22 11:27:03 MDT 2020
deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 17023250432 (16234MB)
avail mem = 16492290048 (15728MB)
Compiler
clang --version
OpenBSD clang version 10.0.1
Target: amd64-unknown-openbsd6.7
Thread model: posix
InstalledDir: /usr/bin
Qt
qmake-qt5 -v
QMake version 3.1
Using Qt version 5.13.2 in /usr/local/lib/qt5
CMake
cmake --version
cmake version 3.17.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
Background Information
I am working on the KDE/Qt packages for OpenBSD. I am an active maintainer of CMake, Qt and KDE Frameworks and KDE Applications on OpenBSD. I want to help with this PR to achieve better support for KDE on OpenBSD.