diff options
author | Liang Qi <liang.qi@qt.io> | 2016-08-25 16:12:11 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-08-25 16:12:11 +0200 |
commit | c7cdf3aac7ef9571ce0c0cf25a2c8455c7604451 (patch) | |
tree | ff17379a7643d47224a500714d825d561172a282 /tests/auto/gui/qopenglconfig | |
parent | 3f64156e918a8cf5da1b68191a280f0daf3d954b (diff) | |
parent | 1e6630b54ce9a005c2cffac4dac95641838e8231 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
src/corelib/mimetypes/qmimeprovider.cpp
src/corelib/mimetypes/qmimetype.cpp
Change-Id: Ib483ddb6bfc380e7c8f195feca535703814c3872
Diffstat (limited to 'tests/auto/gui/qopenglconfig')
-rw-r--r-- | tests/auto/gui/qopenglconfig/tst_qopenglconfig.cpp | 12 |
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"; + } } } |