diff options
author | Shawn Rutledge <[email protected]> | 2023-08-30 22:05:23 +0200 |
---|---|---|
committer | Shawn Rutledge <[email protected]> | 2023-09-01 15:57:36 +0200 |
commit | 3df72c56e732341aa55fa8e4aff48dbaebc15018 (patch) | |
tree | db71674bc5394c632d1659c7d2bc83d07e288605 /src/labs/sharedimage/qsharedimageprovider.cpp | |
parent | e1382f6ad7983a1adf082ba5852379a6bf154a83 (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 <[email protected]>
Diffstat (limited to 'src/labs/sharedimage/qsharedimageprovider.cpp')
-rw-r--r-- | src/labs/sharedimage/qsharedimageprovider.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/labs/sharedimage/qsharedimageprovider.cpp b/src/labs/sharedimage/qsharedimageprovider.cpp index 69f0013b06..33f72447e3 100644 --- a/src/labs/sharedimage/qsharedimageprovider.cpp +++ b/src/labs/sharedimage/qsharedimageprovider.cpp @@ -2,7 +2,7 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #include <qsharedimageprovider_p.h> -#include <private/qquickpixmapcache_p.h> +#include <private/qquickpixmap_p.h> #include <private/qimage_p.h> #include <QImageReader> #include <QFileInfo> |