summaryrefslogtreecommitdiff
path: root/src/qtdiag
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-07-28 09:30:38 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-07-29 22:12:21 +0200
commitc7aacbea27ac802ac6e248f8084b0820c70fab1b (patch)
treedfd5404732cfb6f11ce2a2341a791d3f998379c6 /src/qtdiag
parent951d006b0a1770973719582d6586301b05bf834d (diff)
downloadqttools-c7aacbea27ac802ac6e248f8084b0820c70fab1b.tar.gz
qtdiag/Windows: Use GPU information from the new native interface
Task-number: QTBUG-83252 Change-Id: Ifb2b5eeab55cf882cceb5ec1ada9366b8fa932aa Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/qtdiag')
-rw-r--r--src/qtdiag/qtdiag.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/qtdiag/qtdiag.cpp b/src/qtdiag/qtdiag.cpp
index 15a647218..331838910 100644
--- a/src/qtdiag/qtdiag.cpp
+++ b/src/qtdiag/qtdiag.cpp
@@ -73,7 +73,7 @@
#include <qpa/qplatformscreen.h>
#include <qpa/qplatformtheme.h>
#include <qpa/qplatformthemefactory_p.h>
-#include <qpa/qplatformnativeinterface.h>
+#include <qpa/qplatformintegration.h>
#include <private/qhighdpiscaling_p.h>
#include <QtGui/private/qrhi_p.h>
@@ -843,9 +843,11 @@ QString qtDiag(unsigned flags)
}
#endif // vulkan
+#ifdef Q_OS_WIN
// On Windows, this will provide addition GPU info similar to the output of dxdiag.
- if (const QPlatformNativeInterface *ni = QGuiApplication::platformNativeInterface()) {
- const QVariant gpuInfoV = ni->property("gpuList");
+ using QWindowsApplication = QPlatformInterface::Private::QWindowsApplication;
+ if (auto nativeWindowsApp = dynamic_cast<QWindowsApplication *>(QGuiApplicationPrivate::platformIntegration())) {
+ const QVariant gpuInfoV = nativeWindowsApp->gpuList();
if (gpuInfoV.type() == QVariant::List) {
const auto gpuList = gpuInfoV.toList();
for (int i = 0; i < gpuList.size(); ++i) {
@@ -857,6 +859,7 @@ QString qtDiag(unsigned flags)
str << "\n";
}
}
+#endif // Q_OS_WIN
if (flags & QtDiagRhi) {
dumpRhiInfo(str);