diff options
| author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-10-07 12:11:46 +0200 |
|---|---|---|
| committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-10-07 13:03:27 +0200 |
| commit | 0efe79f80d6f249040f47162ebbfc82289ca073d (patch) | |
| tree | b2326e1c7392367e438a16370f4cfb0ad63b09a0 /src/gui/platform/unix/qunixplatforminterface.cpp | |
| parent | 4ef79853528dcc908ad3737f7bebf38b059de959 (diff) | |
Rename the new platform APIs from QPlatformInterface to QNativeInterface
We were already using the 'native' nomenclature when referring to these
kinds of APIs, e.g. when talking about native handles, or the existing
QPlatformNativeInterface on a QPA level. Using 'native' for the user
facing APIs also distinguishes them from the 'platform' backend layer
in QPA and elsewhere.
Change-Id: I0f3273265904f0f19c0b6d62471f8820d3c3232e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/gui/platform/unix/qunixplatforminterface.cpp')
| -rw-r--r-- | src/gui/platform/unix/qunixplatforminterface.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/gui/platform/unix/qunixplatforminterface.cpp b/src/gui/platform/unix/qunixplatforminterface.cpp index 55650e3efcc..378282936ee 100644 --- a/src/gui/platform/unix/qunixplatforminterface.cpp +++ b/src/gui/platform/unix/qunixplatforminterface.cpp @@ -51,21 +51,21 @@ QT_BEGIN_NAMESPACE -using namespace QPlatformInterface::Private; +using namespace QNativeInterface::Private; #ifndef QT_NO_OPENGL #if defined(Q_OS_LINUX) -QT_DEFINE_PLATFORM_INTERFACE(QGLXContext, QOpenGLContext); -QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QGLXIntegration); +QT_DEFINE_NATIVE_INTERFACE(QGLXContext, QOpenGLContext); +QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QGLXIntegration); -QOpenGLContext *QPlatformInterface::QGLXContext::fromNative(GLXContext configBasedContext, QOpenGLContext *shareContext) +QOpenGLContext *QNativeInterface::QGLXContext::fromNative(GLXContext configBasedContext, QOpenGLContext *shareContext) { return QGuiApplicationPrivate::platformIntegration()->call< &QGLXIntegration::createOpenGLContext>(configBasedContext, nullptr, shareContext); } -QOpenGLContext *QPlatformInterface::QGLXContext::fromNative(GLXContext visualBasedContext, void *visualInfo, QOpenGLContext *shareContext) +QOpenGLContext *QNativeInterface::QGLXContext::fromNative(GLXContext visualBasedContext, void *visualInfo, QOpenGLContext *shareContext) { return QGuiApplicationPrivate::platformIntegration()->call< &QGLXIntegration::createOpenGLContext>(visualBasedContext, visualInfo, shareContext); @@ -73,10 +73,10 @@ QOpenGLContext *QPlatformInterface::QGLXContext::fromNative(GLXContext visualBas #endif #if QT_CONFIG(egl) -QT_DEFINE_PLATFORM_INTERFACE(QEGLContext, QOpenGLContext); -QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QEGLIntegration); +QT_DEFINE_NATIVE_INTERFACE(QEGLContext, QOpenGLContext); +QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QEGLIntegration); -QOpenGLContext *QPlatformInterface::QEGLContext::fromNative(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext) +QOpenGLContext *QNativeInterface::QEGLContext::fromNative(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext) { return QGuiApplicationPrivate::platformIntegration()->call< &QEGLIntegration::createOpenGLContext>(context, display, shareContext); @@ -86,19 +86,19 @@ QOpenGLContext *QPlatformInterface::QEGLContext::fromNative(EGLContext context, #endif // QT_NO_OPENGL #if QT_CONFIG(xcb) -QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QXcbScreen); -QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QXcbWindow); +QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QXcbScreen); +QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QXcbWindow); #endif #if QT_CONFIG(vsp2) -QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QVsp2Screen); +QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QVsp2Screen); #endif #if QT_CONFIG(evdev) -QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QEvdevKeyMapper); +QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QEvdevKeyMapper); template <> -QEvdevKeyMapper *QKeyMapper::platformInterface<QEvdevKeyMapper>() const +QEvdevKeyMapper *QKeyMapper::nativeInterface<QEvdevKeyMapper>() const { return dynamic_cast<QEvdevKeyMapper*>(QGuiApplicationPrivate::platformIntegration()); } |
