QWindowsOpenGLTester: fall back to built-in blacklist if buglist file cannot be resolved

if the environment variable is set, but the buglist file cannot be found,
we should fall back to the built-in buglist instead of not using any.

Change-Id: I370a1f21238efd155b46f0e7071734f5d3c6c343
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
bb10
Tim Blechmann 2016-06-10 09:54:09 +02:00
parent 4f6c6ef65f
commit 8ba3fee610
1 changed files with 5 additions and 4 deletions

View File

@ -246,15 +246,16 @@ QWindowsOpenGLTester::Renderers QWindowsOpenGLTester::detectSupportedRenderers(c
if (!glesOnly && testDesktopGL())
result |= QWindowsOpenGLTester::DesktopGl;
QSet<QString> features;
const char bugListFileVar[] = "QT_OPENGL_BUGLIST";
QString buglistFileName = QStringLiteral(":/qt-project.org/windows/openglblacklists/default.json");
if (qEnvironmentVariableIsSet(bugListFileVar)) {
const QString fileName = resolveBugListFile(QFile::decodeName(qgetenv(bugListFileVar)));
if (!fileName.isEmpty())
features = QOpenGLConfig::gpuFeatures(qgpu, fileName);
} else {
features = QOpenGLConfig::gpuFeatures(qgpu, QStringLiteral(":/qt-project.org/windows/openglblacklists/default.json"));
buglistFileName = fileName;
}
QSet<QString> features = QOpenGLConfig::gpuFeatures(qgpu, buglistFileName);
qCDebug(lcQpaGl) << "GPU features:" << features;
if (features.contains(QStringLiteral("disable_desktopgl"))) { // Qt-specific