qt5base-lts/tests/auto/gui
Tor Arne Vestbø 6ff79478a4 Introduce platform API abstraction for QOpenGLContext
The API is available by including qopenglcontext.h as usual,
but scoped in the QPlatformInterface namespace. The namespace
exposes platform specific type-safe interfaces that provide:

 a) Factory functions for adopting native contexts, e.g.

    QCocoaGLContext::fromNative(nsContext, shareContext);

 b) Access to underlying native handles, e.g.

    openGLContext->platformInterface<QCocoaGLContext>->nativeContext()

 c) Platform specific functionality, e.g.

    static QWGLContext::openGLModuleHandle()

    openGLContext->platformInterface<QEGLContext>->doSomething();

The platform interfaces live close to the classes they extend,
removing the need for complex indirection and plumbing, and
avoids kitchen-sink modules and APIs such as the extras modules,
QPlatformFunctions, or QPlatformNativeInterface.

In the case of QOpenGLContext these platform APIs are backed
by the platform plugin, so dynamic_cast is used to ensure the
platform plugin supports the requested interface, but this is
and implementation detail. The interface APIs are agnostic
to where the implementation lives, while still being available
to the user as part of the APIs they extend/augment.

The documentation will be restored when the dust settles.

Task-number: QTBUG-80233
Change-Id: Iac612403383991c4b24064332542a6e4bcbb3293
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-07-02 10:27:50 +02:00
..
image Use QList instead of QVector in gui tests 2020-06-25 10:13:12 +02:00
itemmodels Use QList instead of QVector in gui tests 2020-06-25 10:13:12 +02:00
kernel CMake: Skip / ignore failing tests on CMake platforms 2020-07-01 14:55:29 +02:00
math3d Revert "Remove flagBits from QMatrix4x4" 2020-03-04 15:54:38 +00:00
painting Use QList instead of QVector in gui tests 2020-06-25 10:13:12 +02:00
qopengl Introduce platform API abstraction for QOpenGLContext 2020-07-02 10:27:50 +02:00
qopenglconfig Use QList instead of QVector in gui tests 2020-06-25 10:13:12 +02:00
qvulkan Use QList instead of QVector in gui tests 2020-06-25 10:13:12 +02:00
rhi CMake: Skip / ignore failing tests on CMake platforms 2020-07-01 14:55:29 +02:00
text CMake: Skip / ignore failing tests on CMake platforms 2020-07-01 14:55:29 +02:00
util Use QList instead of QVector in gui tests 2020-06-25 10:13:12 +02:00
.prev_CMakeLists.txt Remove winrt 2020-06-06 20:25:49 +02:00
CMakeLists.txt Remove winrt 2020-06-06 20:25:49 +02:00
gui.pro Remove winrt 2020-06-06 20:25:49 +02:00