aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgcontext.cpp
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@qt.io>2023-08-30 22:05:23 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2023-09-01 15:57:36 +0200
commit3df72c56e732341aa55fa8e4aff48dbaebc15018 (patch)
treedb71674bc5394c632d1659c7d2bc83d07e288605 /src/quick/scenegraph/qsgcontext.cpp
parente1382f6ad7983a1adf082ba5852379a6bf154a83 (diff)
Export QQuickPixmapKey and (renamed) QQuickPixmapCache for autotests
We need to be able to do a leak check in tst_qquickpixmapcache. So we also need to use the singleton pattern rather than Q_GLOBAL_STATIC. Since it gets more exposed this way, make the badly-encapsulated parts of API available only to friends. It's always been bothersome that various other places in the code are including qquickpixmapcache_p.h to get QQuickPixmap, and qquickpixmapcache_p.h also does not include any class called QQuickPixmapCache as you'd expect; while arguably, QQuickPixmapStore is the cache. Often in comments I've needed to refer to "the code in qquickpixmapcache.cpp" because it's a very private, inbred family of related classes that don't match the header name. So now we split the headers: qquickpixmapcache_p.h is for the cache, which is now called QQuickPixmapCache; and qquickpixmap_p.h is the header most often needed in other places. Most classes in qquickpixmap_p.h are exported, but QQuickPixmapCache itself is not (except for autotests). It cannot be defined in the header that gets included in Particles for example: then it wouldn't link, because the implementation is not (and shouldn't be) exported, and that's not what Particles needs anyway. Task-number: QTBUG-81266 Task-number: QTBUG-114953 Change-Id: Ifd7f253b8bbaa130eb52d5546f342754f99f47bb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/quick/scenegraph/qsgcontext.cpp')
-rw-r--r--src/quick/scenegraph/qsgcontext.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/scenegraph/qsgcontext.cpp b/src/quick/scenegraph/qsgcontext.cpp
index 17a685aee1..4271c079ce 100644
--- a/src/quick/scenegraph/qsgcontext.cpp
+++ b/src/quick/scenegraph/qsgcontext.cpp
@@ -4,7 +4,7 @@
#include <QtQuick/private/qsgcontext_p.h>
#include <QtQuick/private/qsgtexture_p.h>
#include <QtQuick/private/qsgrenderer_p.h>
-#include <QtQuick/private/qquickpixmapcache_p.h>
+#include <QtQuick/private/qquickpixmap_p.h>
#include <QtQuick/private/qsgadaptationlayer_p.h>
#include <QtQuick/private/qsginternaltextnode_p.h>