When building KService-5.0.0 against Qt5 from git, one gets a build failure involving an invalid pointer type conversion. I have attached a build log from my machine, running Gentoo Linux. The issue lies in KMimeTypeFactory::allMimeTypes() (line 116 in kservice/src/services/kmimetypefactory.cpp). The code tries to construct a MimeTypeEntry::Ptr from a KSycocaEntry, where MimeTypeEntry::Ptr is: typedef QExplicitlySharedDataPointer<MimeTypeEntry> Ptr;
Created attachment 87742 [details] A full build log containing this error.
I have investigated further, and this bug is caused by Qt commit e112c2e (https://qt.gitorious.org/qt/qtbase/commit/e112c2ee20f89f288a4f0a13827f0b64067096f0). There seem to be two possible fixes: 1. Change all KDE code which depended on the old static_cast functionality to perform the static_cast ourselves, instead of relying on Qt to do it. 2. Update e.g. KDECompilerSettings.cmake to define QT_ENABLE_QEXPLICITLYSHAREDDATAPOINTER_STATICCAST to re-enable the static_cast code in Qt.
Created attachment 87746 [details] Proposed change which fixes this issue.
static_cast is added.