Kevin Funk

Kevin Funk

Software Engineer at KDAB. KDE developer and FOSS enthusiast.

kde

Wrap-Up: Issues with QExplicitlySharedDataPointer (KSharedPtr successor)

Recently, when porting away from KSharedPtr (which is now deprecated under KF5) to QExplicitlySharedDataPointer in KDevelop's frameworks branch, I noticed an interesting issue in the QExplictlySharedDataPointer API. Suppose we have two classes both inheriting from QSharedData (directly and indirectly): class Base : public QSharedData {}; class Derived : public Base {}; Now let's use