[graphics/krita/krita/6.0] /: Add a note about deprecation of QScopedPointer

Dmitry Kazakov null at kde.org
Mon Apr 20 14:34:05 BST 2026


Git commit f802ac7cddf4f91a323c4024d687b218e56150ee by Dmitry Kazakov.
Committed on 20/04/2026 at 13:34.
Pushed by dkazakov into branch 'krita/6.0'.

Add a note about deprecation of QScopedPointer

Freya's recent commit has removed most of the usages
of QScopedPointer from non-d-ptr places, so we can
enforce this rule safely. In some distant future, we might
want to remove that from d-ptr as well, but it is not
planned right now.

CC:kimageshop at kde.org


(cherry picked from commit 1a0b1369013773802eed3e625f288de1b031a208)

Co-authored-by: Dmitry Kazakov <dimula73 at gmail.com>

M  +5    -0    HACKING

https://invent.kde.org/graphics/krita/-/commit/f802ac7cddf4f91a323c4024d687b218e56150ee

diff --git a/HACKING b/HACKING
index f0693e054f3..3d895cbf203 100644
--- a/HACKING
+++ b/HACKING
@@ -117,6 +117,11 @@ Shared pointers
     Use shared pointers wherever possible. Prefer Qt's shared pointer classes
     to our home-grown shared pointer classes.
 
+QScopedPointer is being deprecated by Qt
+
+    We use QScopedPointer **only** for a d-ptr pattern in simple classes not
+    supporting move-semantics. For all other usages, use std::unique_ptr.
+
 Getter/setter
 
     Krita doesn't use Qt's properties -- yet. If you want to introduce use of


More information about the kimageshop mailing list