From kde-core-devel Tue Oct 03 13:58:15 2006 From: Cyrille Berger Date: Tue, 03 Oct 2006 13:58:15 +0000 To: kde-core-devel Subject: about kde4's smart pointer Message-Id: <200610031558.16251.cberger () cberger ! net> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=115988395111797 Hello Can we have the kde3 behaviour back for smart pointer ? The new one is really painfull. We use them a lot in krita, and what we want is them to be use transparently as if they were "normal" pointers. I mean for instance: typedef KSharedPtr KisPaintDeviceSP; typedef KSharedPtr KisDeviceSP; KisPaintDeviceSP pd = KisPaintDeviceSP(new KisPaintDevice()); KisDeviceSP d = KisDeviceSP( pd.data()); // Assuming that KisPaintDevice inherits from KisDevice instead of KisPaintDeviceSP pd = new KisPaintDevice(); KisDeviceSP d = pd; And there is also pd.isNull instead of pd == 0. And I forget other difference of behaviour between our smartpointers and the "normal" pointers. -- --- Cyrille Berger ---