summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/kernel
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2024-02-11 01:05:06 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2024-02-13 13:55:01 +0100
commitcce303b6a70bfc5e7f191529724969ca7509039f (patch)
treec56280ca7c307b4a830de47290769a572a4ca96e /tests/auto/gui/kernel
parentea0cf4a9a2535110d6cf325e75537b4618a7374f (diff)
Add QPlatformIntegration::BackingStoreStaticContents capability
This was a feature in Qt 4, but the only platform that carried it over to Qt 5 was Windows, in ab76593f18396e693f24066592244ca95e135ea2, and that's still the situation. As a first step in possibly implementing this on more platforms, lets replace the hard-coded check in QWidgetRepaintManager::hasStaticContents with a proper QPlatformIntegration capability check in the only call site. Pick-to: 6.7 Change-Id: I2067109f45116cd8c62facf7224cd748f19e845b Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Diffstat (limited to 'tests/auto/gui/kernel')
-rw-r--r--tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp b/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp
index 9fdf566988..8a3d61829a 100644
--- a/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp
+++ b/tests/auto/gui/kernel/qbackingstore/tst_qbackingstore.cpp
@@ -4,6 +4,8 @@
#include <qwindow.h>
#include <qbackingstore.h>
#include <qpa/qplatformbackingstore.h>
+#include <qpa/qplatformintegration.h>
+#include <private/qguiapplication_p.h>
#include <qpainter.h>
#include <QTest>
@@ -271,9 +273,9 @@ void tst_QBackingStore::flush()
void tst_QBackingStore::staticContents()
{
-#if !defined(Q_OS_WIN)
- QSKIP("Platform does not support static backingstore content");
-#endif
+ const auto *integration = QGuiApplicationPrivate::platformIntegration();
+ if (!integration->hasCapability(QPlatformIntegration::BackingStoreStaticContents))
+ QSKIP("Platform does not support static backingstore content");
QWindow window;
window.create();