Make QtPlatformHeaders a private module

The APIs will be reintroduced as part of the new platform interface
API where appropriate.

Clients that still depend on the platform headers can include it
via QT += platformheaders-private.

Change-Id: Ifbd836d833d19f3cf48cd4f933d7fe754c06d2d9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Tor Arne Vestbø 2020-07-03 15:40:47 +02:00
parent 18cfabafa6
commit 8dd6957cd7
51 changed files with 185 additions and 42 deletions

View File

@ -1,2 +1,25 @@
# Generated from platformheaders.pro.
#####################################################################
## PlatformHeaders Module:
#####################################################################
qt_add_module(PlatformHeaders
HEADER_MODULE
SOURCES
cocoafunctions/qcocoawindowfunctions_p.h
eglfsfunctions/qeglfsfunctions_p.h
helper/qplatformheaderhelper_p.h
linuxfbfunctions/qlinuxfbfunctions_p.h
waylandfunctions/qwaylandwindowfunctions_p.h
windowsfunctions/qwindowswindowfunctions_p.h
xcbfunctions/qxcbscreenfunctions_p.h
xcbfunctions/qxcbwindowfunctions_p.h
PUBLIC_LIBRARIES
Qt::Core
Qt::Gui
)
qt_add_docs(PlatformHeaders
doc/qtplatformheaders.qdocconf
)

View File

@ -1,13 +1,27 @@
# Generated from platformheaders.pro.
# special case begin
# FIXME Add the rest of the stuff? I don't think any other stuff is needed?
qt_add_module(PlatformHeaders HEADER_MODULE)
#####################################################################
## PlatformHeaders Module:
#####################################################################
qt_add_module(PlatformHeaders
HEADER_MODULE
# special case begin
# SOURCES
# cocoafunctions/qcocoawindowfunctions_p.h
# eglfsfunctions/qeglfsfunctions_p.h
# helper/qplatformheaderhelper_p.h
# linuxfbfunctions/qlinuxfbfunctions_p.h
# waylandfunctions/qwaylandwindowfunctions_p.h
# windowsfunctions/qwindowswindowfunctions_p.h
# xcbfunctions/qxcbscreenfunctions_p.h
# xcbfunctions/qxcbwindowfunctions_p.h
# special case end
PUBLIC_LIBRARIES
Qt::Core
Qt::Gui
)
qt_add_docs(PlatformHeaders
doc/qtplatformheaders.qdocconf
)
# special case end

View File

@ -1 +1 @@
HEADERS += $$PWD/qcocoawindowfunctions.h
HEADERS += $$PWD/qcocoawindowfunctions_p.h

View File

@ -40,7 +40,18 @@
#ifndef QCOCOAWINDOWFUNCTIONS_H
#define QCOCOAWINDOWFUNCTIONS_H
#include <QtPlatformHeaders/QPlatformHeaderHelper>
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtPlatformHeaders/private/qplatformheaderhelper_p.h>
QT_BEGIN_NAMESPACE

View File

@ -49,7 +49,7 @@
****************************************************************************/
#include <QtWidgets>
#include <QtPlatformHeaders/qwindowswindowfunctions.h>
#include <QtPlatformHeaders/private/qwindowswindowfunctions_p.h>
//! [0]
int main(int argc, char **argv)

View File

@ -49,7 +49,7 @@
****************************************************************************/
#include <QtWidgets>
#include <QtPlatformHeaders/qxcbwindowfunctions.h>
#include <QtPlatformHeaders/private/qxcbwindowfunctions_p.h>
//! [0]
int main(int argc, char **argv)

View File

@ -1 +1 @@
HEADERS += $$PWD/qeglfsfunctions.h
HEADERS += $$PWD/qeglfsfunctions_p.h

View File

@ -40,6 +40,17 @@
#ifndef QEGLFSFUNCTIONS_H
#define QEGLFSFUNCTIONS_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/QByteArray>
#include <QtGui/QGuiApplication>

View File

@ -1,2 +1,2 @@
HEADERS += \
$$PWD/qplatformheaderhelper.h
$$PWD/qplatformheaderhelper_p.h

View File

@ -40,6 +40,17 @@
#ifndef QPLATFORMHEADERHELPER_H
#define QPLATFORMHEADERHELPER_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/QByteArray>
#include <QtGui/QGuiApplication>

