summaryrefslogtreecommitdiffstats
path: root/src/opengl/qplatformbackingstoreopenglsupport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qplatformbackingstoreopenglsupport.cpp')
-rw-r--r--src/opengl/qplatformbackingstoreopenglsupport.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/opengl/qplatformbackingstoreopenglsupport.cpp b/src/opengl/qplatformbackingstoreopenglsupport.cpp
index 6f893671c0..46e36c23d4 100644
--- a/src/opengl/qplatformbackingstoreopenglsupport.cpp
+++ b/src/opengl/qplatformbackingstoreopenglsupport.cpp
@@ -450,17 +450,14 @@ GLuint QPlatformBackingStoreOpenGLSupport::toTexture(const QRegion &dirtyRegion,
return textureId;
}
-static QPlatformBackingStoreOpenGLSupportBase *createOpenGLSupport()
+void qt_registerDefaultPlatformBackingStoreOpenGLSupport()
{
- return new QPlatformBackingStoreOpenGLSupport;
-}
-
-static void setDefaultOpenGLSupportFactoryFunction()
-{
- if (!QPlatformBackingStoreOpenGLSupportBase::factoryFunction())
- QPlatformBackingStoreOpenGLSupportBase::setFactoryFunction(createOpenGLSupport);
+ if (!QPlatformBackingStoreOpenGLSupportBase::factoryFunction()) {
+ QPlatformBackingStoreOpenGLSupportBase::setFactoryFunction([]() -> QPlatformBackingStoreOpenGLSupportBase* {
+ return new QPlatformBackingStoreOpenGLSupport;
+ });
+ }
}
-Q_CONSTRUCTOR_FUNCTION(setDefaultOpenGLSupportFactoryFunction);
#endif // QT_NO_OPENGL