Fix build when using the latest KF6
The remaining code changes to resolve build errors in https://bugs.kde.org/show_bug.cgi?id=456289#c57
Eventually, we need to decide if we want a version-less KF naming in CMake files, or do a hard switch to KF6 and no longer support kf5-qt5.