summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-08-31 08:24:21 +0200
committerLiang Qi <liang.qi@qt.io>2016-08-31 08:24:21 +0200
commitf510a51dace0cb39a93b057b8fcbcbdda33a956e (patch)
treecd1dac8a78ecbb7579c59bf9f0b0d2d6fba56b4a /tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp
parentccedc853a67da078ace234af7b23fbf861736f3f (diff)
parent84830fc07d65d58fce9b24b5ec8f1224b0969ac0 (diff)
Merge remote-tracking branch 'origin/5.8' into dev
Diffstat (limited to 'tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp')
-rw-r--r--tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp b/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp
index 447b6e8468..39f7beca6f 100644
--- a/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp
+++ b/tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp
@@ -152,11 +152,13 @@ static void dumpConfiguration(QTextStream &str)
}
// 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 << "\n\n";
+ if (QGuiApplication::platformNativeInterface()) {
+ 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 << "\n\n";
+ }
}
}