summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-10-07 12:11:46 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-10-07 13:03:27 +0200
commit0efe79f80d6f249040f47162ebbfc82289ca073d (patch)
treeb2326e1c7392367e438a16370f4cfb0ad63b09a0
parent4ef79853528dcc908ad3737f7bebf38b059de959 (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>
-rw-r--r--examples/opengl/contextinfo/widget.cpp2
-rw-r--r--src/corelib/global/qglobal.h21
-rw-r--r--src/gui/doc/src/nativeinterfaces.qdoc94
-rw-r--r--src/gui/kernel/qguiapplication_p.h12
-rw-r--r--src/gui/kernel/qkeymapper_p.h11
-rw-r--r--src/gui/kernel/qoffscreensurface.cpp6
-rw-r--r--src/gui/kernel/qoffscreensurface.h3
-rw-r--r--src/gui/kernel/qoffscreensurface_platform.h6
-rw-r--r--src/gui/kernel/qopenglcontext.cpp6
-rw-r--r--src/gui/kernel/qopenglcontext.h3
-rw-r--r--src/gui/kernel/qopenglcontext_platform.h12
-rw-r--r--src/gui/kernel/qplatformintegration.h6
-rw-r--r--src/gui/kernel/qplatformmenu_p.h10
-rw-r--r--src/gui/kernel/qplatformoffscreensurface.h12
-rw-r--r--src/gui/kernel/qplatformopenglcontext.h18
-rw-r--r--src/gui/kernel/qplatformscreen_p.h10
-rw-r--r--src/gui/kernel/qplatformwindow_p.h12
-rw-r--r--src/gui/opengl/platform/egl/qeglplatformcontext_p.h2
-rw-r--r--src/gui/platform/android/qandroidplatforminterface.cpp8
-rw-r--r--src/gui/platform/macos/qcocoaplatforminterface.mm14
-rw-r--r--src/gui/platform/unix/qunixplatforminterface.cpp26
-rw-r--r--src/gui/platform/windows/qwindowsmime_p.h4
-rw-r--r--src/gui/platform/windows/qwindowsplatforminterface.cpp14
-rw-r--r--src/plugins/platforms/android/qandroidplatformintegration.h4
-rw-r--r--src/plugins/platforms/android/qandroidplatformoffscreensurface.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaglcontext.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenu.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoamenubar.h2
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.h2
-rw-r--r--src/plugins/platforms/eglfs/api/qeglfsintegration_p.h4
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qeglfskmsvsp2screen.h2
-rw-r--r--src/plugins/platforms/linuxfb/qlinuxfbintegration.h2
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration_x11.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsapplication.cpp4
-rw-r--r--src/plugins/platforms/windows/qwindowsapplication.h6
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.cpp4
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.h2
-rw-r--r--src/plugins/platforms/windows/qwindowsmime.cpp12
-rw-r--r--src/plugins/platforms/windows/qwindowsmime.h2
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.h6
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.h2
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h2
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp4
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.h4
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.h2
-rw-r--r--src/plugins/styles/windowsvista/qwindowsxpstyle.cpp2
-rw-r--r--src/widgets/dialogs/qwizard_win.cpp2
-rw-r--r--src/widgets/kernel/qwidget.cpp2
-rw-r--r--src/widgets/styles/qwindowsstyle.cpp2
-rw-r--r--src/widgets/widgets/qmainwindow.cpp2
-rw-r--r--src/widgets/widgets/qmenu_mac.mm2
-rw-r--r--tests/auto/gui/kernel/qclipboard/tst_qclipboard.cpp4
-rw-r--r--tests/auto/gui/qopengl/tst_qopengl.cpp6
-rw-r--r--tests/manual/qopenglcontext/qopenglcontextwindow.cpp6
-rw-r--r--tests/manual/qtabletevent/regular_widgets/main.cpp2
-rw-r--r--tests/manual/touch/main.cpp2
-rw-r--r--tests/manual/widgets/widgets/defaultUpMenuBar/main.cpp2
61 files changed, 215 insertions, 213 deletions
diff --git a/examples/opengl/contextinfo/widget.cpp b/examples/opengl/contextinfo/widget.cpp
index ee3161eae7..df1e6a6f7b 100644
--- a/examples/opengl/contextinfo/widget.cpp
+++ b/examples/opengl/contextinfo/widget.cpp
@@ -382,7 +382,7 @@ void Widget::renderWindowReady()
m_output->append(tr("Qt OpenGL configuration: %1")
.arg(QString::fromLatin1(gltype[QOpenGLContext::openGLModuleType()])));
#if defined(Q_OS_WIN)
- using namespace QPlatformInterface;
+ using namespace QNativeInterface;
m_output->append(tr("Qt OpenGL library handle: %1")
.arg(QString::number(qintptr(QWGLContext::openGLModuleHandle()), 16)));
#endif
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index fa8193853f..25c31e4067 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -1284,21 +1284,26 @@ inline int qIntCast(float f) { return int(f); }
// Ensures that the interface's typeinfo is exported so that
// dynamic casts work reliably, and protects the destructor
// so that pointers to the interface can't be deleted.
-#define QT_DECLARE_PLATFORM_INTERFACE(InterfaceClass) \
+#define QT_DECLARE_NATIVE_INTERFACE(InterfaceClass) \
protected: virtual ~InterfaceClass(); public:
+// Declares an accessor for the native interface
+#define QT_DECLARE_NATIVE_INTERFACE_ACCESSOR \
+ template <typename NativeInterface> \
+ NativeInterface *nativeInterface() const;
+
// Provides a definition for the interface destructor
-#define QT_DEFINE_PLATFORM_INTERFACE2(Namespace, InterfaceClass) \
+#define QT_DEFINE_NATIVE_INTERFACE2(Namespace, InterfaceClass) \
QT_PREPEND_NAMESPACE(Namespace)::InterfaceClass::~InterfaceClass() = default
// Provides a definition for the destructor, and an explicit
-// template instantiation of the platform interface accessor.
-#define QT_DEFINE_PLATFORM_INTERFACE3(Namespace, InterfaceClass, PublicClass) \
- QT_DEFINE_PLATFORM_INTERFACE2(Namespace, InterfaceClass); \
- template Q_DECL_EXPORT QT_PREPEND_NAMESPACE(Namespace)::InterfaceClass *PublicClass::platformInterface() const
+// template instantiation of the native interface accessor.
+#define QT_DEFINE_NATIVE_INTERFACE3(Namespace, InterfaceClass, PublicClass) \
+ QT_DEFINE_NATIVE_INTERFACE2(Namespace, InterfaceClass); \
+ template Q_DECL_EXPORT QT_PREPEND_NAMESPACE(Namespace)::InterfaceClass *PublicClass::nativeInterface() const
-#define QT_DEFINE_PLATFORM_INTERFACE(...) QT_OVERLOADED_MACRO(QT_DEFINE_PLATFORM_INTERFACE, QPlatformInterface, __VA_ARGS__)
-#define QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(...) QT_OVERLOADED_MACRO(QT_DEFINE_PLATFORM_INTERFACE, QPlatformInterface::Private, __VA_ARGS__)
+#define QT_DEFINE_NATIVE_INTERFACE(...) QT_OVERLOADED_MACRO(QT_DEFINE_NATIVE_INTERFACE, QNativeInterface, __VA_ARGS__)
+#define QT_DEFINE_PRIVATE_NATIVE_INTERFACE(...) QT_OVERLOADED_MACRO(QT_DEFINE_NATIVE_INTERFACE, QNativeInterface::Private, __VA_ARGS__)
// This macro can be used to calculate member offsets for types with a non standard layout.
// It uses the fact that offsetof() is allowed to support those types since C++17 as an optional
diff --git a/src/gui/doc/src/nativeinterfaces.qdoc b/src/gui/doc/src/nativeinterfaces.qdoc
index 9c0ab78ef4..f7137a76a9 100644
--- a/src/gui/doc/src/nativeinterfaces.qdoc
+++ b/src/gui/doc/src/nativeinterfaces.qdoc
@@ -34,7 +34,7 @@
*/
/*!
- \namespace QPlatformInterface::Private
+ \namespace QNativeInterface::Private
\inmodule QtGui
\since 6.0
\brief Contains the classes providing native interfaces.
@@ -42,7 +42,7 @@
*/
/*!
- \class QPlatformInterface::QCocoaGLContext
+ \class QNativeInterface::QCocoaGLContext
\since 6.0
\brief Native interface to QPlatformOpenGLContext.
\inmodule QtGui
@@ -50,7 +50,7 @@
*/
/*!
- \class QPlatformInterface::Private::QCocoaMenu
+ \class QNativeInterface::Private::QCocoaMenu
\since 6.0
\brief Native interface to QPlatformMenu.
\inmodule QtGui
@@ -58,7 +58,7 @@
*/
/*!
- \class QPlatformInterface::Private::QCocoaWindow
+ \class QNativeInterface::Private::QCocoaWindow
\since 6.0
\brief Native interface to QPlatformWindow.
\inmodule QtGui
@@ -66,7 +66,7 @@
*/
/*!
- \class QPlatformInterface::QEGLContext
+ \class QNativeInterface::QEGLContext
\since 6.0
\brief Native interface to QPlatformOpenGLContext.
\inmodule QtGui
@@ -74,7 +74,7 @@
*/
/*!
- \class QPlatformInterface::Private::QEvdevKeyMapper
+ \class QNativeInterface::Private::QEvdevKeyMapper
\since 6.0
\brief Native interface to QKeyMapper.
\inmodule QtGui
@@ -82,7 +82,7 @@
*/
/*!
- \class QPlatformInterface::QGLXContext
+ \class QNativeInterface::QGLXContext
\since 6.0
\brief Native interface to QPlatformOpenGLContext.
\inmodule QtGui
@@ -90,7 +90,7 @@
*/
/*!
- \class QPlatformInterface::QWGLContext
+ \class QNativeInterface::QWGLContext
\since 6.0
\brief Native interface to QPlatformOpenGLContext.
\inmodule QtGui
@@ -98,7 +98,7 @@
*/
/*!
- \class QPlatformInterface::Private::QWindowsApplication
+ \class QNativeInterface::Private::QWindowsApplication
\since 6.0
\brief Native interface to QGuiApplication, to be retrieved from QPlatformIntegration.
\inmodule QtGui
@@ -106,7 +106,7 @@
*/
/*!
- \enum QPlatformInterface::Private::QWindowsApplication::TouchWindowTouchType
+ \enum QNativeInterface::Private::QWindowsApplication::TouchWindowTouchType
This enum represents the supported TouchWindow touch flags for registerTouchWindow().
@@ -116,19 +116,19 @@
*/
/*!
- \fn void QPlatformInterface::Private::QWindowsApplication::setTouchWindowTouchType(QPlatformInterface::Private::QWindowsApplication::TouchWindowTouchTypes type)
+ \fn void QNativeInterface::Private::QWindowsApplication::setTouchWindowTouchType(QNativeInterface::Private::QWindowsApplication::TouchWindowTouchTypes type)
Sets the touch window type for all windows to \a type.
*/
/*!
- \fn QPlatformInterface::Private::QWindowsApplication::TouchWindowTouchTypes QPlatformInterface::Private::QWindowsApplication::touchWindowTouchType() const
+ \fn QNativeInterface::Private::QWindowsApplication::TouchWindowTouchTypes QNativeInterface::Private::QWindowsApplication::touchWindowTouchType() const
Returns the currently set the touch window type.
*/
/*!
- \enum QPlatformInterface::Private::QWindowsApplication::WindowActivationBehavior
+ \enum QNativeInterface::Private::QWindowsApplication::WindowActivationBehavior
This enum specifies the behavior of QWidget::activateWindow() and
QWindow::requestActivate().
@@ -144,7 +144,7 @@
*/
/*!
- \fn void QPlatformInterface::Private::QWindowsApplication::setWindowActivationBehavior(QPlatformInterface::Private::QWindowsApplication::WindowActivationBehavior behavior)
+ \fn void QNativeInterface::Private::QWindowsApplication::setWindowActivationBehavior(QNativeInterface::Private::QWindowsApplication::WindowActivationBehavior behavior)
Sets the window activation behavior to \a behavior.
@@ -152,13 +152,13 @@
*/
/*!
- \fn QPlatformInterface::Private::QWindowsApplication::WindowActivationBehavior QPlatformInterface::Private::QWindowsApplication::windowActivationBehavior() const
+ \fn QNativeInterface::Private::QWindowsApplication::WindowActivationBehavior QNativeInterface::Private::QWindowsApplication::windowActivationBehavior() const
Returns the currently set the window activation behavior.
*/
/*!
- \fn bool QPlatformInterface::Private::QWindowsApplication::isTabletMode() const
+ \fn bool QNativeInterface::Private::QWindowsApplication::isTabletMode() const
Returns \c true if Windows 10 operates in \e{Tablet Mode}.
In this mode, Windows forces all application main windows to open in maximized
@@ -169,7 +169,7 @@
*/
/*!
- \enum QPlatformInterface::Private::QWindowsApplication::DarkModeHandlingFlag
+ \enum QNativeInterface::Private::QWindowsApplication::DarkModeHandlingFlag
This enum specifies the behavior of the application when Windows
is configured to use dark mode for applications.
@@ -182,32 +182,32 @@
*/
/*!
- \fn bool QPlatformInterface::Private::QWindowsApplication::isDarkMode() const
+ \fn bool QNativeInterface::Private::QWindowsApplication::isDarkMode() const
Returns \c true if Windows 10 is configured to use dark mode for
applications.
*/
/*!
- \fn void QPlatformInterface::Private::QWindowsApplication::setDarkModeHandling(DarkModeHandling handling)
+ \fn void QNativeInterface::Private::QWindowsApplication::setDarkModeHandling(DarkModeHandling handling)
Sets the dark mode handling to \a handling.
*/
/*!
- \fn QPlatformInterface::Private::QWindowsApplication::DarkModeHandling QPlatformInterface::Private::QWindowsApplication::darkModeHandling() const
+ \fn QNativeInterface::Private::QWindowsApplication::DarkModeHandling QNativeInterface::Private::QWindowsApplication::darkModeHandling() const
Returns the currently set dark mode handling.
*/
/*!
- \fn bool QPlatformInterface::Private::QWindowsApplication::isWinTabEnabled() const
+ \fn bool QNativeInterface::Private::QWindowsApplication::isWinTabEnabled() const
Returns whether the \e{Tablet WinTab Driver} (\c Wintab32.dll) is used.
*/
/*!
- \fn bool QPlatformInterface::Private::QWindowsApplication::setWinTabEnabled(bool enabled)
+ \fn bool QNativeInterface::Private::QWindowsApplication::setWinTabEnabled(bool enabled)
Sets whether the \e{Tablet WinTab Driver} (\c Wintab32.dll) should be used to \a enabled.
@@ -215,55 +215,55 @@
*/
/*!
- \fn bool QPlatformInterface::Private::QWindowsApplication::registerMime(QWindowsMime *mime)
+ \fn bool QNativeInterface::Private::QWindowsApplication::registerMime(QWindowsMime *mime)
Registers the converter \a mime to the system.
- \sa QPlatformInterface::Private::QWindowsMime, unregisterMime()
+ \sa QNativeInterface::Private::QWindowsMime, unregisterMime()
*/
/*!
- \fn void QPlatformInterface::Private::QWindowsApplication::unregisterMime(QWindowsMime *mime)
+ \fn void QNativeInterface::Private::QWindowsApplication::unregisterMime(QWindowsMime *mime)
Unregisters the converter \a mime from the system.
- \sa QPlatformInterface::Private::QWindowsMime, registerMime()
+ \sa QNativeInterface::Private::QWindowsMime, registerMime()
*/
/*!
- \fn int QPlatformInterface::Private::QWindowsApplication::registerMimeType(const QString &mime)
+ \fn int QNativeInterface::Private::QWindowsApplication::registerMimeType(const QString &mime)
Registers the MIME type \a mime, and returns an ID number
identifying the format on Windows.
*/
/*!
- \fn HWND QPlatformInterface::Private::QWindowsApplication::createMessageWindow(const QString &, const QString &, QFunctionPointer) const
+ \fn HWND QNativeInterface::Private::QWindowsApplication::createMessageWindow(const QString &, const QString &, QFunctionPointer) const
\internal
*/
/*!
- \fn bool QPlatformInterface::Private::QWindowsApplication::asyncExpose() const
+ \fn bool QNativeInterface::Private::QWindowsApplication::asyncExpose() const
\internal
*/
/*!
- \fn void QPlatformInterface::Private::QWindowsApplication::setAsyncExpose(bool)
+ \fn void QNativeInterface::Private::QWindowsApplication::setAsyncExpose(bool)
\internal
*/
/*!
- \fn QVariant QPlatformInterface::Private::QWindowsApplication::gpu()
+ \fn QVariant QNativeInterface::Private::QWindowsApplication::gpu()
\internal
*/
/*!
- \fn QVariant QPlatformInterface::Private::QWindowsApplication::gpuList()
+ \fn QVariant QNativeInterface::Private::QWindowsApplication::gpuList()
\internal
*/
/*!
- \class QPlatformInterface::Private::QWindowsMime
+ \class QNativeInterface::Private::QWindowsMime
\since 6.0
\brief The QWindowsMime class maps open-standard MIME to Window Clipboard formats.
\inmodule QtGui
@@ -305,13 +305,13 @@
*/
/*!
- \fn QPlatformInterface::Private::QWindowsMime::~QWindowsMime()
+ \fn QNativeInterface::Private::QWindowsMime::~QWindowsMime()
Destroys the conversion object.
*/
/*!
- \fn bool QPlatformInterface::Private::QWindowsMime::canConvertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const
+ \fn bool QNativeInterface::Private::QWindowsMime::canConvertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData) const
Returns \c true if the converter can convert from the \a mimeData to
the format specified in \a formatetc.
@@ -320,7 +320,7 @@
*/
/*!
- \fn bool QPlatformInterface::Private::QWindowsMime::canConvertToMime(const QString &mimeType, IDataObject *pDataObj) const
+ \fn bool QNativeInterface::Private::QWindowsMime::canConvertToMime(const QString &mimeType, IDataObject *pDataObj) const
Returns \c true if the converter can convert to the \a mimeType from
the available formats in \a pDataObj.
@@ -329,7 +329,7 @@
*/
/*!
- \fn QString QPlatformInterface::Private::QWindowsMime::mimeForFormat(const FORMATETC &formatetc) const
+ \fn QString QNativeInterface::Private::QWindowsMime::mimeForFormat(const FORMATETC &formatetc) const
Returns the mime type that will be created form the format specified
in \a formatetc, or an empty string if this converter does not support
@@ -339,7 +339,7 @@
*/
/*!
- \fn QList<FORMATETC> QPlatformInterface::Private::QWindowsMime::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
+ \fn QList<FORMATETC> QNativeInterface::Private::QWindowsMime::formatsForMime(const QString &mimeType, const QMimeData *mimeData) const
Returns a QList of FORMATETC structures representing the different windows clipboard
formats that can be provided for the \a mimeType from the \a mimeData.
@@ -348,7 +348,7 @@
*/
/*!
- \fn QVariant QPlatformInterface::Private::QWindowsMime::convertToMime(const QString &mimeType, IDataObject *pDataObj,
+ \fn QVariant QNativeInterface::Private::QWindowsMime::convertToMime(const QString &mimeType, IDataObject *pDataObj,
QVariant::Type preferredType) const
Returns a QVariant containing the converted data for \a mimeType from \a pDataObj.
@@ -358,7 +358,7 @@
*/
/*!
- \fn bool QPlatformInterface::Private::QWindowsMime::convertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData, STGMEDIUM * pmedium) const
+ \fn bool QNativeInterface::Private::QWindowsMime::convertFromMime(const FORMATETC &formatetc, const QMimeData *mimeData, STGMEDIUM * pmedium) const
Convert the \a mimeData to the format specified in \a formatetc.
The converted data should then be placed in \a pmedium structure.
@@ -369,7 +369,7 @@
*/
/*!
- \class QPlatformInterface::Private::QWindowsWindow
+ \class QNativeInterface::Private::QWindowsWindow
\since 6.0
\brief Native interface to QPlatformWindow.
\inmodule QtGui
@@ -377,7 +377,7 @@
*/
/*!
- \fn void QPlatformInterface::Private::QWindowsWindow::setHasBorderInFullScreen(bool border)
+ \fn void QNativeInterface::Private::QWindowsWindow::setHasBorderInFullScreen(bool border)
Sets whether the WS_BORDER flag will be set for the window in full screen mode
to \a border.
@@ -386,27 +386,27 @@
*/
/*!
- \fn bool QPlatformInterface::Private::QWindowsWindow::hasBorderInFullScreen() const
+ \fn bool QNativeInterface::Private::QWindowsWindow::hasBorderInFullScreen() const
Returns whether the WS_BORDER flag will be set for the window in full screen
mode.
*/
/*!
- \fn QMargins QPlatformInterface::Private::QWindowsWindow::customMargins() const
+ \fn QMargins QNativeInterface::Private::QWindowsWindow::customMargins() const
Returns the margin to be used when handling the \c WM_NCCALCSIZE message.
*/
/*!
- \fn void QPlatformInterface::Private::QWindowsWindow::setCustomMargins(const QMargins &margins)
+ \fn void QNativeInterface::Private::QWindowsWindow::setCustomMargins(const QMargins &margins)
Sets the\a margins to be used when handling the \c WM_NCCALCSIZE message. It is
possible to remove a frame border by specifying a negative value.
*/
/*!
- \class QPlatformInterface::Private::QXcbScreen
+ \class QNativeInterface::Private::QXcbScreen
\since 6.0
\brief Native interface to QPlatformScreen.
\inmodule QtGui
@@ -414,7 +414,7 @@
*/
/*!
- \class QPlatformInterface::Private::QXcbWindow
+ \class QNativeInterface::Private::QXcbWindow
\since 6.0
\brief Native interface to QPlatformWindow.
\inmodule QtGui
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h
index ea791326cd..2471bb9e56 100644
--- a/src/gui/kernel/qguiapplication_p.h
+++ b/src/gui/kernel/qguiapplication_p.h
@@ -350,9 +350,9 @@ private:
static qreal m_maxDevicePixelRatio;
};
-// ----------------- QPlatformInterface -----------------
+// ----------------- QNativeInterface -----------------
-namespace QPlatformInterface::Private {
+namespace QNativeInterface::Private {
#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
@@ -360,7 +360,7 @@ class QWindowsMime;
struct Q_GUI_EXPORT QWindowsApplication
{
- QT_DECLARE_PLATFORM_INTERFACE(QWindowsApplication)
+ QT_DECLARE_NATIVE_INTERFACE(QWindowsApplication)
enum WindowActivationBehavior {
DefaultActivateWindow,
@@ -415,11 +415,11 @@ struct Q_GUI_EXPORT QWindowsApplication
};
#endif // Q_OS_WIN
-} // QPlatformInterface::Private
+} // QNativeInterface::Private
#if defined(Q_OS_WIN)
-Q_DECLARE_OPERATORS_FOR_FLAGS(QPlatformInterface::Private::QWindowsApplication::TouchWindowTouchTypes)
-Q_DECLARE_OPERATORS_FOR_FLAGS(QPlatformInterface::Private::QWindowsApplication::DarkModeHandling)
+Q_DECLARE_OPERATORS_FOR_FLAGS(QNativeInterface::Private::QWindowsApplication::TouchWindowTouchTypes)
+Q_DECLARE_OPERATORS_FOR_FLAGS(QNativeInterface::Private::QWindowsApplication::DarkModeHandling)
#endif
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qkeymapper_p.h b/src/gui/kernel/qkeymapper_p.h
index fea671cf40..65d1c229ca 100644
--- a/src/gui/kernel/qkeymapper_p.h
+++ b/src/gui/kernel/qkeymapper_p.h
@@ -72,8 +72,7 @@ public:
static void changeKeyboard();
static QList<int> possibleKeys(QKeyEvent *e);
- template <typename T>
- T *platformInterface() const;
+ QT_DECLARE_NATIVE_INTERFACE_ACCESSOR
private:
friend QKeyMapperPrivate *qt_keymapper_private();
@@ -99,20 +98,20 @@ public:
QKeyMapperPrivate *qt_keymapper_private(); // from qkeymapper.cpp
-// ----------------- QPlatformInterface -----------------
+// ----------------- QNativeInterface -----------------
-namespace QPlatformInterface::Private {
+namespace QNativeInterface::Private {
#if QT_CONFIG(evdev) || defined(Q_CLANG_QDOC)
struct Q_GUI_EXPORT QEvdevKeyMapper
{
- QT_DECLARE_PLATFORM_INTERFACE(QEvdevKeyMapper)
+ QT_DECLARE_NATIVE_INTERFACE(QEvdevKeyMapper)
virtual void loadKeymap(const QString &filename) = 0;
virtual void switchLang() = 0;
};
#endif
-} // QPlatformInterface::Private
+} // QNativeInterface::Private
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qoffscreensurface.cpp b/src/gui/kernel/qoffscreensurface.cpp
index 9875911d30..3144bc6f8c 100644
--- a/src/gui/kernel/qoffscreensurface.cpp
+++ b/src/gui/kernel/qoffscreensurface.cpp
@@ -52,12 +52,12 @@ QT_BEGIN_NAMESPACE
/*!
- \fn T QOffScreenSurface::platformInterface<T>()
+ \fn template <typename NativeInterface> NativeInterface *QOffScreenSurface::nativeInterface()
- Returns a platform interface of type T for the surface.
+ Returns a native interface of type \c NativeInterface for the surface.
This function provides access to platform specific functionality
- of QOffScreenSurface, as defined in the QPlatformInterface namespace.
+ of QOffScreenSurface, as defined in the QNativeInterface namespace.
If the requested interface is not available a \nullptr is returned.
*/
diff --git a/src/gui/kernel/qoffscreensurface.h b/src/gui/kernel/qoffscreensurface.h
index fe8db44633..3fc850a79d 100644
--- a/src/gui/kernel/qoffscreensurface.h
+++ b/src/gui/kernel/qoffscreensurface.h
@@ -79,8 +79,7 @@ public:
QPlatformOffscreenSurface *handle() const;
- template <typename T>
- T *platformInterface() const;
+ QT_DECLARE_NATIVE_INTERFACE_ACCESSOR
Q_SIGNALS:
void screenChanged(QScreen *screen);
diff --git a/src/gui/kernel/qoffscreensurface_platform.h b/src/gui/kernel/qoffscreensurface_platform.h
index c991ec0122..a122891ee4 100644
--- a/src/gui/kernel/qoffscreensurface_platform.h
+++ b/src/gui/kernel/qoffscreensurface_platform.h
@@ -49,18 +49,18 @@ QT_FORWARD_DECLARE_CLASS(ANativeWindow);
QT_BEGIN_NAMESPACE
-namespace QPlatformInterface {
+namespace QNativeInterface {
#if defined(Q_OS_ANDROID)
struct Q_GUI_EXPORT QAndroidOffscreenSurface
{
- QT_DECLARE_PLATFORM_INTERFACE(QAndroidOffscreenSurface)
+ QT_DECLARE_NATIVE_INTERFACE(QAndroidOffscreenSurface)
static QOffscreenSurface *fromNative(ANativeWindow *nativeSurface);
virtual ANativeWindow *nativeSurface() const = 0;
};
#endif
-} // QPlatformInterface
+} // QNativeInterface
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 81ab994f10..490d082fd4 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -347,12 +347,12 @@ void QOpenGLContextPrivate::_q_screenDestroyed(QObject *object)
}
/*!
- \fn template <typename T> T *QOpenGLContext::platformInterface() const
+ \fn template <typename NativeInterface> NativeInterface *QOpenGLContext::nativeInterface() const
- Returns a platform interface of type T for the context.
+ Returns a native interface of type \c NativeInterface for the context.
This function provides access to platform specific functionality
- of QOpenGLContext, as defined in the QPlatformInterface namespace.
+ of QOpenGLContext, as defined in the QNativeInterface namespace.
If the requested interface is not available a \nullptr is returned.
*/
diff --git a/src/gui/kernel/qopenglcontext.h b/src/gui/kernel/qopenglcontext.h
index 24adb1910b..60f3e3d03a 100644
--- a/src/gui/kernel/qopenglcontext.h
+++ b/src/gui/kernel/qopenglcontext.h
@@ -152,8 +152,7 @@ public:
static bool supportsThreadedOpenGL();
static QOpenGLContext *globalShareContext();
- template <typename T>
- T *platformInterface() const;
+ QT_DECLARE_NATIVE_INTERFACE_ACCESSOR
Q_SIGNALS:
void aboutToBeDestroyed();
diff --git a/src/gui/kernel/qopenglcontext_platform.h b/src/gui/kernel/qopenglcontext_platform.h
index 1b03325c7f..c498c19437 100644
--- a/src/gui/kernel/qopenglcontext_platform.h
+++ b/src/gui/kernel/qopenglcontext_platform.h
@@ -64,12 +64,12 @@ typedef void *NSOpenGLContext;
QT_BEGIN_NAMESPACE
-namespace QPlatformInterface {
+namespace QNativeInterface {
#if defined(Q_OS_MACOS) || defined(Q_CLANG_QDOC)
struct Q_GUI_EXPORT QCocoaGLContext
{
- QT_DECLARE_PLATFORM_INTERFACE(QCocoaGLContext)
+ QT_DECLARE_NATIVE_INTERFACE(QCocoaGLContext)
static QOpenGLContext *fromNative(QT_IGNORE_DEPRECATIONS(NSOpenGLContext) *, QOpenGLContext *shareContext = nullptr);
virtual QT_IGNORE_DEPRECATIONS(NSOpenGLContext) *nativeContext() const = 0;
};
@@ -78,7 +78,7 @@ struct Q_GUI_EXPORT QCocoaGLContext
#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
struct Q_GUI_EXPORT QWGLContext
{
- QT_DECLARE_PLATFORM_INTERFACE(QWGLContext)
+ QT_DECLARE_NATIVE_INTERFACE(QWGLContext)
static HMODULE openGLModuleHandle();
static QOpenGLContext *fromNative(HGLRC context, HWND window, QOpenGLContext *shareContext = nullptr);
virtual HGLRC nativeContext() const = 0;
@@ -88,7 +88,7 @@ struct Q_GUI_EXPORT QWGLContext
#if defined(Q_OS_LINUX) || defined(Q_CLANG_QDOC)
struct Q_GUI_EXPORT QGLXContext
{
- QT_DECLARE_PLATFORM_INTERFACE(QGLXContext)
+ QT_DECLARE_NATIVE_INTERFACE(QGLXContext)
static QOpenGLContext *fromNative(GLXContext configBasedContext, QOpenGLContext *shareContext = nullptr);
static QOpenGLContext *fromNative(GLXContext visualBasedContext, void *visualInfo, QOpenGLContext *shareContext = nullptr);
virtual GLXContext nativeContext() const = 0;
@@ -98,13 +98,13 @@ struct Q_GUI_EXPORT QGLXContext
#if QT_CONFIG(egl)
struct Q_GUI_EXPORT QEGLContext
{
- QT_DECLARE_PLATFORM_INTERFACE(QEGLContext)
+ QT_DECLARE_NATIVE_INTERFACE(QEGLContext)
static QOpenGLContext *fromNative(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext = nullptr);
virtual EGLContext nativeContext() const = 0;
};
#endif
-} // QPlatformInterface
+} // QNativeInterface
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformintegration.h b/src/gui/kernel/qplatformintegration.h
index 5083542e12..c8438a6c24 100644
--- a/src/gui/kernel/qplatformintegration.h
+++ b/src/gui/kernel/qplatformintegration.h
@@ -81,7 +81,7 @@ class QOffscreenSurface;
class QPlatformVulkanInstance;
class QVulkanInstance;
-namespace QPlatformInterface::Private {
+namespace QNativeInterface::Private {
template <typename R, typename I, auto func, typename... Args>
struct QInterfaceProxyImp
@@ -103,7 +103,7 @@ struct QInterfaceProxy<func> : public QInterfaceProxyImp<R, I, func, Args...> {}
template <typename R, typename I, typename... Args, R(I::*func)(Args...) const>
struct QInterfaceProxy<func> : public QInterfaceProxyImp<R, I, func, Args...> {};
-} // QPlatformInterface::Private
+} // QNativeInterface::Private
class Q_GUI_EXPORT QPlatformIntegration
{
@@ -229,7 +229,7 @@ public:
template <auto func, typename... Args>
auto call(Args... args)
{
- using namespace QPlatformInterface::Private;
+ using namespace QNativeInterface::Private;
return QInterfaceProxy<func>::apply(this, args...);
}
diff --git a/src/gui/kernel/qplatformmenu_p.h b/src/gui/kernel/qplatformmenu_p.h
index 40aef4bfd4..feba5aa9ff 100644
--- a/src/gui/kernel/qplatformmenu_p.h
+++ b/src/gui/kernel/qplatformmenu_p.h
@@ -55,7 +55,7 @@
QT_BEGIN_NAMESPACE
-// ----------------- QPlatformInterface -----------------
+// ----------------- QNativeInterface -----------------
#if !defined(Q_OS_MACOS) && defined(Q_CLANG_QDOC)
typedef void NSMenu;
@@ -65,24 +65,24 @@ Q_FORWARD_DECLARE_OBJC_CLASS(NSMenu);
QT_BEGIN_NAMESPACE
#endif
-namespace QPlatformInterface::Private {
+namespace QNativeInterface::Private {
#if defined(Q_OS_MACOS) || defined(Q_CLANG_QDOC)
struct Q_GUI_EXPORT QCocoaMenu
{
- QT_DECLARE_PLATFORM_INTERFACE(QCocoaMenu)
+ QT_DECLARE_NATIVE_INTERFACE(QCocoaMenu)
virtual NSMenu *nsMenu() const = 0;
virtual void setAsDockMenu() const = 0;
};
struct Q_GUI_EXPORT QCocoaMenuBar
{
- QT_DECLARE_PLATFORM_INTERFACE(QCocoaMenuBar)
+ QT_DECLARE_NATIVE_INTERFACE(QCocoaMenuBar)
virtual NSMenu *nsMenu() const = 0;
};
#endif
-} // QPlatformInterface::Private
+} // QNativeInterface::Private
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformoffscreensurface.h b/src/gui/kernel/qplatformoffscreensurface.h
index 1d06336956..06fa80b994 100644
--- a/src/gui/kernel/qplatformoffscreensurface.h
+++ b/src/gui/kernel/qplatformoffscreensurface.h
@@ -81,23 +81,23 @@ private:
Q_DISABLE_COPY(QPlatformOffscreenSurface)
};
-template <typename T>
-T *QOffscreenSurface::platformInterface() const
+template <typename NativeInterface>
+NativeInterface *QOffscreenSurface::nativeInterface() const
{
- return dynamic_cast<T*>(surfaceHandle());
+ return dynamic_cast<NativeInterface*>(surfaceHandle());
}
-namespace QPlatformInterface::Private {
+namespace QNativeInterface::Private {
#if defined(Q_OS_ANDROID)
struct Q_GUI_EXPORT QAndroidOffScreenIntegration
{
- QT_DECLARE_PLATFORM_INTERFACE(QAndroidOffScreenIntegration)
+ QT_DECLARE_NATIVE_INTERFACE(QAndroidOffScreenIntegration)
virtual QOffscreenSurface *createOffscreenSurface(ANativeWindow *nativeSurface) const = 0;
};
#endif
-} // QPlatformInterface::Private
+} // QNativeInterface::Private
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformopenglcontext.h b/src/gui/kernel/qplatformopenglcontext.h
index 8c38d88b56..f5d7461394 100644
--- a/src/gui/kernel/qplatformopenglcontext.h
+++ b/src/gui/kernel/qplatformopenglcontext.h
@@ -102,18 +102,18 @@ private:
Q_DISABLE_COPY(QPlatformOpenGLContext)
};
-template <typename T>
-T *QOpenGLContext::platformInterface() const
+template <typename NativeInterface>
+NativeInterface *QOpenGLContext::nativeInterface() const
{
- return dynamic_cast<T*>(handle());
+ return dynamic_cast<NativeInterface*>(handle());
}
-namespace QPlatformInterface::Private {
+namespace QNativeInterface::Private {
#if defined(Q_OS_MACOS)
struct Q_GUI_EXPORT QCocoaGLIntegration
{
- QT_DECLARE_PLATFORM_INTERFACE(QCocoaGLIntegration)
+ QT_DECLARE_NATIVE_INTERFACE(QCocoaGLIntegration)
virtual QOpenGLContext *createOpenGLContext(NSOpenGLContext *, QOpenGLContext *shareContext) const = 0;
};
#endif
@@ -121,7 +121,7 @@ struct Q_GUI_EXPORT QCocoaGLIntegration
#if defined(Q_OS_WIN)
struct Q_GUI_EXPORT QWindowsGLIntegration
{
- QT_DECLARE_PLATFORM_INTERFACE(QWindowsGLIntegration)
+ QT_DECLARE_NATIVE_INTERFACE(QWindowsGLIntegration)
virtual HMODULE openGLModuleHandle() const = 0;
virtual QOpenGLContext *createOpenGLContext(HGLRC context, HWND window, QOpenGLContext *shareContext) const = 0;
};
@@ -130,7 +130,7 @@ struct Q_GUI_EXPORT QWindowsGLIntegration
#if defined(Q_OS_LINUX)
struct Q_GUI_EXPORT QGLXIntegration
{
- QT_DECLARE_PLATFORM_INTERFACE(QGLXIntegration)
+ QT_DECLARE_NATIVE_INTERFACE(QGLXIntegration)
virtual QOpenGLContext *createOpenGLContext(GLXContext context, void *visualInfo, QOpenGLContext *shareContext) const = 0;
};
#endif
@@ -138,12 +138,12 @@ struct Q_GUI_EXPORT QGLXIntegration
#if QT_CONFIG(egl)
struct Q_GUI_EXPORT QEGLIntegration
{
- QT_DECLARE_PLATFORM_INTERFACE(QEGLIntegration)
+ QT_DECLARE_NATIVE_INTERFACE(QEGLIntegration)
virtual QOpenGLContext *createOpenGLContext(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext) const = 0;
};
#endif
-} // QPlatformInterface::Private
+} // QNativeInterface::Private
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformscreen_p.h b/src/gui/kernel/qplatformscreen_p.h
index 2f09c1de37..340f637dd9 100644
--- a/src/gui/kernel/qplatformscreen_p.h
+++ b/src/gui/kernel/qplatformscreen_p.h
@@ -65,14 +65,14 @@ public:
QPointer<QScreen> screen;
};
-// ----------------- QPlatformInterface -----------------
+// ----------------- QNativeInterface -----------------
-namespace QPlatformInterface::Private {
+namespace QNativeInterface::Private {
#if QT_CONFIG(xcb)
struct Q_GUI_EXPORT QXcbScreen
{
- QT_DECLARE_PLATFORM_INTERFACE(QXcbScreen)
+ QT_DECLARE_NATIVE_INTERFACE(QXcbScreen)
virtual int virtualDesktopNumber() const = 0;
};
#endif
@@ -80,7 +80,7 @@ struct Q_GUI_EXPORT QXcbScreen
#if QT_CONFIG(vsp2)
struct Q_GUI_EXPORT QVsp2Screen
{
- QT_DECLARE_PLATFORM_INTERFACE(QVsp2Screen)
+ QT_DECLARE_NATIVE_INTERFACE(QVsp2Screen)
virtual int addLayer(int dmabufFd, const QSize &size, const QPoint &position, uint drmPixelFormat, uint bytesPerLine) = 0;
virtual void setLayerBuffer(int id, int dmabufFd) = 0;
virtual void setLayerPosition(int id, const QPoint &position) = 0;
@@ -90,7 +90,7 @@ struct Q_GUI_EXPORT QVsp2Screen
};
#endif
-} // QPlatformInterface::Private
+} // QNativeInterface::Private
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qplatformwindow_p.h b/src/gui/kernel/qplatformwindow_p.h
index 7d459556fd..ffc3879bf1 100644
--- a/src/gui/kernel/qplatformwindow_p.h
+++ b/src/gui/kernel/qplatformwindow_p.h
@@ -66,14 +66,14 @@ public:
QBasicTimer updateTimer;
};
-// ----------------- QPlatformInterface -----------------
+// ----------------- QNativeInterface -----------------
-namespace QPlatformInterface::Private {
+namespace QNativeInterface::Private {
#if defined(Q_OS_MACOS) || defined(Q_CLANG_QDOC)
struct Q_GUI_EXPORT QCocoaWindow
{
- QT_DECLARE_PLATFORM_INTERFACE(QCocoaWindow)
+ QT_DECLARE_NATIVE_INTERFACE(QCocoaWindow)
virtual void setContentBorderEnabled(bool enable) = 0;
virtual QPoint bottomLeftClippedByNSWindowOffset() const = 0;
};
@@ -82,7 +82,7 @@ struct Q_GUI_EXPORT QCocoaWindow
#if QT_CONFIG(xcb) || defined(Q_CLANG_QDOC)
struct Q_GUI_EXPORT QXcbWindow
{
- QT_DECLARE_PLATFORM_INTERFACE(QXcbWindow)
+ QT_DECLARE_NATIVE_INTERFACE(QXcbWindow)
enum WindowType {
None = 0x000000,
@@ -114,7 +114,7 @@ struct Q_GUI_EXPORT QXcbWindow
#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
struct Q_GUI_EXPORT QWindowsWindow
{
- QT_DECLARE_PLATFORM_INTERFACE(QWindowsWindow)
+ QT_DECLARE_NATIVE_INTERFACE(QWindowsWindow)
virtual void setHasBorderInFullScreen(bool border) = 0;
virtual bool hasBorderInFullScreen() const = 0;
@@ -124,7 +124,7 @@ struct Q_GUI_EXPORT QWindowsWindow
};
#endif // Q_OS_WIN
-} // QPlatformInterface::Private
+} // QNativeInterface::Private
QT_END_NAMESPACE
diff --git a/src/gui/opengl/platform/egl/qeglplatformcontext_p.h b/src/gui/opengl/platform/egl/qeglplatformcontext_p.h
index 899f4b5c9f..5f399c6994 100644
--- a/src/gui/opengl/platform/egl/qeglplatformcontext_p.h
+++ b/src/gui/opengl/platform/egl/qeglplatformcontext_p.h
@@ -61,7 +61,7 @@
QT_BEGIN_NAMESPACE
class Q_GUI_EXPORT QEGLPlatformContext : public QPlatformOpenGLContext,
- public QPlatformInterface::QEGLContext
+ public QNativeInterface::QEGLContext
{
public:
enum Flag {
diff --git a/src/gui/platform/android/qandroidplatforminterface.cpp b/src/gui/platform/android/qandroidplatforminterface.cpp
index 0a2c708d7a..bdb322add0 100644
--- a/src/gui/platform/android/qandroidplatforminterface.cpp
+++ b/src/gui/platform/android/qandroidplatforminterface.cpp
@@ -45,13 +45,13 @@
QT_BEGIN_NAMESPACE
-using namespace QPlatformInterface::Private;
+using namespace QNativeInterface::Private;
#if defined(Q_OS_ANDROID)
-QT_DEFINE_PLATFORM_INTERFACE(QAndroidOffscreenSurface, QOffscreenSurface);
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QAndroidOffScreenIntegration);
+QT_DEFINE_NATIVE_INTERFACE(QAndroidOffscreenSurface, QOffscreenSurface);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QAndroidOffScreenIntegration);
-QOffscreenSurface *QPlatformInterface::QAndroidOffscreenSurface::fromNative(ANativeWindow *nativeSurface)
+QOffscreenSurface *QNativeInterface::QAndroidOffscreenSurface::fromNative(ANativeWindow *nativeSurface)
{
return QGuiApplicationPrivate::platformIntegration()->call<
&QAndroidOffScreenIntegration::createOffscreenSurface>(nativeSurface);
diff --git a/src/gui/platform/macos/qcocoaplatforminterface.mm b/src/gui/platform/macos/qcocoaplatforminterface.mm
index be9e8d18bf..c075a07e66 100644
--- a/src/gui/platform/macos/qcocoaplatforminterface.mm
+++ b/src/gui/platform/macos/qcocoaplatforminterface.mm
@@ -48,17 +48,17 @@
QT_BEGIN_NAMESPACE
-using namespace QPlatformInterface::Private;
+using namespace QNativeInterface::Private;
#ifndef QT_NO_OPENGL
-QT_DEFINE_PLATFORM_INTERFACE(QCocoaGLContext, QOpenGLContext);
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QCocoaGLIntegration);
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QCocoaWindow);
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QCocoaMenu);
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QCocoaMenuBar);
+QT_DEFINE_NATIVE_INTERFACE(QCocoaGLContext, QOpenGLContext);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QCocoaGLIntegration);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QCocoaWindow);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QCocoaMenu);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QCocoaMenuBar);
-QOpenGLContext *QPlatformInterface::QCocoaGLContext::fromNative(NSOpenGLContext *nativeContext, QOpenGLContext *shareContext)
+QOpenGLContext *QNativeInterface::QCocoaGLContext::fromNative(NSOpenGLContext *nativeContext, QOpenGLContext *shareContext)
{
return QGuiApplicationPrivate::platformIntegration()->call<
&QCocoaGLIntegration::createOpenGLContext>(nativeContext, shareContext);
diff --git a/src/gui/platform/unix/qunixplatforminterface.cpp b/src/gui/platform/unix/qunixplatforminterface.cpp
index 55650e3efc..378282936e 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());
}
diff --git a/src/gui/platform/windows/qwindowsmime_p.h b/src/gui/platform/windows/qwindowsmime_p.h
index 5d71b9ee94..71b1c8a87f 100644
--- a/src/gui/platform/windows/qwindowsmime_p.h
+++ b/src/gui/platform/windows/qwindowsmime_p.h
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
class QMimeData;
-namespace QPlatformInterface::Private {
+namespace QNativeInterface::Private {
class Q_GUI_EXPORT QWindowsMime
{
@@ -78,7 +78,7 @@ public:
virtual QString mimeForFormat(const FORMATETC &formatetc) const = 0;
};
-} // QPlatformInterface::Private
+} // QNativeInterface::Private
QT_END_NAMESPACE
diff --git a/src/gui/platform/windows/qwindowsplatforminterface.cpp b/src/gui/platform/windows/qwindowsplatforminterface.cpp
index e1aa3b6970..950c86d7fb 100644
--- a/src/gui/platform/windows/qwindowsplatforminterface.cpp
+++ b/src/gui/platform/windows/qwindowsplatforminterface.cpp
@@ -47,20 +47,20 @@
QT_BEGIN_NAMESPACE
-using namespace QPlatformInterface::Private;
+using namespace QNativeInterface::Private;
#ifndef QT_NO_OPENGL
-QT_DEFINE_PLATFORM_INTERFACE(QWGLContext, QOpenGLContext);
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QWindowsGLIntegration);
+QT_DEFINE_NATIVE_INTERFACE(QWGLContext, QOpenGLContext);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QWindowsGLIntegration);
-HMODULE QPlatformInterface::QWGLContext::openGLModuleHandle()
+HMODULE QNativeInterface::QWGLContext::openGLModuleHandle()
{
return QGuiApplicationPrivate::platformIntegration()->call<
&QWindowsGLIntegration::openGLModuleHandle>();
}
-QOpenGLContext *QPlatformInterface::QWGLContext::fromNative(HGLRC context, HWND window, QOpenGLContext *shareContext)
+QOpenGLContext *QNativeInterface::QWGLContext::fromNative(HGLRC context, HWND window, QOpenGLContext *shareContext)
{
return QGuiApplicationPrivate::platformIntegration()->call<
&QWindowsGLIntegration::createOpenGLContext>(context, window, shareContext);
@@ -68,7 +68,7 @@ QOpenGLContext *QPlatformInterface::QWGLContext::fromNative(HGLRC context, HWND
#endif // QT_NO_OPENGL
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QWindowsApplication);
-QT_DEFINE_PRIVATE_PLATFORM_INTERFACE(QWindowsWindow);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QWindowsApplication);
+QT_DEFINE_PRIVATE_NATIVE_INTERFACE(QWindowsWindow);
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/android/qandroidplatformintegration.h b/src/plugins/platforms/android/qandroidplatformintegration.h
index 012616839c..d579bc29ae 100644
--- a/src/plugins/platforms/android/qandroidplatformintegration.h
+++ b/src/plugins/platforms/android/qandroidplatformintegration.h
@@ -72,8 +72,8 @@ protected:
};
class QAndroidPlatformIntegration : public QPlatformIntegration
- , QPlatformInterface::Private::QEGLIntegration
- , QPlatformInterface::Private::QAndroidOffScreenIntegration
+ , QNativeInterface::Private::QEGLIntegration
+ , QNativeInterface::Private::QAndroidOffScreenIntegration
{
friend class QAndroidPlatformScreen;
diff --git a/src/plugins/platforms/android/qandroidplatformoffscreensurface.h b/src/plugins/platforms/android/qandroidplatformoffscreensurface.h
index 3eef727596..e57ab2afad 100644
--- a/src/plugins/platforms/android/qandroidplatformoffscreensurface.h
+++ b/src/plugins/platforms/android/qandroidplatformoffscreensurface.h
@@ -48,7 +48,7 @@
QT_BEGIN_NAMESPACE
class QOffscreenSurface;
class QAndroidPlatformOffscreenSurface : public QPlatformOffscreenSurface,
- public QPlatformInterface::QAndroidOffscreenSurface
+ public QNativeInterface::QAndroidOffscreenSurface
{
public:
QAndroidPlatformOffscreenSurface(ANativeWindow *nativeSurface, EGLDisplay display, QOffscreenSurface *offscreenSurface);
diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.h b/src/plugins/platforms/cocoa/qcocoaglcontext.h
index ab8e9d3012..633b9256c8 100644
--- a/src/plugins/platforms/cocoa/qcocoaglcontext.h
+++ b/src/plugins/platforms/cocoa/qcocoaglcontext.h
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
class QCocoaWindow;
-class QCocoaGLContext : public QPlatformOpenGLContext, public QPlatformInterface::QCocoaGLContext
+class QCocoaGLContext : public QPlatformOpenGLContext, public QNativeInterface::QCocoaGLContext
{
public:
QCocoaGLContext(QOpenGLContext *context);
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.h b/src/plugins/platforms/cocoa/qcocoaintegration.h
index 1e330344af..4f1969dd98 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.h
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.h
@@ -64,7 +64,7 @@ QT_BEGIN_NAMESPACE
class QCocoaIntegration : public QObject, public QPlatformIntegration
#ifndef QT_NO_OPENGL
- , public QPlatformInterface::Private::QCocoaGLIntegration
+ , public QNativeInterface::Private::QCocoaGLIntegration
#endif
{
Q_OBJECT
diff --git a/src/plugins/platforms/cocoa/qcocoamenu.h b/src/plugins/platforms/cocoa/qcocoamenu.h
index 6bd033bfeb..1bf9cface0 100644
--- a/src/plugins/platforms/cocoa/qcocoamenu.h
+++ b/src/plugins/platforms/cocoa/qcocoamenu.h
@@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
class QCocoaMenuBar;
class QCocoaMenu : public QPlatformMenu, public QCocoaMenuObject
- , public QPlatformInterface::Private::QCocoaMenu
+ , public QNativeInterface::Private::QCocoaMenu
{
public:
QCocoaMenu();
diff --git a/src/plugins/platforms/cocoa/qcocoamenubar.h b/src/plugins/platforms/cocoa/qcocoamenubar.h
index 94333e3bb1..7186e48829 100644
--- a/src/plugins/platforms/cocoa/qcocoamenubar.h
+++ b/src/plugins/platforms/cocoa/qcocoamenubar.h
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
class QCocoaWindow;
class QCocoaMenuBar : public QPlatformMenuBar
- , public QPlatformInterface::Private::QCocoaMenuBar
+ , public QNativeInterface::Private::QCocoaMenuBar
{
Q_OBJECT
public:
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.h b/src/plugins/platforms/cocoa/qcocoawindow.h
index d7c4a66514..9a2fa5f025 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.h
+++ b/src/plugins/platforms/cocoa/qcocoawindow.h
@@ -100,7 +100,7 @@ class QDebug;
class QCocoaMenuBar;
class QCocoaWindow : public QObject, public QPlatformWindow,
- public QPlatformInterface::Private::QCocoaWindow
+ public QNativeInterface::Private::QCocoaWindow
{
Q_OBJECT
public:
diff --git a/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h b/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h
index 9bc24f36f9..5ba24b107a 100644
--- a/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h
+++ b/src/plugins/platforms/eglfs/api/qeglfsintegration_p.h
@@ -70,10 +70,10 @@ class QEvdevKeyboardManager;
class Q_EGLFS_EXPORT QEglFSIntegration : public QPlatformIntegration, public QPlatformNativeInterface
#if QT_CONFIG(evdev)
- , public QPlatformInterface::Private::QEvdevKeyMapper
+ , public QNativeInterface::Private::QEvdevKeyMapper
#endif
#ifndef QT_NO_OPENGL
- , public QPlatformInterface::Private::QEGLIntegration
+ , public QNativeInterface::Private::QEGLIntegration
#endif
{
public:
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qeglfskmsvsp2screen.h b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qeglfskmsvsp2screen.h
index 369d175bcf..b3dfa77e1b 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qeglfskmsvsp2screen.h
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_vsp2/qeglfskmsvsp2screen.h
@@ -53,7 +53,7 @@
QT_BEGIN_NAMESPACE
class QEglFSKmsVsp2Screen : public QEglFSKmsScreen
- , public QPlatformInterface::Private::QVsp2Screen
+ , public QNativeInterface::Private::QVsp2Screen
{
public:
QEglFSKmsVsp2Screen(QEglFSKmsDevice *device, const QKmsOutput &output);
diff --git a/src/plugins/platforms/linuxfb/qlinuxfbintegration.h b/src/plugins/platforms/linuxfb/qlinuxfbintegration.h
index 1e671ee7fc..3481abb47d 100644
--- a/src/plugins/platforms/linuxfb/qlinuxfbintegration.h
+++ b/src/plugins/platforms/linuxfb/qlinuxfbintegration.h
@@ -53,7 +53,7 @@ class QEvdevKeyboardManager;
class QLinuxFbIntegration : public QPlatformIntegration, public QPlatformNativeInterface
#if QT_CONFIG(evdev)
- , public QPlatformInterface::Private::QEvdevKeyMapper
+ , public QNativeInterface::Private::QEvdevKeyMapper
#endif
{
public:
diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration_x11.h b/src/plugins/platforms/offscreen/qoffscreenintegration_x11.h
index 005ac26151..01a75510fb 100644
--- a/src/plugins/platforms/offscreen/qoffscreenintegration_x11.h
+++ b/src/plugins/platforms/offscreen/qoffscreenintegration_x11.h
@@ -90,7 +90,7 @@ private:
class QOffscreenX11GLXContextData;
class QOffscreenX11GLXContext : public QPlatformOpenGLContext
- , public QPlatformInterface::QGLXContext
+ , public QNativeInterface::QGLXContext
{
public:
QOffscreenX11GLXContext(QOffscreenX11Info *x11, QOpenGLContext *context);
diff --git a/src/plugins/platforms/windows/qwindowsapplication.cpp b/src/plugins/platforms/windows/qwindowsapplication.cpp
index fc495d999f..9997e0a903 100644
--- a/src/plugins/platforms/windows/qwindowsapplication.cpp
+++ b/src/plugins/platforms/windows/qwindowsapplication.cpp
@@ -112,13 +112,13 @@ void QWindowsApplication::setDarkModeHandling(QWindowsApplication::DarkModeHandl
m_darkModeHandling = handling;
}
-void QWindowsApplication::registerMime(QPlatformInterface::Private::QWindowsMime *mime)
+void QWindowsApplication::registerMime(QNativeInterface::Private::QWindowsMime *mime)
{
if (auto ctx = QWindowsContext::instance())
ctx->mimeConverter().registerMime(mime);
}
-void QWindowsApplication::unregisterMime(QPlatformInterface::Private::QWindowsMime *mime)
+void QWindowsApplication::unregisterMime(QNativeInterface::Private::QWindowsMime *mime)
{
if (auto ctx = QWindowsContext::instance())
ctx->mimeConverter().unregisterMime(mime);
diff --git a/src/plugins/platforms/windows/qwindowsapplication.h b/src/plugins/platforms/windows/qwindowsapplication.h
index 25a0cc7437..d57ce263c9 100644
--- a/src/plugins/platforms/windows/qwindowsapplication.h
+++ b/src/plugins/platforms/windows/qwindowsapplication.h
@@ -44,7 +44,7 @@
QT_BEGIN_NAMESPACE
-class QWindowsApplication : public QPlatformInterface::Private::QWindowsApplication
+class QWindowsApplication : public QNativeInterface::Private::QWindowsApplication
{
public:
void setTouchWindowTouchType(TouchWindowTouchTypes type) override;
@@ -62,8 +62,8 @@ public:
DarkModeHandling darkModeHandling() const override;
void setDarkModeHandling(DarkModeHandling handling) override;
- void registerMime(QPlatformInterface::Private::QWindowsMime *mime) override;
- void unregisterMime(QPlatformInterface::Private::QWindowsMime *mime) override;
+ void registerMime(QNativeInterface::Private::QWindowsMime *mime) override;
+ void unregisterMime(QNativeInterface::Private::QWindowsMime *mime) override;
int registerMimeType(const QString &mime) override;
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.h b/src/plugins/platforms/windows/qwindowsglcontext.h
index 2970f3d333..0e8383e5c0 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.h
+++ b/src/plugins/platforms/windows/qwindowsglcontext.h
@@ -200,7 +200,7 @@ public:
static QWindowsOpengl32DLL opengl32;
};
-class QWindowsGLContext : public QWindowsOpenGLContext, public QPlatformInterface::QWGLContext
+class QWindowsGLContext : public QWindowsOpenGLContext, public QNativeInterface::QWGLContext
{
public:
explicit QWindowsGLContext(QOpenGLStaticContext *staticContext, QOpenGLContext *context);
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index 6ec5f6e37f..74e6985980 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -183,8 +183,8 @@ bool parseIntOption(const QString &parameter,const QLatin1String &option,
return true;
}
-using DarkModeHandlingFlag = QPlatformInterface::Private::QWindowsApplication::DarkModeHandlingFlag;
-using DarkModeHandling = QPlatformInterface::Private::QWindowsApplication::DarkModeHandling;
+using DarkModeHandlingFlag = QNativeInterface::Private::QWindowsApplication::DarkModeHandlingFlag;
+using DarkModeHandling = QNativeInterface::Private::QWindowsApplication::DarkModeHandling;
static inline unsigned parseOptions(const QStringList &paramList,
int *tabletAbsoluteRange,
diff --git a/src/plugins/platforms/windows/qwindowsintegration.h b/src/plugins/platforms/windows/qwindowsintegration.h
index e0af1e6512..b5449b4a45 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.h
+++ b/src/plugins/platforms/windows/qwindowsintegration.h
@@ -58,7 +58,7 @@ class QWindowsStaticOpenGLContext;
class QWindowsIntegration : public QPlatformIntegration
#ifndef QT_NO_OPENGL
- , public QPlatformInterface::Private::QWindowsGLIntegration
+ , public QNativeInterface::Private::QWindowsGLIntegration
#endif
, public QWindowsApplication
{
diff --git a/src/plugins/platforms/windows/qwindowsmime.cpp b/src/plugins/platforms/windows/qwindowsmime.cpp
index 9c43045d6a..49bbe88d34 100644
--- a/src/plugins/platforms/windows/qwindowsmime.cpp
+++ b/src/plugins/platforms/windows/qwindowsmime.cpp
@@ -544,7 +544,7 @@ QDebug operator<<(QDebug d, IDataObject *dataObj)
All subclasses must reimplement this pure virtual function.
*/
-class QWindowsMimeText : public QPlatformInterface::Private::QWindowsMime
+class QWindowsMimeText : public QNativeInterface::Private::QWindowsMime
{
public:
bool canConvertToMime(const QString &mimeType, IDataObject *pDataObj) const override;
@@ -700,7 +700,7 @@ QVariant QWindowsMimeText::convertToMime(const QString &mime, LPDATAOBJECT pData
return ret;
}
-class QWindowsMimeURI : public QPlatformInterface::Private::QWindowsMime
+class QWindowsMimeURI : public QNativeInterface::Private::QWindowsMime
{
public:
QWindowsMimeURI();
@@ -866,7 +866,7 @@ QVariant QWindowsMimeURI::convertToMime(const QString &mimeType, LPDATAOBJECT pD
return QVariant();
}
-class QWindowsMimeHtml : public QPlatformInterface::Private::QWindowsMime
+class QWindowsMimeHtml : public QNativeInterface::Private::QWindowsMime
{
public:
QWindowsMimeHtml();
@@ -1004,7 +1004,7 @@ bool QWindowsMimeHtml::convertFromMime(const FORMATETC &formatetc, const QMimeDa
#ifndef QT_NO_IMAGEFORMAT_BMP
-class QWindowsMimeImage : public QPlatformInterface::Private::QWindowsMime
+class QWindowsMimeImage : public QNativeInterface::Private::QWindowsMime
{
public:
QWindowsMimeImage();
@@ -1158,7 +1158,7 @@ QVariant QWindowsMimeImage::convertToMime(const QString &mimeType, IDataObject *
}
#endif
-class QBuiltInMimes : public QPlatformInterface::Private::QWindowsMime
+class QBuiltInMimes : public QNativeInterface::Private::QWindowsMime
{
public:
QBuiltInMimes();
@@ -1279,7 +1279,7 @@ QString QBuiltInMimes::mimeForFormat(const FORMATETC &formatetc) const
}
-class QLastResortMimes : public QPlatformInterface::Private::QWindowsMime
+class QLastResortMimes : public QNativeInterface::Private::QWindowsMime
{
public:
diff --git a/src/plugins/platforms/windows/qwindowsmime.h b/src/plugins/platforms/windows/qwindowsmime.h
index 891ec44ecd..e131dba848 100644
--- a/src/plugins/platforms/windows/qwindowsmime.h
+++ b/src/plugins/platforms/windows/qwindowsmime.h
@@ -56,7 +56,7 @@ class QWindowsMimeConverter
{
Q_DISABLE_COPY_MOVE(QWindowsMimeConverter)
public:
- using QWindowsMime = QPlatformInterface::Private::QWindowsMime;
+ using QWindowsMime = QNativeInterface::Private::QWindowsMime;
QWindowsMimeConverter();
~QWindowsMimeConverter();
diff --git a/src/plugins/platforms/windows/qwindowswindow.h b/src/plugins/platforms/windows/qwindowswindow.h
index 827e4cc288..1f1af82da2 100644
--- a/src/plugins/platforms/windows/qwindowswindow.h
+++ b/src/plugins/platforms/windows/qwindowswindow.h
@@ -125,12 +125,12 @@ struct QWindowsWindowData
};
class QWindowsBaseWindow : public QPlatformWindow,
- public QPlatformInterface::Private::QWindowsWindow
+ public QNativeInterface::Private::QWindowsWindow
{
Q_DISABLE_COPY_MOVE(QWindowsBaseWindow)
public:
- using TouchWindowTouchType = QPlatformInterface::Private::QWindowsApplication::TouchWindowTouchType;
- using TouchWindowTouchTypes = QPlatformInterface::Private::QWindowsApplication::TouchWindowTouchTypes;
+ using TouchWindowTouchType = QNativeInterface::Private::QWindowsApplication::TouchWindowTouchType;
+ using TouchWindowTouchTypes = QNativeInterface::Private::QWindowsApplication::TouchWindowTouchTypes;
explicit QWindowsBaseWindow(QWindow *window) : QPlatformWindow(window) {}
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.h b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.h
index ddb4488105..be5c75aedc 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.h
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.h
@@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
class QXcbEglNativeInterfaceHandler;
class QXcbEglIntegration : public QXcbGlIntegration
- , public QPlatformInterface::Private::QEGLIntegration
+ , public QNativeInterface::Private::QEGLIntegration
{
public:
QXcbEglIntegration();
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h
index a7468c8fac..62a9247fd9 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h
@@ -54,7 +54,7 @@
QT_BEGIN_NAMESPACE
class QGLXContext : public QPlatformOpenGLContext,
- public QPlatformInterface::QGLXContext
+ public QNativeInterface::QGLXContext
{
public:
QGLXContext(Display *display, QXcbScreen *screen, const QSurfaceFormat &format, QPlatformOpenGLContext *share);
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h
index 18c1be9489..6b0c6dfee2 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
class QXcbNativeInterfaceHandler;
class QXcbGlxIntegration : public QXcbGlIntegration,
- public QPlatformInterface::Private::QGLXIntegration
+ public QNativeInterface::Private::QGLXIntegration
{
public:
QXcbGlxIntegration();
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index 5dd6fbe57a..89395cb21d 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -276,7 +276,7 @@ QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLCont
QOpenGLContext *QXcbIntegration::createOpenGLContext(GLXContext context, void *visualInfo, QOpenGLContext *shareContext) const
{
- using namespace QPlatformInterface::Private;
+ using namespace QNativeInterface::Private;
if (auto *glxIntegration = dynamic_cast<QGLXIntegration*>(m_connection->glIntegration()))
return glxIntegration->createOpenGLContext(context, visualInfo, shareContext);
else
@@ -286,7 +286,7 @@ QOpenGLContext *QXcbIntegration::createOpenGLContext(GLXContext context, void *v
#if QT_CONFIG(egl)
QOpenGLContext *QXcbIntegration::createOpenGLContext(EGLContext context, EGLDisplay display, QOpenGLContext *shareContext) const
{
- using namespace QPlatformInterface::Private;
+ using namespace QNativeInterface::Private;
if (auto *eglIntegration = dynamic_cast<QEGLIntegration*>(m_connection->glIntegration()))
return eglIntegration->createOpenGLContext(context, display, shareContext);
else
diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h
index 043dc13711..eb58433967 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.h
+++ b/src/plugins/platforms/xcb/qxcbintegration.h
@@ -57,9 +57,9 @@ class QXcbNativeInterface;
class Q_XCB_EXPORT QXcbIntegration : public QPlatformIntegration
#ifndef QT_NO_OPENGL
- , public QPlatformInterface::Private::QGLXIntegration
+ , public QNativeInterface::Private::QGLXIntegration
# if QT_CONFIG(egl)
- , public QPlatformInterface::Private::QEGLIntegration
+ , public QNativeInterface::Private::QEGLIntegration
# endif
#endif
{
diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h
index 9be3ce9e7f..267c8b8911 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.h
+++ b/src/plugins/platforms/xcb/qxcbscreen.h
@@ -139,7 +139,7 @@ private:
};
class Q_XCB_EXPORT QXcbScreen : public QXcbObject, public QPlatformScreen
- , public QPlatformInterface::Private::QXcbScreen
+ , public QNativeInterface::Private::QXcbScreen
{
public:
QXcbScreen(QXcbConnection *connection, QXcbVirtualDesktop *virtualDesktop,
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h
index c05e658652..5e5aa96629 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -57,7 +57,7 @@ class QXcbSyncWindowRequest;
class QIcon;
class Q_XCB_EXPORT QXcbWindow : public QXcbObject, public QXcbWindowEventListener, public QPlatformWindow
- , public QPlatformInterface::Private::QXcbWindow
+ , public QNativeInterface::Private::QXcbWindow
{
public:
enum NetWmState {
diff --git a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
index a324de0fc8..b0aab59d99 100644
--- a/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
+++ b/src/plugins/styles/windowsvista/qwindowsxpstyle.cpp
@@ -279,7 +279,7 @@ void QWindowsXPStylePrivate::cleanup(bool force)
static inline HWND createTreeViewHelperWindow()
{
- using QWindowsApplication = QPlatformInterface::Private::QWindowsApplication;
+ using QWindowsApplication = QNativeInterface::Private::QWindowsApplication;
HWND result = nullptr;
if (auto nativeWindowsApp = dynamic_cast<QWindowsApplication *>(QGuiApplicationPrivate::platformIntegration()))
diff --git a/src/widgets/dialogs/qwizard_win.cpp b/src/widgets/dialogs/qwizard_win.cpp
index 9575dc7fba..692583666d 100644
--- a/src/widgets/dialogs/qwizard_win.cpp
+++ b/src/widgets/dialogs/qwizard_win.cpp
@@ -168,7 +168,7 @@ QVistaHelper::~QVistaHelper()
void QVistaHelper::updateCustomMargins(bool vistaMargins)
{
- using namespace QPlatformInterface::Private;
+ using namespace QNativeInterface::Private;
if (QWindow *window = wizard->windowHandle()) {
// Reduce top frame to zero since we paint it ourselves. Use
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 8040560e7c..4bcc0f5df0 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -121,7 +121,7 @@
QT_BEGIN_NAMESPACE
-using namespace QPlatformInterface::Private;
+using namespace QNativeInterface::Private;
Q_LOGGING_CATEGORY(lcWidgetPainting, "qt.widgets.painting", QtWarningMsg);
diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp
index e3c2a54051..28a195bba8 100644
--- a/src/widgets/styles/qwindowsstyle.cpp
+++ b/src/widgets/styles/qwindowsstyle.cpp
@@ -133,7 +133,7 @@ bool QWindowsStylePrivate::isDarkMode()
{
bool result = false;
#ifdef Q_OS_WIN
- using QWindowsApplication = QPlatformInterface::Private::QWindowsApplication;
+ using QWindowsApplication = QNativeInterface::Private::QWindowsApplication;
// Windows only: Return whether dark mode style support is desired and
// dark mode is in effect.
if (auto windowsApp = dynamic_cast<QWindowsApplication *>(QGuiApplicationPrivate::platformIntegration())) {
diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp
index aa6706f0bb..8aa2c24592 100644
--- a/src/widgets/widgets/qmainwindow.cpp
+++ b/src/widgets/widgets/qmainwindow.cpp
@@ -1360,7 +1360,7 @@ void QMainWindow::setUnifiedTitleAndToolBarOnMac(bool enabled)
d->useUnifiedToolBar = enabled;
createWinId();
- using namespace QPlatformInterface::Private;
+ using namespace QNativeInterface::Private;
if (auto *platformWindow = dynamic_cast<QCocoaWindow*>(window()->windowHandle()->handle()))
platformWindow->setContentBorderEnabled(enabled);
diff --git a/src/widgets/widgets/qmenu_mac.mm b/src/widgets/widgets/qmenu_mac.mm
index 7bff4f3341..d6e09d9512 100644
--- a/src/widgets/widgets/qmenu_mac.mm
+++ b/src/widgets/widgets/qmenu_mac.mm
@@ -56,7 +56,7 @@ QT_USE_NAMESPACE
#include <qpa/qplatformnativeinterface.h>
#include <qpa/qplatformmenu_p.h>
-using namespace QPlatformInterface::Private;
+using namespace QNativeInterface::Private;
QT_BEGIN_NAMESPACE
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<QGLXContext>();
+ auto *glxContextIf = ctx0->nativeInterface<QGLXContext>();
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<QWGLContext>();
+ auto *wglContext = ctx->nativeInterface<QWGLContext>();
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<QEGLContext>();
+ using namespace QNativeInterface;
+ auto *eglContext = m_context->nativeInterface<QEGLContext>();
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<QEGLContext>()->nativeContext() == ctx);
+ Q_ASSERT(ctxWrap->nativeInterface<QEGLContext>()->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<QWindowsWindow *>(mainWindow->windowHandle()->handle()))
windowsWindow->setHasBorderInFullScreen(true);
mainWindow->showMaximized();