aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/qsgcontextplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph/qsgcontextplugin.cpp')
-rw-r--r--src/quick/scenegraph/qsgcontextplugin.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/quick/scenegraph/qsgcontextplugin.cpp b/src/quick/scenegraph/qsgcontextplugin.cpp
index 1c2550d197..31f1c4c722 100644
--- a/src/quick/scenegraph/qsgcontextplugin.cpp
+++ b/src/quick/scenegraph/qsgcontextplugin.cpp
@@ -74,8 +74,8 @@ struct QSGAdaptationBackendData
{
QSGAdaptationBackendData();
- bool tried;
- QSGContextFactoryInterface *factory;
+ bool tried = false;
+ QSGContextFactoryInterface *factory = nullptr;
QString name;
QSGContextFactoryInterface::Flags flags;
@@ -85,9 +85,7 @@ struct QSGAdaptationBackendData
};
QSGAdaptationBackendData::QSGAdaptationBackendData()
- : tried(false)
- , factory(nullptr)
- , flags(0)
+ : flags(nullptr)
{
// Fill in the table with the built-in adaptations.
builtIns.append(new QSGSoftwareAdaptation);
@@ -140,7 +138,9 @@ QSGAdaptationBackendData *contextFactory()
#ifdef Q_OS_HTML5
requestedBackend = QString::fromLocal8Bit("software");
#endif
+
if (!requestedBackend.isEmpty()) {
+ qCDebug(QSG_LOG_INFO, "Loading backend %s", qUtf8Printable(requestedBackend));
// First look for a built-in adaptation.
for (QSGContextFactoryInterface *builtInBackend : qAsConst(backendData->builtIns)) {
@@ -210,7 +210,7 @@ QQuickTextureFactory *QSGContext::createTextureFactoryFromImage(const QImage &im
QSGAdaptationBackendData *backendData = contextFactory();
if (backendData->factory)
return backendData->factory->createTextureFactoryFromImage(image);
- return 0;
+ return nullptr;
}
@@ -224,7 +224,7 @@ QSGRenderLoop *QSGContext::createWindowManager()
QSGAdaptationBackendData *backendData = contextFactory();
if (backendData->factory)
return backendData->factory->createWindowManager();
- return 0;
+ return nullptr;
}
void QSGContext::setBackend(const QString &backend)