View File

@ -1 +1 @@
HEADERS += $$PWD/qlinuxfbfunctions.h
HEADERS += $$PWD/qlinuxfbfunctions_p.h

View File

@ -40,6 +40,17 @@
#ifndef QLINUXFBFUNCTIONS_H
#define QLINUXFBFUNCTIONS_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/QByteArray>
#include <QtGui/QGuiApplication>

View File

@ -1,7 +1,5 @@
# Only headers here, no library is wanted.
TEMPLATE = subdirs
VERSION = $$MODULE_VERSION
MODULE_INCNAME = QtPlatformHeaders
TARGET = QtPlatformHeaders
CONFIG += header_module
include(xcbfunctions/xcbfunctions.pri)
include(eglfsfunctions/eglfsfunctions.pri)
@ -13,6 +11,4 @@ include(linuxfbfunctions/linuxfbfunctions.pri)
QMAKE_DOCS = $$PWD/doc/qtplatformheaders.qdocconf
load(qt_module_headers)
load(qt_docs)
load(qt_installs)
load(qt_module)

View File

@ -40,6 +40,17 @@
#ifndef QWAYLANDWINDOWFUNCTIONS_H
#define QWAYLANDWINDOWFUNCTIONS_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/QByteArray>
#include <QtGui/QGuiApplication>

View File

@ -1 +1 @@
HEADERS += $$PWD/qwaylandwindowfunctions.h
HEADERS += $$PWD/qwaylandwindowfunctions_p.h

View File

@ -40,6 +40,17 @@
#ifndef QWINDOWSWINDOWFUNCTIONS_H
#define QWINDOWSWINDOWFUNCTIONS_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtCore/QByteArray>
#include <QtGui/QGuiApplication>

View File

@ -1 +1 @@
HEADERS += $$PWD/qwindowswindowfunctions.h
HEADERS += $$PWD/qwindowswindowfunctions_p.h

View File

@ -40,7 +40,18 @@
#ifndef QXCBSCREENFUNCTIONS_H
#define QXCBSCREENFUNCTIONS_H
#include <QtPlatformHeaders/QPlatformHeaderHelper>
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtPlatformHeaders/private/qplatformheaderhelper_p.h>
QT_BEGIN_NAMESPACE

View File

@ -40,7 +40,18 @@
#ifndef QXCBWINDOWFUNCTIONS_H
#define QXCBWINDOWFUNCTIONS_H
#include <QtPlatformHeaders/QPlatformHeaderHelper>
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <QtPlatformHeaders/private/qplatformheaderhelper_p.h>
QT_BEGIN_NAMESPACE

View File

@ -1,3 +1,3 @@
HEADERS += \
$$PWD/qxcbwindowfunctions.h \
$$PWD/qxcbscreenfunctions.h
$$PWD/qxcbwindowfunctions_p.h \
$$PWD/qxcbscreenfunctions_p.h

View File

@ -58,6 +58,7 @@ qt_internal_add_plugin(QCocoaIntegrationPlugin
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
Qt::PlatformHeadersPrivate
)
# Resources:

View File

@ -64,6 +64,7 @@ qt_internal_add_plugin(QCocoaIntegrationPlugin
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
Qt::PlatformHeadersPrivate
)
# special case begin

View File

@ -99,7 +99,7 @@ LIBS += -framework AppKit -framework CoreServices -framework Carbon -framework I
DEFINES += QT_NO_FOREACH
QT += core-private gui-private
QT += core-private gui-private platformheaders-private
CONFIG += no_app_extension_api_only

View File

@ -64,7 +64,7 @@
#include <QtGui/private/qcoregraphics_p.h>
#include <QtPlatformHeaders/qcocoawindowfunctions.h>
#include <QtPlatformHeaders/private/qcocoawindowfunctions_p.h>
#if QT_CONFIG(vulkan)
#include <MoltenVK/mvk_vulkan.h>

View File

@ -1,7 +1,7 @@
TARGET = qdirect2d
QT += \
core-private gui-private
core-private gui-private platformheaders-private
LIBS += -ldwmapi -lversion -ld3d11 -ldxgi -ldxguid
QMAKE_USE_PRIVATE += gdi32 dwrite_2 d2d1_1

View File

