From 3df72c56e732341aa55fa8e4aff48dbaebc15018 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Wed, 30 Aug 2023 22:05:23 +0200 Subject: 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 --- src/quick/items/qquickwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/quick/items/qquickwindow.cpp') diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index 324ddd0b56..8a27671035 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -36,7 +36,7 @@ #include #include -#include +#include #include #include -- cgit v1.2.3