From 3d03f4e989e0ae53569a1a2e390d71c41d91f329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 28 Jul 2020 15:31:44 +0200 Subject: Register QPlatformBackingStoreOpenGLSupport when needed Static builds can not rely on a constructor function in the QtOpenGL library, as that will be linked out unless something in the application pulls it in. Instead we export a helper function that clients that depend on OpenGL support in QPlatformBackingStore can use to bring it it. Change-Id: Ic54058bf413a476287884c78df5624b862f97695 Reviewed-by: Laszlo Agocs --- src/openglwidgets/qopenglwidget.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/openglwidgets/qopenglwidget.cpp') diff --git a/src/openglwidgets/qopenglwidget.cpp b/src/openglwidgets/qopenglwidget.cpp index b7abc89c0be..cb60de1fd1d 100644 --- a/src/openglwidgets/qopenglwidget.cpp +++ b/src/openglwidgets/qopenglwidget.cpp @@ -55,6 +55,7 @@ #include #include #include +#include #include @@ -1411,6 +1412,8 @@ bool QOpenGLWidget::event(QEvent *e) return QWidget::event(e); } +Q_CONSTRUCTOR_FUNCTION(qt_registerDefaultPlatformBackingStoreOpenGLSupport); + QT_END_NAMESPACE #include "moc_qopenglwidget.cpp" -- cgit v1.2.3