diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-01-12 16:12:42 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-01-13 13:39:12 +0100 |
commit | 1f2bed2bc8ce2c865b79c4948fba100b748c8bcb (patch) | |
tree | 0cca12c91cc59e08c04490f93e0b09f382bb4a75 | |
parent | c96f2a9e3b2c86bf3c793b5e54fc9031c6af7291 (diff) | |
download | qttools-1f2bed2bc8ce2c865b79c4948fba100b748c8bcb.tar.gz |
qtdiag/Windows: Output GPU information similar to dxdiag.
Task-number: QTBUG-43263
Change-Id: I348a97a843bcfc2339a06f7408dea72e91d9e0d0
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
-rw-r--r-- | src/qtdiag/qtdiag.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qtdiag/qtdiag.cpp b/src/qtdiag/qtdiag.cpp index 15ae06556..17480ee31 100644 --- a/src/qtdiag/qtdiag.cpp +++ b/src/qtdiag/qtdiag.cpp @@ -62,6 +62,7 @@ #include <private/qguiapplication_p.h> #include <qpa/qplatformintegration.h> #include <qpa/qplatformtheme.h> +#include <qpa/qplatformnativeinterface.h> #include <algorithm> @@ -376,6 +377,14 @@ QString qtDiag(unsigned flags) #else Q_UNUSED(flags) #endif // !QT_NO_OPENGL + + // On Windows, this will provide addition GPU info similar to the output of dxdiag. + const QVariant gpuInfoV = QGuiApplication::platformNativeInterface()->property("gpu"); + if (gpuInfoV.type() == QVariant::Map) { + const QString description = gpuInfoV.toMap().value(QStringLiteral("printable")).toString(); + if (!description.isEmpty()) + str << "\nGPU:\n" << description; + } return result; } |