From 0efe79f80d6f249040f47162ebbfc82289ca073d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 7 Oct 2020 12:11:46 +0200 Subject: 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 Reviewed-by: Lars Knoll --- tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp | 4 ++-- tests/auto/gui/qopengl/tst_qopengl.cpp | 6 +++--- tests/manual/qopenglcontext/qopenglcontextwindow.cpp | 6 +++--- tests/manual/qtabletevent/regular_widgets/main.cpp | 2 +- tests/manual/touch/main.cpp | 2 +- tests/manual/widgets/widgets/defaultUpMenuBar/main.cpp | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) (limited to 'tests') diff --git a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp index 0df949acba..790b53ff9f 100644 --- a/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp +++ b/tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp @@ -446,8 +446,8 @@ void tst_QClipboard::clearBeforeSetText() # ifdef Q_OS_WIN -using QWindowsMime = QPlatformInterface::Private::QWindowsMime; -using QWindowsApplication = QPlatformInterface::Private::QWindowsApplication; +using QWindowsMime = QNativeInterface::Private::QWindowsMime; +using QWindowsApplication = QNativeInterface::Private::QWindowsApplication; class TestMime : public QWindowsMime { diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp index 5e244a4ae9..903b617ae8 100644 --- a/tests/auto/gui/qopengl/tst_qopengl.cpp +++ b/tests/auto/gui/qopengl/tst_qopengl.cpp @@ -1472,7 +1472,7 @@ void tst_QOpenGL::defaultSurfaceFormat() QCOMPARE(context->format(), fmt); } -using namespace QPlatformInterface; +using namespace QNativeInterface; #ifdef USE_GLX void tst_QOpenGL::glxContextWrap() @@ -1490,7 +1490,7 @@ void tst_QOpenGL::glxContextWrap() QOpenGLContext *ctx0 = new QOpenGLContext; ctx0->setFormat(window->format()); QVERIFY(ctx0->create()); - auto *glxContextIf = ctx0->platformInterface(); + auto *glxContextIf = ctx0->nativeInterface(); QVERIFY(glxContextIf); GLXContext context = glxContextIf->nativeContext(); QVERIFY(context); @@ -1524,7 +1524,7 @@ void tst_QOpenGL::wglContextWrap() window->show(); QVERIFY(QTest::qWaitForWindowExposed(window.data())); - auto *wglContext = ctx->platformInterface(); + auto *wglContext = ctx->nativeInterface(); QVERIFY(wglContext); QVERIFY(wglContext->nativeContext()); diff --git a/tests/manual/qopenglcontext/qopenglcontextwindow.cpp b/tests/manual/qopenglcontext/qopenglcontextwindow.cpp index 4a369f8eda..07147a4488 100644 --- a/tests/manual/qopenglcontext/qopenglcontextwindow.cpp +++ b/tests/manual/qopenglcontext/qopenglcontextwindow.cpp @@ -97,8 +97,8 @@ void QOpenGLContextWindow::createForeignContext() // underlying native context. This way the texture, that belongs to the context // created here, will be accessible from m_context too. - using namespace QPlatformInterface; - auto *eglContext = m_context->platformInterface(); + using namespace QNativeInterface; + auto *eglContext = m_context->nativeInterface(); if (!eglContext) qFatal("Not running with EGL backend"); @@ -132,7 +132,7 @@ void QOpenGLContextWindow::createForeignContext() // Wrap ctx into a QOpenGLContext. QOpenGLContext *ctxWrap = QEGLContext::fromNative(ctx, dpy, m_context); - Q_ASSERT(ctxWrap->platformInterface()->nativeContext() == ctx); + Q_ASSERT(ctxWrap->nativeInterface()->nativeContext() == ctx); QOffscreenSurface surface; surface.setFormat(fmt); diff --git a/tests/manual/qtabletevent/regular_widgets/main.cpp b/tests/manual/qtabletevent/regular_widgets/main.cpp index 9f20f5412f..3b112450b4 100644 --- a/tests/manual/qtabletevent/regular_widgets/main.cpp +++ b/tests/manual/qtabletevent/regular_widgets/main.cpp @@ -52,7 +52,7 @@ enum TabletPointType { }; #ifdef Q_OS_WIN -using QWindowsApplication = QPlatformInterface::Private::QWindowsApplication; +using QWindowsApplication = QNativeInterface::Private::QWindowsApplication; static void setWinTabEnabled(bool e) { diff --git a/tests/manual/touch/main.cpp b/tests/manual/touch/main.cpp index c09d951ff0..fdba80d7bb 100644 --- a/tests/manual/touch/main.cpp +++ b/tests/manual/touch/main.cpp @@ -430,7 +430,7 @@ private slots: void touchTypeToggled(); private: - using QWindowsApplication = QPlatformInterface::Private::QWindowsApplication; + using QWindowsApplication = QNativeInterface::Private::QWindowsApplication; using TouchWindowTouchType = QWindowsApplication::TouchWindowTouchType; using TouchWindowTouchTypes = QWindowsApplication::QWindowsApplication::TouchWindowTouchTypes; diff --git a/tests/manual/widgets/widgets/defaultUpMenuBar/main.cpp b/tests/manual/widgets/widgets/defaultUpMenuBar/main.cpp index e9e1d91e37..2a78f9d0f0 100644 --- a/tests/manual/widgets/widgets/defaultUpMenuBar/main.cpp +++ b/tests/manual/widgets/widgets/defaultUpMenuBar/main.cpp @@ -118,7 +118,7 @@ int main(int argc, char **argv) MainWindow *mainWindow = new MainWindow; mainWindow->setGeometry(screen->geometry()); mainWindow->winId(); - using namespace QPlatformInterface::Private; + using namespace QNativeInterface::Private; if (auto *windowsWindow = dynamic_cast(mainWindow->windowHandle()->handle())) windowsWindow->setHasBorderInFullScreen(true); mainWindow->showMaximized(); -- cgit v1.2.3