@ -25,6 +25,7 @@ qt_add_module(EglFSDeviceIntegration
Qt::EglSupportPrivate
Qt::FbSupportPrivate
Qt::GuiPrivate
Qt::PlatformHeadersPrivate
)
#### Keys ignored in scope 2:.:.:eglfsdeviceintegration.pro:<TRUE>:
@ -91,6 +92,7 @@ qt_internal_add_plugin(QEglFSIntegrationPlugin
api
PUBLIC_LIBRARIES
Qt::EglFSDeviceIntegrationPrivate
Qt::PlatformHeadersPrivate
)
#### Keys ignored in scope 12:.:.:eglfs-plugin.pro:<TRUE>:

View File

@ -26,6 +26,7 @@ qt_add_module(EglFSDeviceIntegration
Qt::EglSupportPrivate
Qt::FbSupportPrivate
Qt::GuiPrivate
Qt::PlatformHeadersPrivate
EGL::EGL # special case
)
@ -98,6 +99,7 @@ qt_internal_add_plugin(QEglFSIntegrationPlugin
PUBLIC_LIBRARIES
Qt::CorePrivate # special case
Qt::EglFSDeviceIntegrationPrivate
Qt::PlatformHeadersPrivate
EGL::EGL # special case
)

View File

@ -94,7 +94,7 @@
#include <QtInputSupport/qintegrityhidmanager.h>
#endif
#include <QtPlatformHeaders/qeglfsfunctions.h>
#include <QtPlatformHeaders/private/qeglfsfunctions_p.h>
static void initResources()
{

View File

@ -52,7 +52,7 @@
#include <QtCore/QJsonArray>
#include <QtGui/qpa/qplatformwindow.h>
#include <QtGui/QScreen>
#include <QtPlatformHeaders/qeglfsfunctions.h>
#include <QtPlatformHeaders/private/qeglfsfunctions_p.h>
#include <xf86drm.h>
#include <xf86drmMode.h>

View File

@ -1,6 +1,6 @@
TARGET = qeglfs
QT += eglfsdeviceintegration-private
QT += eglfsdeviceintegration-private platformheaders-private
CONFIG += egl

View File

@ -10,6 +10,7 @@ MODULE = eglfsdeviceintegration
QT += \
core-private gui-private \
platformheaders-private \
devicediscovery_support-private \
fb_support-private egl_support-private

View File

@ -19,6 +19,7 @@ qt_internal_add_plugin(QLinuxFbIntegrationPlugin
Qt::FbSupportPrivate
Qt::Gui
Qt::GuiPrivate
Qt::PlatformHeadersPrivate
)
#### Keys ignored in scope 1:.:.:linuxfb.pro:<TRUE>:

View File

@ -20,6 +20,7 @@ qt_internal_add_plugin(QLinuxFbIntegrationPlugin
Qt::FbSupportPrivate
Qt::Gui
Qt::GuiPrivate
Qt::PlatformHeadersPrivate
)
#### Keys ignored in scope 1:.:.:linuxfb.pro:<TRUE>:

View File

@ -4,6 +4,7 @@ DEFINES += QT_NO_FOREACH
QT += \
core-private gui-private \
platformheaders-private \
fb_support-private
qtHaveModule(input_support-private): \

View File

@ -70,7 +70,7 @@
#include <QtInputSupport/private/qtslib_p.h>
#endif
#include <QtPlatformHeaders/qlinuxfbfunctions.h>
#include <QtPlatformHeaders/private/qlinuxfbfunctions_p.h>
QT_BEGIN_NAMESPACE

View File

@ -52,6 +52,7 @@ qt_internal_add_plugin(QWindowsIntegrationPlugin
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
Qt::PlatformHeadersPrivate
dwmapi
imm32
oleaut32

View File

@ -53,6 +53,7 @@ qt_internal_add_plugin(QWindowsIntegrationPlugin
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
Qt::PlatformHeadersPrivate
dwmapi
imm32
oleaut32

View File

@ -42,7 +42,7 @@
#include <QtGui/qfont.h>
#include <QtGui/qpa/qplatformnativeinterface.h>
#include <QtPlatformHeaders/qwindowswindowfunctions.h>
#include <QtPlatformHeaders/private/qwindowswindowfunctions_p.h>
QT_BEGIN_NAMESPACE

View File

@ -45,7 +45,7 @@
#include "qwindowscursor.h"
#include <qpa/qplatformwindow.h>
#include <QtPlatformHeaders/qwindowswindowfunctions.h>
#include <QtPlatformHeaders/private/qwindowswindowfunctions_p.h>
#if QT_CONFIG(vulkan)
#include "qwindowsvulkaninstance.h"

View File

@ -1,7 +1,7 @@
TARGET = qwindows
QT += \
core-private gui-private
core-private gui-private platformheaders-private
qtConfig(opengl): QT += opengl-private

View File

@ -42,6 +42,7 @@ qt_add_module(XcbQpa
PkgConfig::XKB_COMMON_X11
Qt::CorePrivate
Qt::GuiPrivate
Qt::PlatformHeadersPrivate
XCB::ICCCM
XCB::IMAGE
XCB::KEYSYMS
@ -141,6 +142,7 @@ qt_internal_add_plugin(QXcbIntegrationPlugin
PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
Qt::PlatformHeadersPrivate
Qt::XcbQpaPrivate
)

View File

@ -42,6 +42,7 @@ qt_add_module(XcbQpa
PkgConfig::XKB_COMMON_X11
Qt::CorePrivate
Qt::GuiPrivate
Qt::PlatformHeadersPrivate
XCB::ICCCM
XCB::IMAGE
XCB::KEYSYMS
@ -168,6 +169,7 @@ qt_internal_add_plugin(QXcbIntegrationPlugin
PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
Qt::PlatformHeadersPrivate
Qt::XcbQpaPrivate
)

View File

@ -53,8 +53,8 @@
#include <QtGui/qopenglcontext.h>
#include <QtGui/qscreen.h>
#include <QtPlatformHeaders/qxcbwindowfunctions.h>
#include <QtPlatformHeaders/qxcbscreenfunctions.h>
#include <QtPlatformHeaders/private/qxcbwindowfunctions_p.h>
#include <QtPlatformHeaders/private/qxcbscreenfunctions_p.h>
#include <stdio.h>

View File

@ -49,7 +49,7 @@
#include "qxcbobject.h"
#include <QtPlatformHeaders/qxcbwindowfunctions.h>
#include <QtPlatformHeaders/private/qxcbwindowfunctions_p.h>
QT_BEGIN_NAMESPACE

View File

@ -1,6 +1,6 @@
TARGET = qxcb
QT += core-private gui-private xcb_qpa_lib-private
QT += core-private gui-private xcb_qpa_lib-private platformheaders-private
DEFINES += QT_NO_FOREACH

View File

@ -3,7 +3,8 @@ CONFIG += no_module_headers internal_module
DEFINES += QT_NO_FOREACH
QT += \
core-private gui-private
core-private gui-private \
platformheaders-private
qtConfig(opengl): QT += opengl-private

View File

@ -57,6 +57,7 @@ qt_add_module(Widgets
LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
Qt::PlatformHeadersPrivate
PUBLIC_LIBRARIES
Qt::Core
Qt::Gui

View File

@ -57,6 +57,7 @@ qt_add_module(Widgets
LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
Qt::PlatformHeadersPrivate
PUBLIC_LIBRARIES
Qt::Core
Qt::Gui

View File

@ -3,6 +3,8 @@
# Only used on platforms with CONFIG += precompile_header
PRECOMPILED_HEADER = kernel/qt_widgets_pch.h
QT_PRIVATE += platformheaders-private
KERNEL_P= kernel
HEADERS += \
kernel/qtwidgetsglobal.h \

View File

@ -113,7 +113,7 @@
#include "qwindowcontainer_p.h"
#include <QtPlatformHeaders/qxcbwindowfunctions.h>
#include <QtPlatformHeaders/private/qxcbwindowfunctions_p.h>
#include <private/qmemory_p.h>

View File

@ -168,6 +168,7 @@ _qt_library_map = [
"gsttools", "Qt6", "Qt::MultimediaGstTools", extra=["COMPONENTS", "MultimediaGstTools"]
),
LibraryMapping("gui", "Qt6", "Qt::Gui", extra=["COMPONENTS", "Gui"]),
LibraryMapping("platformheaders", "Qt6", "Qt::PlatformHeaders", extra=["COMPONENTS", "PlatformHeaders"]),
LibraryMapping("help", "Qt6", "Qt::Help", extra=["COMPONENTS", "Help"]),
LibraryMapping(
"hunspellinputmethod",