From ea913750b8793e1e518bd0eabc338e557df5ee6c Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 12 Oct 2016 11:55:52 +0200 Subject: [PATCH] create modularized version of qtplatformsupport module lumping together all kinds of unrelated stuff has caused problems with spurious dependencies from the beginning. as the modularization infra is now in a state which supports many small private libraries just fine, take advantage of it. Change-Id: Ic40f47ce76a308bbfd32deae281f6f064fe1ef4c Reviewed-by: Jake Petroules --- .../nativecontexts/qeglnativecontext.h | 2 +- .../accessibility/accessibility.pri | 9 --- .../accessibility/accessibility.pro | 16 +++++ .../cglconvenience/cglconvenience.pri | 11 ---- .../cglconvenience/cglconvenience.pro | 18 ++++++ src/platformsupport/clipboard/clipboard.pri | 7 -- src/platformsupport/clipboard/clipboard.pro | 15 +++++ .../devicediscovery/devicediscovery.pri | 13 ---- .../devicediscovery/devicediscovery.pro | 25 ++++++++ .../eglconvenience/eglconvenience.pri | 32 ---------- .../eglconvenience/eglconvenience.pro | 43 +++++++++++++ .../eglconvenience/qeglconvenience_p.h | 2 +- .../eglconvenience/qeglpbuffer_p.h | 2 +- .../eglconvenience/qeglplatformcontext_p.h | 2 +- .../eglconvenience/qeglstreamconvenience_p.h | 2 +- .../eventdispatchers/eventdispatchers.pri | 21 ------ .../eventdispatchers/eventdispatchers.pro | 32 ++++++++++ .../fbconvenience/fbconvenience.pri | 11 ---- .../fbconvenience/fbconvenience.pro | 24 +++++++ .../fontconfig/qfontconfigdatabase_p.h | 2 +- .../{fontdatabases.pri => fontdatabases.pro} | 11 ++++ .../genericunix/qgenericunixfontdatabase_p.h | 4 +- .../glxconvenience/glxconvenience.pri | 8 --- .../glxconvenience/glxconvenience.pro | 16 +++++ src/platformsupport/graphics/graphics.pri | 2 - src/platformsupport/graphics/graphics.pro | 13 ++++ .../evdevkeyboard/qevdevkeyboardmanager_p.h | 2 +- .../input/evdevmouse/qevdevmousemanager.cpp | 2 +- .../input/evdevtablet/qevdevtabletmanager.cpp | 2 +- .../input/evdevtouch/qevdevtouchmanager.cpp | 2 +- .../input/{input.pri => input.pro} | 11 ++++ src/platformsupport/legacy.cpp | 48 ++++++++++++++ src/platformsupport/legacy.pro | 32 ++++++++++ .../linuxaccessibility/atspiadaptor.cpp | 2 +- .../linuxaccessibility/linuxaccessibility.pri | 25 -------- .../linuxaccessibility/linuxaccessibility.pro | 30 +++++++++ .../platformcompositor/platformcompositor.pri | 7 -- .../platformcompositor/platformcompositor.pro | 18 ++++++ src/platformsupport/platformsupport.pro | 64 ++++++++++++------- src/platformsupport/services/services.pri | 3 - src/platformsupport/services/services.pro | 13 ++++ .../themes/genericunix/qgenericunixthemes.cpp | 7 +- src/platformsupport/themes/themes.pri | 9 --- src/platformsupport/themes/themes.pro | 19 ++++++ sync.profile | 15 +++++ .../qaccessibilitylinux.pro | 7 +- 46 files changed, 458 insertions(+), 203 deletions(-) delete mode 100644 src/platformsupport/accessibility/accessibility.pri create mode 100644 src/platformsupport/accessibility/accessibility.pro delete mode 100644 src/platformsupport/cglconvenience/cglconvenience.pri create mode 100644 src/platformsupport/cglconvenience/cglconvenience.pro delete mode 100644 src/platformsupport/clipboard/clipboard.pri create mode 100644 src/platformsupport/clipboard/clipboard.pro delete mode 100644 src/platformsupport/devicediscovery/devicediscovery.pri create mode 100644 src/platformsupport/devicediscovery/devicediscovery.pro delete mode 100644 src/platformsupport/eglconvenience/eglconvenience.pri create mode 100644 src/platformsupport/eglconvenience/eglconvenience.pro delete mode 100644 src/platformsupport/eventdispatchers/eventdispatchers.pri create mode 100644 src/platformsupport/eventdispatchers/eventdispatchers.pro delete mode 100644 src/platformsupport/fbconvenience/fbconvenience.pri create mode 100644 src/platformsupport/fbconvenience/fbconvenience.pro rename src/platformsupport/fontdatabases/{fontdatabases.pri => fontdatabases.pro} (62%) delete mode 100644 src/platformsupport/glxconvenience/glxconvenience.pri create mode 100644 src/platformsupport/glxconvenience/glxconvenience.pro delete mode 100644 src/platformsupport/graphics/graphics.pri create mode 100644 src/platformsupport/graphics/graphics.pro rename src/platformsupport/input/{input.pri => input.pro} (62%) create mode 100644 src/platformsupport/legacy.cpp create mode 100644 src/platformsupport/legacy.pro delete mode 100644 src/platformsupport/linuxaccessibility/linuxaccessibility.pri create mode 100644 src/platformsupport/linuxaccessibility/linuxaccessibility.pro delete mode 100644 src/platformsupport/platformcompositor/platformcompositor.pri create mode 100644 src/platformsupport/platformcompositor/platformcompositor.pro delete mode 100644 src/platformsupport/services/services.pri create mode 100644 src/platformsupport/services/services.pro delete mode 100644 src/platformsupport/themes/themes.pri create mode 100644 src/platformsupport/themes/themes.pro diff --git a/src/platformheaders/nativecontexts/qeglnativecontext.h b/src/platformheaders/nativecontexts/qeglnativecontext.h index 67a6d2b808..697b3ef3fd 100644 --- a/src/platformheaders/nativecontexts/qeglnativecontext.h +++ b/src/platformheaders/nativecontexts/qeglnativecontext.h @@ -41,7 +41,7 @@ #define QEGLNATIVECONTEXT_H #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/platformsupport/accessibility/accessibility.pri b/src/platformsupport/accessibility/accessibility.pri deleted file mode 100644 index 924f6a512f..0000000000 --- a/src/platformsupport/accessibility/accessibility.pri +++ /dev/null @@ -1,9 +0,0 @@ -qtConfig(accessibility) { - INCLUDEPATH += $$PWD - - HEADERS += \ - $$PWD/qaccessiblebridgeutils_p.h - - SOURCES += \ - $$PWD/qaccessiblebridgeutils.cpp -} diff --git a/src/platformsupport/accessibility/accessibility.pro b/src/platformsupport/accessibility/accessibility.pro new file mode 100644 index 0000000000..49be899b08 --- /dev/null +++ b/src/platformsupport/accessibility/accessibility.pro @@ -0,0 +1,16 @@ +TARGET = QtAccessibilitySupport +MODULE = accessibility_support + +QT = core-private gui +CONFIG += static internal_module + +DEFINES += QT_NO_CAST_FROM_ASCII +PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h + +HEADERS += \ + qaccessiblebridgeutils_p.h + +SOURCES += \ + qaccessiblebridgeutils.cpp + +load(qt_module) diff --git a/src/platformsupport/cglconvenience/cglconvenience.pri b/src/platformsupport/cglconvenience/cglconvenience.pri deleted file mode 100644 index 1de38bbd08..0000000000 --- a/src/platformsupport/cglconvenience/cglconvenience.pri +++ /dev/null @@ -1,11 +0,0 @@ -osx { - INCLUDEPATH += $$PWD - - HEADERS += \ - $$PWD/cglconvenience_p.h - - OBJECTIVE_SOURCES += \ - $$PWD/cglconvenience.mm - - LIBS_PRIVATE += -framework AppKit -framework OpenGL -} diff --git a/src/platformsupport/cglconvenience/cglconvenience.pro b/src/platformsupport/cglconvenience/cglconvenience.pro new file mode 100644 index 0000000000..0422a844aa --- /dev/null +++ b/src/platformsupport/cglconvenience/cglconvenience.pro @@ -0,0 +1,18 @@ +TARGET = QtCglSupport +MODULE = cgl_support + +QT = core-private gui +CONFIG += static internal_module + +DEFINES += QT_NO_CAST_FROM_ASCII +PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h + +HEADERS += \ + cglconvenience_p.h + +OBJECTIVE_SOURCES += \ + cglconvenience.mm + +LIBS_PRIVATE += -framework AppKit -framework OpenGL + +load(qt_module) diff --git a/src/platformsupport/clipboard/clipboard.pri b/src/platformsupport/clipboard/clipboard.pri deleted file mode 100644 index cb8315d003..0000000000 --- a/src/platformsupport/clipboard/clipboard.pri +++ /dev/null @@ -1,7 +0,0 @@ -mac { - HEADERS += $$PWD/qmacmime_p.h - OBJECTIVE_SOURCES += $$PWD/qmacmime.mm - - osx: LIBS_PRIVATE += -framework AppKit -} - diff --git a/src/platformsupport/clipboard/clipboard.pro b/src/platformsupport/clipboard/clipboard.pro new file mode 100644 index 0000000000..336d81fe46 --- /dev/null +++ b/src/platformsupport/clipboard/clipboard.pro @@ -0,0 +1,15 @@ +TARGET = QtClipboardSupport +MODULE = clipboard_support + +QT = core-private gui +CONFIG += static internal_module + +DEFINES += QT_NO_CAST_FROM_ASCII +PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h + +HEADERS += qmacmime_p.h +SOURCES += qmacmime.mm + +macos: LIBS_PRIVATE += -framework AppKit + +load(qt_module) diff --git a/src/platformsupport/devicediscovery/devicediscovery.pri b/src/platformsupport/devicediscovery/devicediscovery.pri deleted file mode 100644 index f4e9103130..0000000000 --- a/src/platformsupport/devicediscovery/devicediscovery.pri +++ /dev/null @@ -1,13 +0,0 @@ -HEADERS += $$PWD/qdevicediscovery_p.h - -qtConfig(libudev) { - SOURCES += $$PWD/qdevicediscovery_udev.cpp - HEADERS += $$PWD/qdevicediscovery_udev_p.h - QMAKE_USE_PRIVATE += libudev -} else: qtConfig(evdev) { - SOURCES += $$PWD/qdevicediscovery_static.cpp - HEADERS += $$PWD/qdevicediscovery_static_p.h -} else { - SOURCES += $$PWD/qdevicediscovery_dummy.cpp - HEADERS += $$PWD/qdevicediscovery_dummy_p.h -} diff --git a/src/platformsupport/devicediscovery/devicediscovery.pro b/src/platformsupport/devicediscovery/devicediscovery.pro new file mode 100644 index 0000000000..b429b8b97e --- /dev/null +++ b/src/platformsupport/devicediscovery/devicediscovery.pro @@ -0,0 +1,25 @@ +TARGET = QtDeviceDiscoverySupport +MODULE = devicediscovery_support + +QT = core-private +QT_FOR_CONFIG += gui-private +CONFIG += static internal_module + +DEFINES += QT_NO_CAST_FROM_ASCII +PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h + +HEADERS += qdevicediscovery_p.h + +qtConfig(libudev) { + SOURCES += qdevicediscovery_udev.cpp + HEADERS += qdevicediscovery_udev_p.h + QMAKE_USE_PRIVATE += libudev +} else: qtConfig(evdev) { + SOURCES += qdevicediscovery_static.cpp + HEADERS += qdevicediscovery_static_p.h +} else { + SOURCES += qdevicediscovery_dummy.cpp + HEADERS += qdevicediscovery_dummy_p.h +} + +load(qt_module) diff --git a/src/platformsupport/eglconvenience/eglconvenience.pri b/src/platformsupport/eglconvenience/eglconvenience.pri deleted file mode 100644 index 4a93d997fb..0000000000 --- a/src/platformsupport/eglconvenience/eglconvenience.pri +++ /dev/null @@ -1,32 +0,0 @@ -qtConfig(egl) { - HEADERS += \ - $$PWD/qeglconvenience_p.h \ - $$PWD/qeglstreamconvenience_p.h \ - $$PWD/qt_egl_p.h - - SOURCES += \ - $$PWD/qeglconvenience.cpp \ - $$PWD/qeglstreamconvenience.cpp - - qtConfig(opengl) { - HEADERS += $$PWD/qeglplatformcontext_p.h \ - $$PWD/qeglpbuffer_p.h - - SOURCES += $$PWD/qeglplatformcontext.cpp \ - $$PWD/qeglpbuffer.cpp - } - - # Avoid X11 header collision, use generic EGL native types - DEFINES += QT_EGL_NO_X11 - - qtConfig(xlib) { - HEADERS += \ - $$PWD/qxlibeglintegration_p.h - SOURCES += \ - $$PWD/qxlibeglintegration.cpp - LIBS_PRIVATE += $$QMAKE_LIBS_X11 - } - CONFIG += egl - - LIBS_PRIVATE += $$QMAKE_LIBS_DYNLOAD -} diff --git a/src/platformsupport/eglconvenience/eglconvenience.pro b/src/platformsupport/eglconvenience/eglconvenience.pro new file mode 100644 index 0000000000..d364a42b3b --- /dev/null +++ b/src/platformsupport/eglconvenience/eglconvenience.pro @@ -0,0 +1,43 @@ +TARGET = QtEglSupport +MODULE = egl_support + +QT = core-private gui-private +CONFIG += static internal_module + +DEFINES += QT_NO_CAST_FROM_ASCII +PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h + +HEADERS += \ + qeglconvenience_p.h \ + qeglstreamconvenience_p.h \ + qt_egl_p.h + +SOURCES += \ + qeglconvenience.cpp \ + qeglstreamconvenience.cpp + +qtConfig(opengl) { + HEADERS += \ + qeglplatformcontext_p.h \ + qeglpbuffer_p.h + + SOURCES += \ + qeglplatformcontext.cpp \ + qeglpbuffer.cpp +} + +# Avoid X11 header collision, use generic EGL native types +DEFINES += QT_EGL_NO_X11 + +qtConfig(xlib) { + HEADERS += \ + qxlibeglintegration_p.h + SOURCES += \ + qxlibeglintegration.cpp + LIBS_PRIVATE += $$QMAKE_LIBS_X11 +} +CONFIG += egl + +LIBS_PRIVATE += $$QMAKE_LIBS_DYNLOAD + +load(qt_module) diff --git a/src/platformsupport/eglconvenience/qeglconvenience_p.h b/src/platformsupport/eglconvenience/qeglconvenience_p.h index fdd21b8f19..ab2b813515 100644 --- a/src/platformsupport/eglconvenience/qeglconvenience_p.h +++ b/src/platformsupport/eglconvenience/qeglconvenience_p.h @@ -54,7 +54,7 @@ #include #include #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/platformsupport/eglconvenience/qeglpbuffer_p.h b/src/platformsupport/eglconvenience/qeglpbuffer_p.h index 4f9ea9d5f3..38370c0e62 100644 --- a/src/platformsupport/eglconvenience/qeglpbuffer_p.h +++ b/src/platformsupport/eglconvenience/qeglpbuffer_p.h @@ -52,7 +52,7 @@ // #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h index f6b2b876f7..9d41eecd99 100644 --- a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h +++ b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h @@ -55,7 +55,7 @@ #include #include #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/platformsupport/eglconvenience/qeglstreamconvenience_p.h b/src/platformsupport/eglconvenience/qeglstreamconvenience_p.h index a4c8245280..6c84f29613 100644 --- a/src/platformsupport/eglconvenience/qeglstreamconvenience_p.h +++ b/src/platformsupport/eglconvenience/qeglstreamconvenience_p.h @@ -52,7 +52,7 @@ // #include -#include +#include // This provides runtime EGLDevice/Output/Stream support even when eglext.h in // the sysroot is not up-to-date. diff --git a/src/platformsupport/eventdispatchers/eventdispatchers.pri b/src/platformsupport/eventdispatchers/eventdispatchers.pri deleted file mode 100644 index fb0f3b3827..0000000000 --- a/src/platformsupport/eventdispatchers/eventdispatchers.pri +++ /dev/null @@ -1,21 +0,0 @@ -unix { -SOURCES +=\ - $$PWD/qunixeventdispatcher.cpp\ - $$PWD/qgenericunixeventdispatcher.cpp\ - -HEADERS +=\ - $$PWD/qunixeventdispatcher_qpa_p.h\ - $$PWD/qgenericunixeventdispatcher_p.h\ -} else: win32 { -SOURCES +=\ - $$PWD/qwindowsguieventdispatcher.cpp - -HEADERS +=\ - $$PWD/qwindowsguieventdispatcher_p.h -} - -qtConfig(glib) { - SOURCES +=$$PWD/qeventdispatcher_glib.cpp - HEADERS +=$$PWD/qeventdispatcher_glib_p.h - QMAKE_USE_PRIVATE += glib -} diff --git a/src/platformsupport/eventdispatchers/eventdispatchers.pro b/src/platformsupport/eventdispatchers/eventdispatchers.pro new file mode 100644 index 0000000000..9d3ac4bbc6 --- /dev/null +++ b/src/platformsupport/eventdispatchers/eventdispatchers.pro @@ -0,0 +1,32 @@ +TARGET = QtEventDispatcherSupport +MODULE = eventdispatcher_support + +QT = core-private gui-private +CONFIG += static internal_module + +DEFINES += QT_NO_CAST_FROM_ASCII +PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h + +unix { + SOURCES += \ + qunixeventdispatcher.cpp \ + qgenericunixeventdispatcher.cpp + + HEADERS += \ + qunixeventdispatcher_qpa_p.h \ + qgenericunixeventdispatcher_p.h +} else { + SOURCES += \ + qwindowsguieventdispatcher.cpp + + HEADERS += \ + qwindowsguieventdispatcher_p.h +} + +qtConfig(glib) { + SOURCES += qeventdispatcher_glib.cpp + HEADERS += qeventdispatcher_glib_p.h + QMAKE_USE_PRIVATE += glib +} + +load(qt_module) diff --git a/src/platformsupport/fbconvenience/fbconvenience.pri b/src/platformsupport/fbconvenience/fbconvenience.pri deleted file mode 100644 index 4634f57fb4..0000000000 --- a/src/platformsupport/fbconvenience/fbconvenience.pri +++ /dev/null @@ -1,11 +0,0 @@ -SOURCES += $$PWD/qfbscreen.cpp \ - $$PWD/qfbbackingstore.cpp \ - $$PWD/qfbwindow.cpp \ - $$PWD/qfbcursor.cpp \ - $$PWD/qfbvthandler.cpp - -HEADERS += $$PWD/qfbscreen_p.h \ - $$PWD/qfbbackingstore_p.h \ - $$PWD/qfbwindow_p.h \ - $$PWD/qfbcursor_p.h \ - $$PWD/qfbvthandler_p.h diff --git a/src/platformsupport/fbconvenience/fbconvenience.pro b/src/platformsupport/fbconvenience/fbconvenience.pro new file mode 100644 index 0000000000..3775906470 --- /dev/null +++ b/src/platformsupport/fbconvenience/fbconvenience.pro @@ -0,0 +1,24 @@ +TARGET = QtFbSupport +MODULE = fb_support + +QT = core-private gui-private +CONFIG += static internal_module + +DEFINES += QT_NO_CAST_FROM_ASCII +PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h + +SOURCES += \ + qfbscreen.cpp \ + qfbbackingstore.cpp \ + qfbwindow.cpp \ + qfbcursor.cpp \ + qfbvthandler.cpp + +HEADERS += \ + qfbscreen_p.h \ + qfbbackingstore_p.h \ + qfbwindow_p.h \ + qfbcursor_p.h \ + qfbvthandler_p.h + +load(qt_module) diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase_p.h b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase_p.h index 244558b910..f7e3172b65 100644 --- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase_p.h +++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase_p.h @@ -52,7 +52,7 @@ // #include -#include +#include QT_BEGIN_NAMESPACE diff --git a/src/platformsupport/fontdatabases/fontdatabases.pri b/src/platformsupport/fontdatabases/fontdatabases.pro similarity index 62% rename from src/platformsupport/fontdatabases/fontdatabases.pri rename to src/platformsupport/fontdatabases/fontdatabases.pro index 5bf73566d8..fdfe3f59ea 100644 --- a/src/platformsupport/fontdatabases/fontdatabases.pri +++ b/src/platformsupport/fontdatabases/fontdatabases.pro @@ -1,3 +1,12 @@ +TARGET = QtFontDatabaseSupport +MODULE = fontdatabase_support + +QT = core-private gui-private +CONFIG += static internal_module + +DEFINES += QT_NO_CAST_FROM_ASCII +PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h + darwin:!if(watchos:CONFIG(simulator, simulator|device)) { include($$PWD/mac/coretext.pri) } else { @@ -13,3 +22,5 @@ darwin:!if(watchos:CONFIG(simulator, simulator|device)) { } } } + +load(qt_module) diff --git a/src/platformsupport/fontdatabases/genericunix/qgenericunixfontdatabase_p.h b/src/platformsupport/fontdatabases/genericunix/qgenericunixfontdatabase_p.h index 267ef5e3f2..37c667eeb3 100644 --- a/src/platformsupport/fontdatabases/genericunix/qgenericunixfontdatabase_p.h +++ b/src/platformsupport/fontdatabases/genericunix/qgenericunixfontdatabase_p.h @@ -54,10 +54,10 @@ #include #if QT_CONFIG(fontconfig) -#include +#include typedef QFontconfigDatabase QGenericUnixFontDatabase; #else -#include +#include typedef QBasicFontDatabase QGenericUnixFontDatabase; #endif //Q_FONTCONFIGDATABASE diff --git a/src/platformsupport/glxconvenience/glxconvenience.pri b/src/platformsupport/glxconvenience/glxconvenience.pri deleted file mode 100644 index 80e79ee663..0000000000 --- a/src/platformsupport/glxconvenience/glxconvenience.pri +++ /dev/null @@ -1,8 +0,0 @@ -qtConfig(xlib) { - qtConfig(opengl):!qtConfig(opengles2) { - qtConfig(xrender): QMAKE_USE_PRIVATE += xrender - LIBS_PRIVATE += $$QMAKE_LIBS_X11 - HEADERS += $$PWD/qglxconvenience_p.h - SOURCES += $$PWD/qglxconvenience.cpp - } -} diff --git a/src/platformsupport/glxconvenience/glxconvenience.pro b/src/platformsupport/glxconvenience/glxconvenience.pro new file mode 100644 index 0000000000..185d6b0364 --- /dev/null +++ b/src/platformsupport/glxconvenience/glxconvenience.pro @@ -0,0 +1,16 @@ +TARGET = QtGlxSupport +MODULE = glx_support + +QT = core-private gui-private +CONFIG += static internal_module + +DEFINES += QT_NO_CAST_FROM_ASCII +PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h + +qtConfig(xrender): QMAKE_USE_PRIVATE += xrender +LIBS_PRIVATE += $$QMAKE_LIBS_X11 + +HEADERS += qglxconvenience_p.h +SOURCES += qglxconvenience.cpp + +load(qt_module) diff --git a/src/platformsupport/graphics/graphics.pri b/src/platformsupport/graphics/graphics.pri deleted file mode 100644 index 43062682aa..0000000000 --- a/src/platformsupport/graphics/graphics.pri +++ /dev/null @@ -1,2 +0,0 @@ -HEADERS += $$PWD/qrasterbackingstore_p.h -SOURCES += $$PWD/qrasterbackingstore.cpp diff --git a/src/platformsupport/graphics/graphics.pro b/src/platformsupport/graphics/graphics.pro new file mode 100644 index 0000000000..878fca7f49 --- /dev/null +++ b/src/platformsupport/graphics/graphics.pro @@ -0,0 +1,13 @@ +TARGET = QtGraphicsSupport +MODULE = graphics_support + +QT = core-private gui-private +CONFIG += static internal_module + +DEFINES += QT_NO_CAST_FROM_ASCII +PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h + +HEADERS += $$PWD/qrasterbackingstore_p.h +SOURCES += $$PWD/qrasterbackingstore.cpp + +load(qt_module) diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h index 01f23f2542..d2e34fead3 100644 --- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h +++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardmanager_p.h @@ -53,7 +53,7 @@ #include "qevdevkeyboardhandler_p.h" -#include +#include #include #include diff --git a/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp b/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp index 2d96691b09..b2f3fe5787 100644 --- a/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp +++ b/src/platformsupport/input/evdevmouse/qevdevmousemanager.cpp @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp b/src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp index 89a60df98d..4b00424e92 100644 --- a/src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp +++ b/src/platformsupport/input/evdevtablet/qevdevtabletmanager.cpp @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp index d0c6c10224..ab71d08fb1 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouchmanager.cpp @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/platformsupport/input/input.pri b/src/platformsupport/input/input.pro similarity index 62% rename from src/platformsupport/input/input.pri rename to src/platformsupport/input/input.pro index eb4d8a983d..2c2ace6780 100644 --- a/src/platformsupport/input/input.pri +++ b/src/platformsupport/input/input.pro @@ -1,3 +1,12 @@ +TARGET = QtInputSupport +MODULE = input_support + +QT = core-private gui-private devicediscovery_support-private +CONFIG += static internal_module + +DEFINES += QT_NO_CAST_FROM_ASCII +PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h + qtConfig(evdev) { include($$PWD/evdevmouse/evdevmouse.pri) include($$PWD/evdevkeyboard/evdevkeyboard.pri) @@ -16,3 +25,5 @@ qtConfig(libinput) { qtConfig(evdev)|qtConfig(libinput) { include($$PWD/shared/shared.pri) } + +load(qt_module) diff --git a/src/platformsupport/legacy.cpp b/src/platformsupport/legacy.cpp new file mode 100644 index 0000000000..49def2ecca --- /dev/null +++ b/src/platformsupport/legacy.cpp @@ -0,0 +1,48 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include + +QT_BEGIN_NAMESPACE + +void dummy() +{ +} + +QT_END_NAMESPACE diff --git a/src/platformsupport/legacy.pro b/src/platformsupport/legacy.pro new file mode 100644 index 0000000000..042f16301d --- /dev/null +++ b/src/platformsupport/legacy.pro @@ -0,0 +1,32 @@ +TARGET = QtPlatformSupport +MODULE = platformsupport + +QT_FOR_CONFIG += gui-private +CONFIG += static internal_module + +SOURCES += legacy.cpp + +mods = \ + accessibility \ + cgl \ + clipboard \ + devicediscovery \ + egl \ + eventdispatcher \ + fb \ + fontdatabase \ + glx \ + graphics \ + input \ + linuxaccessibility \ + platformcompositor \ + service \ + theme + +for (mod, mods) { + mod = $${mod}_support-private + qtHaveModule($$mod): \ + QT += $$mod +} + +load(qt_module) diff --git a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp index f6c126a771..70c4aa563c 100644 --- a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp +++ b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp @@ -50,7 +50,7 @@ #ifndef QT_NO_ACCESSIBILITY #include "socket_interface.h" #include "constant_mappings_p.h" -#include "../accessibility/qaccessiblebridgeutils_p.h" +#include #include "application_p.h" /*! diff --git a/src/platformsupport/linuxaccessibility/linuxaccessibility.pri b/src/platformsupport/linuxaccessibility/linuxaccessibility.pri deleted file mode 100644 index 1f36b815cf..0000000000 --- a/src/platformsupport/linuxaccessibility/linuxaccessibility.pri +++ /dev/null @@ -1,25 +0,0 @@ -qtConfig(accessibility-atspi-bridge) { - - QT_FOR_PRIVATE += dbus - include(../../3rdparty/atspi2/atspi2.pri) - - INCLUDEPATH += $$PWD - - HEADERS += \ - $$PWD/application_p.h \ - $$PWD/bridge_p.h \ - $$PWD/cache_p.h \ - $$PWD/struct_marshallers_p.h \ - $$PWD/constant_mappings_p.h \ - $$PWD/dbusconnection_p.h \ - $$PWD/atspiadaptor_p.h - - SOURCES += \ - $$PWD/application.cpp \ - $$PWD/bridge.cpp \ - $$PWD/cache.cpp \ - $$PWD/struct_marshallers.cpp \ - $$PWD/constant_mappings.cpp \ - $$PWD/dbusconnection.cpp \ - $$PWD/atspiadaptor.cpp -} diff --git a/src/platformsupport/linuxaccessibility/linuxaccessibility.pro b/src/platformsupport/linuxaccessibility/linuxaccessibility.pro new file mode 100644 index 0000000000..6d68909047 --- /dev/null +++ b/src/platformsupport/linuxaccessibility/linuxaccessibility.pro @@ -0,0 +1,30 @@ +TARGET = QtLinuxAccessibilitySupport +MODULE = linuxaccessibility_support + +QT = core-private dbus gui-private accessibility_support-private +CONFIG += static internal_module + +DEFINES += QT_NO_CAST_FROM_ASCII +PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h + +include(../../3rdparty/atspi2/atspi2.pri) + +HEADERS += \ + application_p.h \ + bridge_p.h \ + cache_p.h \ + struct_marshallers_p.h \ + constant_mappings_p.h \ + dbusconnection_p.h \ + atspiadaptor_p.h + +SOURCES += \ + application.cpp \ + bridge.cpp \ + cache.cpp \ + struct_marshallers.cpp \ + constant_mappings.cpp \ + dbusconnection.cpp \ + atspiadaptor.cpp + +load(qt_module) diff --git a/src/platformsupport/platformcompositor/platformcompositor.pri b/src/platformsupport/platformcompositor/platformcompositor.pri deleted file mode 100644 index 1e908c9998..0000000000 --- a/src/platformsupport/platformcompositor/platformcompositor.pri +++ /dev/null @@ -1,7 +0,0 @@ -qtConfig(opengl) { - SOURCES += $$PWD/qopenglcompositor.cpp \ - $$PWD/qopenglcompositorbackingstore.cpp - - HEADERS += $$PWD/qopenglcompositor_p.h \ - $$PWD/qopenglcompositorbackingstore_p.h -} diff --git a/src/platformsupport/platformcompositor/platformcompositor.pro b/src/platformsupport/platformcompositor/platformcompositor.pro new file mode 100644 index 0000000000..633e71fb9d --- /dev/null +++ b/src/platformsupport/platformcompositor/platformcompositor.pro @@ -0,0 +1,18 @@ +TARGET = QtPlatformCompositorSupport +MODULE = platformcompositor_support + +QT = core-private gui-private +CONFIG += static internal_module + +DEFINES += QT_NO_CAST_FROM_ASCII +PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h + +SOURCES += \ + qopenglcompositor.cpp \ + qopenglcompositorbackingstore.cpp + +HEADERS += \ + qopenglcompositor_p.h \ + qopenglcompositorbackingstore_p.h + +load(qt_module) diff --git a/src/platformsupport/platformsupport.pro b/src/platformsupport/platformsupport.pro index f9b57acaa8..5161ce3520 100644 --- a/src/platformsupport/platformsupport.pro +++ b/src/platformsupport/platformsupport.pro @@ -1,27 +1,47 @@ -TARGET = QtPlatformSupport -QT = core-private gui-private +TEMPLATE = subdirs +QT_FOR_CONFIG += gui-private -CONFIG += static internal_module -mac:LIBS_PRIVATE += -lz +SUBDIRS = \ + eventdispatchers \ + devicediscovery \ + fbconvenience \ + themes -DEFINES += QT_NO_CAST_FROM_ASCII -PRECOMPILED_HEADER = ../corelib/global/qt_pch.h +qtConfig(freetype)|if(darwin:!if(watchos:CONFIG(simulator, simulator|device))): \ + SUBDIRS += fontdatabases -include(cglconvenience/cglconvenience.pri) -include(eglconvenience/eglconvenience.pri) -include(eventdispatchers/eventdispatchers.pri) -include(fbconvenience/fbconvenience.pri) -include(fontdatabases/fontdatabases.pri) -include(glxconvenience/glxconvenience.pri) -include(input/input.pri) -include(devicediscovery/devicediscovery.pri) -include(services/services.pri) -include(themes/themes.pri) -include(accessibility/accessibility.pri) -include(linuxaccessibility/linuxaccessibility.pri) -include(clipboard/clipboard.pri) -include(platformcompositor/platformcompositor.pri) +qtConfig(evdev)|qtConfig(tslib)|qtConfig(libinput) { + SUBDIRS += input + input.depends += devicediscovery +} -darwin: include(graphics/graphics.pri) +unix:!darwin: \ + SUBDIRS += services -load(qt_module) +qtConfig(opengl): \ + SUBDIRS += platformcompositor +qtConfig(egl): \ + SUBDIRS += eglconvenience +qtConfig(xlib):qtConfig(opengl):!qtConfig(opengles2): \ + SUBDIRS += glxconvenience + +qtConfig(accessibility) { + SUBDIRS += accessibility + qtConfig(accessibility-atspi-bridge) { + SUBDIRS += linuxaccessibility + linuxaccessibility.depends += accessibility + } +} + +darwin { + SUBDIRS += \ + clipboard \ + graphics + macos: \ + SUBDIRS += cglconvenience +} + +# This aggregates all of them. +legacy.file = legacy.pro +legacy.depends = $$SUBDIRS +SUBDIRS += legacy diff --git a/src/platformsupport/services/services.pri b/src/platformsupport/services/services.pri deleted file mode 100644 index adee852626..0000000000 --- a/src/platformsupport/services/services.pri +++ /dev/null @@ -1,3 +0,0 @@ -unix:!mac { - include($$PWD/genericunix/genericunix.pri) -} diff --git a/src/platformsupport/services/services.pro b/src/platformsupport/services/services.pro new file mode 100644 index 0000000000..91957a0a78 --- /dev/null +++ b/src/platformsupport/services/services.pro @@ -0,0 +1,13 @@ +TARGET = QtServiceSupport +MODULE = service_support + +QT = core-private gui-private +CONFIG += static internal_module + +DEFINES += QT_NO_CAST_FROM_ASCII +PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h + +unix:!darwin: \ + include($$PWD/genericunix/genericunix.pri) + +load(qt_module) diff --git a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp index db264d1b22..1e1b1af4b5 100644 --- a/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp +++ b/src/platformsupport/themes/genericunix/qgenericunixthemes.cpp @@ -38,7 +38,6 @@ ****************************************************************************/ #include "qgenericunixthemes_p.h" -#include "../../services/genericunix/qgenericunixservices_p.h" #include "qpa/qplatformtheme_p.h" @@ -61,11 +60,11 @@ #include #include #ifndef QT_NO_DBUS -#include "QtPlatformSupport/private/qdbusplatformmenu_p.h" -#include "QtPlatformSupport/private/qdbusmenubar_p.h" +#include "qdbusplatformmenu_p.h" +#include "qdbusmenubar_p.h" #endif #if !defined(QT_NO_DBUS) && !defined(QT_NO_SYSTEMTRAYICON) -#include "QtPlatformSupport/private/qdbustrayicon_p.h" +#include "qdbustrayicon_p.h" #endif #include diff --git a/src/platformsupport/themes/themes.pri b/src/platformsupport/themes/themes.pri deleted file mode 100644 index 552973431f..0000000000 --- a/src/platformsupport/themes/themes.pri +++ /dev/null @@ -1,9 +0,0 @@ -unix:!mac { - include($$PWD/genericunix/genericunix.pri) -} - -HEADERS += \ - $$PWD/qabstractfileiconengine_p.h - -SOURCES += \ - $$PWD/qabstractfileiconengine.cpp diff --git a/src/platformsupport/themes/themes.pro b/src/platformsupport/themes/themes.pro new file mode 100644 index 0000000000..2aeb1f89ad --- /dev/null +++ b/src/platformsupport/themes/themes.pro @@ -0,0 +1,19 @@ +TARGET = QtThemeSupport +MODULE = theme_support + +QT = core-private gui-private +CONFIG += static internal_module + +DEFINES += QT_NO_CAST_FROM_ASCII +PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h + +unix:!darwin: \ + include($$PWD/genericunix/genericunix.pri) + +HEADERS += \ + qabstractfileiconengine_p.h + +SOURCES += \ + qabstractfileiconengine.cpp + +load(qt_module) diff --git a/sync.profile b/sync.profile index 4da3499667..aca82db53d 100644 --- a/sync.profile +++ b/sync.profile @@ -10,6 +10,21 @@ "QtTest" => "$basedir/src/testlib", "QtDBus" => "$basedir/src/dbus", "QtConcurrent" => "$basedir/src/concurrent", + "QtAccessibilitySupport" => "$basedir/src/platformsupport/accessibility", + "QtLinuxAccessibilitySupport" => "$basedir/src/platformsupport/linuxaccessibility", + "QtClipboardSupport" => "$basedir/src/platformsupport/clipboard", + "QtDeviceDiscoverySupport" => "$basedir/src/platformsupport/devicediscovery", + "QtEventDispatcherSupport" => "$basedir/src/platformsupport/eventdispatchers", + "QtFontDatabaseSupport" => "$basedir/src/platformsupport/fontdatabases", + "QtInputSupport" => "$basedir/src/platformsupport/input", + "QtPlatformCompositorSupport" => "$basedir/src/platformsupport/platformcompositor", + "QtServiceSupport" => "$basedir/src/platformsupport/services", + "QtThemeSupport" => "$basedir/src/platformsupport/themes", + "QtGraphicsSupport" => "$basedir/src/platformsupport/graphics", + "QtCglSupport" => "$basedir/src/platformsupport/cglconvenience", + "QtEglSupport" => "$basedir/src/platformsupport/eglconvenience", + "QtFbSupport" => "$basedir/src/platformsupport/fbconvenience", + "QtGlxSupport" => "$basedir/src/platformsupport/glxconvenience", "QtPlatformSupport" => "$basedir/src/platformsupport", "QtPlatformHeaders" => "$basedir/src/platformheaders", "QtANGLE/KHR" => "!$basedir/src/3rdparty/angle/include/KHR", diff --git a/tests/auto/other/qaccessibilitylinux/qaccessibilitylinux.pro b/tests/auto/other/qaccessibilitylinux/qaccessibilitylinux.pro index 10d950541a..5cb3f5902a 100644 --- a/tests/auto/other/qaccessibilitylinux/qaccessibilitylinux.pro +++ b/tests/auto/other/qaccessibilitylinux/qaccessibilitylinux.pro @@ -1,12 +1,7 @@ CONFIG += testcase -include($$QT_SOURCE_TREE/src/platformsupport/accessibility/accessibility.pri) -include($$QT_SOURCE_TREE/src/platformsupport/linuxaccessibility/linuxaccessibility.pri) - TARGET = tst_qaccessibilitylinux SOURCES += tst_qaccessibilitylinux.cpp -CONFIG += gui - -QT += gui-private widgets dbus testlib +QT += gui-private widgets dbus testlib accessibility_support-private linuxaccessibility_support-private