From 6ee65dc4785b9f38cfd7405a5535c88feb3a0ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Thu, 9 Jun 2011 15:56:55 +0200 Subject: [PATCH] QtPlatformSupport: A helper library for platform plugins QtPlatformSupport is a static library. Platform plugins are meant to link against this library to pull in dependencies such as fontengines and convenience functions for finding the right GL configs. The linker will only pull in the symbols used, so the size of the library doesn't really matter --- configure | 5 ++ .../features/qpa/basicunixfontdatabase.prf | 3 + mkspecs/features/qpa/dnd/simple.prf | 5 -- mkspecs/features/qpa/egl/context.prf | 9 --- mkspecs/features/qpa/egl/convenience.prf | 9 --- mkspecs/features/qpa/egl/xlibintegration.prf | 9 --- .../features/qpa/fontdatabases/fontconfig.prf | 12 ---- .../qpa/fontdatabases/genericunix.prf | 9 --- mkspecs/features/qpa/fontengine_dir.prf | 9 --- mkspecs/features/qpa/freetype_dir.prf | 8 --- .../features/qpa/genericunixfontdatabase.prf | 5 ++ mkspecs/features/qpa/glx/convenience.prf | 16 ----- mkspecs/features/qpa/harfbuzz_dir.prf | 9 --- mkspecs/features/qpa/platforms_dir.prf | 7 -- mkspecs/features/qpa/plugin.prf | 5 -- .../qpa/printersupport/genericunix.prf | 6 -- .../features/qpa/printersupport/windows.prf | 13 ---- src/modules/qt_platformsupport.pri | 14 ++++ src/platformsupport/dnd/dnd.pri | 4 ++ .../dnd/qsimpledrag.cpp | 2 +- .../dnd/qsimpledrag_p.h} | 0 .../eglconvenience/eglconvenience.pri | 15 ++++ .../eglconvenience/qeglconvenience.cpp | 2 +- .../eglconvenience/qeglconvenience_p.h} | 0 .../eglconvenience/qeglplatformcontext.cpp | 5 +- .../eglconvenience/qeglplatformcontext_p.h} | 0 .../eglconvenience/qxlibeglintegration.cpp | 2 +- .../eglconvenience/qxlibeglintegration_p.h} | 2 +- .../fb_base/fb_base.cpp | 2 +- src/platformsupport/fb_base/fb_base.pri | 4 ++ .../fb_base/fb_base_p.h} | 0 .../fontdatabases/basicunix/basicunix.pri | 71 +++++++------------ .../basicunix/qbasicunixfontdatabase.cpp | 6 +- .../basicunix/qbasicunixfontdatabase_p.h} | 0 .../fontdatabases/fontconfig/fontconfig.pri | 2 + .../fontconfig/qfontconfigdatabase.cpp | 9 +-- .../fontconfig/qfontconfigdatabase_p.h} | 2 +- .../fontdatabases/fontdatabases.pri | 7 ++ .../fontdatabases/genericunix/genericunix.pri | 1 + .../genericunix/qgenericunixfontdatabase_p.h} | 4 +- .../glxconvenience/glxconvenience.pri | 6 ++ .../glxconvenience/qglxconvenience.cpp | 2 +- .../glxconvenience/qglxconvenience_p.h} | 0 src/platformsupport/platformsupport.pro | 23 ++++++ .../genericunix/genericunix.pri | 2 + .../qgenericunixprintersupport.cpp | 2 +- .../qgenericunixprintersupport_p.h} | 0 .../printersupport/printersupport.pri | 7 ++ .../windows/qwindowsprintersupport.cpp | 2 +- .../windows/qwindowsprintersupport_p.h} | 0 .../printersupport/windows/windows.pri | 2 + src/plugins/platforms/cocoa/cocoa.pro | 6 +- src/plugins/platforms/fb_base/fb_base.pri | 2 - src/plugins/platforms/fb_base/fb_base.pro | 23 ------ src/plugins/platforms/minimal/minimal.pro | 2 +- .../qwaylandxcompositeeglcontext.cpp | 2 +- .../platforms/wayland/qwaylandintegration.cpp | 2 +- src/plugins/platforms/wayland/wayland.pro | 19 +---- src/plugins/platforms/xcb/qxcbintegration.cpp | 4 +- .../platforms/xcb/qxcbnativeinterface.cpp | 2 +- src/plugins/platforms/xcb/qxcbwindow.cpp | 10 +-- src/plugins/platforms/xcb/xcb.pro | 12 +--- src/src.pro | 6 +- sync.profile | 6 ++ 64 files changed, 179 insertions(+), 256 deletions(-) create mode 100644 mkspecs/features/qpa/basicunixfontdatabase.prf delete mode 100644 mkspecs/features/qpa/dnd/simple.prf delete mode 100644 mkspecs/features/qpa/egl/context.prf delete mode 100644 mkspecs/features/qpa/egl/convenience.prf delete mode 100644 mkspecs/features/qpa/egl/xlibintegration.prf delete mode 100644 mkspecs/features/qpa/fontdatabases/fontconfig.prf delete mode 100644 mkspecs/features/qpa/fontdatabases/genericunix.prf delete mode 100644 mkspecs/features/qpa/fontengine_dir.prf delete mode 100644 mkspecs/features/qpa/freetype_dir.prf create mode 100644 mkspecs/features/qpa/genericunixfontdatabase.prf delete mode 100644 mkspecs/features/qpa/glx/convenience.prf delete mode 100644 mkspecs/features/qpa/harfbuzz_dir.prf delete mode 100644 mkspecs/features/qpa/platforms_dir.prf delete mode 100644 mkspecs/features/qpa/plugin.prf delete mode 100644 mkspecs/features/qpa/printersupport/genericunix.prf delete mode 100644 mkspecs/features/qpa/printersupport/windows.prf create mode 100644 src/modules/qt_platformsupport.pri create mode 100644 src/platformsupport/dnd/dnd.pri rename src/{plugins/platforms => platformsupport}/dnd/qsimpledrag.cpp (99%) rename src/{plugins/platforms/dnd/qsimpledrag.h => platformsupport/dnd/qsimpledrag_p.h} (100%) create mode 100644 src/platformsupport/eglconvenience/eglconvenience.pri rename src/{plugins/platforms => platformsupport}/eglconvenience/qeglconvenience.cpp (99%) rename src/{plugins/platforms/eglconvenience/qeglconvenience.h => platformsupport/eglconvenience/qeglconvenience_p.h} (100%) rename src/{plugins/platforms => platformsupport}/eglconvenience/qeglplatformcontext.cpp (98%) rename src/{plugins/platforms/eglconvenience/qeglplatformcontext.h => platformsupport/eglconvenience/qeglplatformcontext_p.h} (100%) rename src/{plugins/platforms => platformsupport}/eglconvenience/qxlibeglintegration.cpp (99%) rename src/{plugins/platforms/eglconvenience/qxlibeglintegration.h => platformsupport/eglconvenience/qxlibeglintegration_p.h} (98%) rename src/{plugins/platforms => platformsupport}/fb_base/fb_base.cpp (99%) create mode 100644 src/platformsupport/fb_base/fb_base.pri rename src/{plugins/platforms/fb_base/fb_base.h => platformsupport/fb_base/fb_base_p.h} (100%) rename mkspecs/features/qpa/fontdatabases/basicunix.prf => src/platformsupport/fontdatabases/basicunix/basicunix.pri (58%) rename src/{plugins/platforms => platformsupport}/fontdatabases/basicunix/qbasicunixfontdatabase.cpp (98%) rename src/{plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.h => platformsupport/fontdatabases/basicunix/qbasicunixfontdatabase_p.h} (100%) create mode 100644 src/platformsupport/fontdatabases/fontconfig/fontconfig.pri rename src/{plugins/platforms => platformsupport}/fontdatabases/fontconfig/qfontconfigdatabase.cpp (97%) rename src/{plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.h => platformsupport/fontdatabases/fontconfig/qfontconfigdatabase_p.h} (97%) create mode 100644 src/platformsupport/fontdatabases/fontdatabases.pri create mode 100644 src/platformsupport/fontdatabases/genericunix/genericunix.pri rename src/{plugins/platforms/fontdatabases/genericunix/qgenericunixfontdatabase.h => platformsupport/fontdatabases/genericunix/qgenericunixfontdatabase_p.h} (94%) create mode 100644 src/platformsupport/glxconvenience/glxconvenience.pri rename src/{plugins/platforms => platformsupport}/glxconvenience/qglxconvenience.cpp (99%) rename src/{plugins/platforms/glxconvenience/qglxconvenience.h => platformsupport/glxconvenience/qglxconvenience_p.h} (100%) create mode 100644 src/platformsupport/platformsupport.pro create mode 100644 src/platformsupport/printersupport/genericunix/genericunix.pri rename src/{plugins/platforms => platformsupport}/printersupport/genericunix/qgenericunixprintersupport.cpp (98%) rename src/{plugins/platforms/printersupport/genericunix/qgenericunixprintersupport.h => platformsupport/printersupport/genericunix/qgenericunixprintersupport_p.h} (100%) create mode 100644 src/platformsupport/printersupport/printersupport.pri rename src/{plugins/platforms => platformsupport}/printersupport/windows/qwindowsprintersupport.cpp (99%) rename src/{plugins/platforms/printersupport/windows/qwindowsprintersupport.h => platformsupport/printersupport/windows/qwindowsprintersupport_p.h} (100%) create mode 100644 src/platformsupport/printersupport/windows/windows.pri delete mode 100644 src/plugins/platforms/fb_base/fb_base.pri delete mode 100644 src/plugins/platforms/fb_base/fb_base.pro diff --git a/configure b/configure index 12b08aa9c8..74fa27352b 100755 --- a/configure +++ b/configure @@ -6293,6 +6293,11 @@ if [ "$PLATFORM_QPA" = "yes" ]; then QMAKE_LIBDIR_WAYLAND=`$PKG_CONFIG --variable=libdir wayland-client 2>/dev/null` fi + # Check we actually have X11 :-) + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xlib "XLib" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then + QT_CONFIG="$QT_CONFIG xlib" + fi + # Detect libxkbcommon if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`" diff --git a/mkspecs/features/qpa/basicunixfontdatabase.prf b/mkspecs/features/qpa/basicunixfontdatabase.prf new file mode 100644 index 0000000000..261eadb5d0 --- /dev/null +++ b/mkspecs/features/qpa/basicunixfontdatabase.prf @@ -0,0 +1,3 @@ +contains(QT_CONFIG, system-freetype) { + LIBS += -lfreetype +} diff --git a/mkspecs/features/qpa/dnd/simple.prf b/mkspecs/features/qpa/dnd/simple.prf deleted file mode 100644 index 9333110fae..0000000000 --- a/mkspecs/features/qpa/dnd/simple.prf +++ /dev/null @@ -1,5 +0,0 @@ -load(qpa/platforms_dir) -INCLUDEPATH += $$QT_PLATFORMS_DIR/dnd -HEADERS += $$QT_PLATFORMS_DIR/dnd/qsimpledrag.h -SOURCES += $$QT_PLATFORMS_DIR/dnd/qsimpledrag.cpp -QT += gui-private diff --git a/mkspecs/features/qpa/egl/context.prf b/mkspecs/features/qpa/egl/context.prf deleted file mode 100644 index 0689a3e71e..0000000000 --- a/mkspecs/features/qpa/egl/context.prf +++ /dev/null @@ -1,9 +0,0 @@ -load(qpa/platforms_dir) - -INCLUDEPATH += $$QT_PLATFORMS_DIR/eglconvenience - -SOURCES += \ - $$QT_PLATFORMS_DIR/eglconvenience/qeglplatformcontext.cpp - -HEADERS += \ - $$QT_PLATFORMS_DIR/eglconvenience/qeglplatformcontext.h diff --git a/mkspecs/features/qpa/egl/convenience.prf b/mkspecs/features/qpa/egl/convenience.prf deleted file mode 100644 index e1449cb5e5..0000000000 --- a/mkspecs/features/qpa/egl/convenience.prf +++ /dev/null @@ -1,9 +0,0 @@ -load(qpa/platforms_dir) - -INCLUDEPATH += $$QT_PLATFORMS_DIR/eglconvenience - -SOURCES += \ - $$QT_PLATFORMS_DIR/eglconvenience/qeglconvenience.cpp - -HEADERS += \ - $$QT_PLATFORMS_DIR/eglconvenience/qeglconvenience.h diff --git a/mkspecs/features/qpa/egl/xlibintegration.prf b/mkspecs/features/qpa/egl/xlibintegration.prf deleted file mode 100644 index ad267f17b7..0000000000 --- a/mkspecs/features/qpa/egl/xlibintegration.prf +++ /dev/null @@ -1,9 +0,0 @@ -load(qpa/platforms_dir) - -INCLUDEPATH += $$QT_PLATFORMS_DIR/eglconvenience - -HEADERS += \ - $$QT_PLATFORMS_DIR/eglconvenience/qxlibeglintegration.h - -SOURCES += \ - $$QT_PLATFORMS_DIR/eglconvenience/qxlibeglintegration.cpp diff --git a/mkspecs/features/qpa/fontdatabases/fontconfig.prf b/mkspecs/features/qpa/fontdatabases/fontconfig.prf deleted file mode 100644 index 7091aeaf2d..0000000000 --- a/mkspecs/features/qpa/fontdatabases/fontconfig.prf +++ /dev/null @@ -1,12 +0,0 @@ -load(qpa/fontdatabases/basicunix) - -HEADERS += \ - $$QT_PLATFORMS_DIR/fontdatabases/fontconfig/qfontconfigdatabase.h - -SOURCES += \ - $$QT_PLATFORMS_DIR/fontdatabases/fontconfig/qfontconfigdatabase.cpp - -INCLUDEPATH += $$QT_PLATFORMS_DIR/fontdatabases/fontconfig -LIBS_PRIVATE += -lfontconfig - - diff --git a/mkspecs/features/qpa/fontdatabases/genericunix.prf b/mkspecs/features/qpa/fontdatabases/genericunix.prf deleted file mode 100644 index 014bdd3726..0000000000 --- a/mkspecs/features/qpa/fontdatabases/genericunix.prf +++ /dev/null @@ -1,9 +0,0 @@ -contains(QT_CONFIG, fontconfig) { - load(qpa/fontdatabases/fontconfig) - DEFINES += Q_FONTCONFIGDATABASE -} else { - load(qpa/fontdatabases/basicunix.prf) -} - -INCLUDEPATH += $$QT_PLATFORMS_DIR/fontdatabases/genericunix -HEADERS += $$QT_PLATFORMS_DIR/fontdatabases/genericunix/qgenericunixfontdatabase.h diff --git a/mkspecs/features/qpa/fontengine_dir.prf b/mkspecs/features/qpa/fontengine_dir.prf deleted file mode 100644 index ac88e03110..0000000000 --- a/mkspecs/features/qpa/fontengine_dir.prf +++ /dev/null @@ -1,9 +0,0 @@ -load(qpa/platforms_dir) - -QT_FONTENGINE_DIR = "" - -isEmpty(QT_SOURCE_TREE) { - QT_FONTENGINE_DIR = $$QT_PLATFORMS_DIR/fontdatabases/fontengines -} else { - QT_FONTENGINE_DIR = $$QT_SOURCE_TREE/src/gui/text -} diff --git a/mkspecs/features/qpa/freetype_dir.prf b/mkspecs/features/qpa/freetype_dir.prf deleted file mode 100644 index b3591f2a88..0000000000 --- a/mkspecs/features/qpa/freetype_dir.prf +++ /dev/null @@ -1,8 +0,0 @@ -load(qpa/platforms_dir) - -QT_FREETYPE_DIR = "" -isEmpty(QT_SOURCE_TREE) { - QT_FREETYPE_DIR = $$QT_PLATFORMS_DIR/fontdatabases/freetype -} else { - QT_FREETYPE_DIR = $$QT_SOURCE_TREE/src/3rdparty/freetype -} diff --git a/mkspecs/features/qpa/genericunixfontdatabase.prf b/mkspecs/features/qpa/genericunixfontdatabase.prf new file mode 100644 index 0000000000..20b31a7e67 --- /dev/null +++ b/mkspecs/features/qpa/genericunixfontdatabase.prf @@ -0,0 +1,5 @@ +CONFIG += qpa/basicunixfontdatabase +contains(QT_CONFIG, fontconfig) { + DEFINES += Q_FONTCONFIGDATABASE + LIBS += -lfontconfig +} diff --git a/mkspecs/features/qpa/glx/convenience.prf b/mkspecs/features/qpa/glx/convenience.prf deleted file mode 100644 index 41ef193a99..0000000000 --- a/mkspecs/features/qpa/glx/convenience.prf +++ /dev/null @@ -1,16 +0,0 @@ -load(qpa/platforms_dir) -INCLUDEPATH += $$QT_PLATFORMS_DIR/glxconvenience - -HEADERS += \ - $$QT_PLATFORMS_DIR/glxconvenience/qglxconvenience.h - -SOURCES += \ - $$QT_PLATFORMS_DIR/glxconvenience/qglxconvenience.cpp - -CONFIG += xrender - -xrender { - LIBS += -lXrender -} else { - DEFINES += QT_NO_XRENDER -} diff --git a/mkspecs/features/qpa/harfbuzz_dir.prf b/mkspecs/features/qpa/harfbuzz_dir.prf deleted file mode 100644 index b0a368f031..0000000000 --- a/mkspecs/features/qpa/harfbuzz_dir.prf +++ /dev/null @@ -1,9 +0,0 @@ -load(qpa/platforms_dir) - -QT_HARFBUZZ_DIR = "" -isEmpty(QT_SOURCE_TREE) { - QT_HARFBUZZ_DIR = $$QT_PLATFORMS_DIR/fontdatabases/harfbuzz -} else { - QT_HARFBUZZ_DIR = $$QT_SOURCE_TREE/src/3rdparty/harfbuzz -} - diff --git a/mkspecs/features/qpa/platforms_dir.prf b/mkspecs/features/qpa/platforms_dir.prf deleted file mode 100644 index edb313c84f..0000000000 --- a/mkspecs/features/qpa/platforms_dir.prf +++ /dev/null @@ -1,7 +0,0 @@ -QT_PLATFORMS_DIR = "" - -isEmpty(QT_SOURCE_TREE) { - QT_PLATFORMS_DIR = $$[QT_INSTALL_DATA]/platforms -} else { - QT_PLATFORMS_DIR = $$QT_SOURCE_TREE/src/plugins/platforms -} diff --git a/mkspecs/features/qpa/plugin.prf b/mkspecs/features/qpa/plugin.prf deleted file mode 100644 index d2ee6a2a55..0000000000 --- a/mkspecs/features/qpa/plugin.prf +++ /dev/null @@ -1,5 +0,0 @@ -TEMPLATE = lib - -CONFIG += qt plugin - -TARGET = $$qtLibraryTarget($$TARGET) diff --git a/mkspecs/features/qpa/printersupport/genericunix.prf b/mkspecs/features/qpa/printersupport/genericunix.prf deleted file mode 100644 index c5af646815..0000000000 --- a/mkspecs/features/qpa/printersupport/genericunix.prf +++ /dev/null @@ -1,6 +0,0 @@ -load(qpa/platforms_dir) - -INCLUDEPATH += $$QT_PLATFORMS_DIR/printersupport/genericunix -HEADERS += $$QT_PLATFORMS_DIR/printersupport/genericunix/qgenericunixprintersupport.h -SOURCES += $$QT_PLATFORMS_DIR/printersupport/genericunix/qgenericunixprintersupport.cpp -QT += gui-private diff --git a/mkspecs/features/qpa/printersupport/windows.prf b/mkspecs/features/qpa/printersupport/windows.prf deleted file mode 100644 index 40043259dd..0000000000 --- a/mkspecs/features/qpa/printersupport/windows.prf +++ /dev/null @@ -1,13 +0,0 @@ -load(qpa/platforms_dir) -load(qpa/harfbuzz_dir) - -INCLUDEPATH += $$QT_PLATFORMS_DIR/printersupport/windows -INCLUDEPATH += $$QT_HARFBUZZ_DIR/src - -HEADERS += \ - $$QT_PLATFORMS_DIR/printersupport/windows/qwindowsprintersupport.h \ - $$QT_PLATFORMS_DIR/printersupport/windows/qprintengine_win_p.h -SOURCES += \ - $$QT_PLATFORMS_DIR/printersupport/windows/qwindowsprintersupport.cpp \ - $$QT_PLATFORMS_DIR/printersupport/windows/qprintengine_win.cpp -QT += core-private widgets-private diff --git a/src/modules/qt_platformsupport.pri b/src/modules/qt_platformsupport.pri new file mode 100644 index 0000000000..199beaf563 --- /dev/null +++ b/src/modules/qt_platformsupport.pri @@ -0,0 +1,14 @@ +QT.platformsupport.VERSION = 5.0.0 +QT.platformsupport.MAJOR_VERSION = 5 +QT.platformsupport.MINOR_VERSION = 0 +QT.platformsupport.PATCH_VERSION = 0 + +QT.platformsupport.name = QtPlatformSupport +QT.platformsupport.includes = $$QT_MODULE_INCLUDE_BASE/QtPlatformSupport +QT.platformsupport.private_includes = $$QT_MODULE_INCLUDE_BASE/QtPlatformSupport/$$QT.platformsupport.VERSION +QT.platformsupport.sources = $$QT_MODULE_BASE/src/platformsupport +QT.platformsupport.libs = $$QT_MODULE_LIB_BASE +QT.platformsupport.plugins = $$QT_MODULE_PLUGIN_BASE +QT.platformsupport.imports = $$QT_MODULE_IMPORT_BASE +QT.platformsupport.depends = core gui +QT.platformsupport.DEFINES = diff --git a/src/platformsupport/dnd/dnd.pri b/src/platformsupport/dnd/dnd.pri new file mode 100644 index 0000000000..e100dd10cb --- /dev/null +++ b/src/platformsupport/dnd/dnd.pri @@ -0,0 +1,4 @@ +HEADERS += \ + $$PWD/qsimpledrag_p.h +SOURCES += \ + $$PWD/qsimpledrag.cpp diff --git a/src/plugins/platforms/dnd/qsimpledrag.cpp b/src/platformsupport/dnd/qsimpledrag.cpp similarity index 99% rename from src/plugins/platforms/dnd/qsimpledrag.cpp rename to src/platformsupport/dnd/qsimpledrag.cpp index 8032149875..72da29c063 100644 --- a/src/plugins/platforms/dnd/qsimpledrag.cpp +++ b/src/platformsupport/dnd/qsimpledrag.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qsimpledrag.h" +#include "qsimpledrag_p.h" #include "qbitmap.h" #include "qdrag.h" diff --git a/src/plugins/platforms/dnd/qsimpledrag.h b/src/platformsupport/dnd/qsimpledrag_p.h similarity index 100% rename from src/plugins/platforms/dnd/qsimpledrag.h rename to src/platformsupport/dnd/qsimpledrag_p.h diff --git a/src/platformsupport/eglconvenience/eglconvenience.pri b/src/platformsupport/eglconvenience/eglconvenience.pri new file mode 100644 index 0000000000..f8500e2de0 --- /dev/null +++ b/src/platformsupport/eglconvenience/eglconvenience.pri @@ -0,0 +1,15 @@ +contains(QT_CONFIG,opengles2) { + HEADERS += \ + $$PWD/qeglconvenience_p.h \ + $$PWD/qeglplatformcontext_p.h + SOURCES += \ + $$PWD/qeglconvenience.cpp \ + $$PWD/qeglplatformcontext.cpp + + contains(QT_CONFIG,xlib) { + HEADERS += \ + $$PWD/qxlibeglintegration_p.h + SOURCES += \ + $$PWD/qxlibeglintegration.cpp + } +} diff --git a/src/plugins/platforms/eglconvenience/qeglconvenience.cpp b/src/platformsupport/eglconvenience/qeglconvenience.cpp similarity index 99% rename from src/plugins/platforms/eglconvenience/qeglconvenience.cpp rename to src/platformsupport/eglconvenience/qeglconvenience.cpp index 2f686d6f76..a9973b642a 100644 --- a/src/plugins/platforms/eglconvenience/qeglconvenience.cpp +++ b/src/platformsupport/eglconvenience/qeglconvenience.cpp @@ -41,7 +41,7 @@ #include -#include "qeglconvenience.h" +#include "qeglconvenience_p.h" QT_BEGIN_NAMESPACE diff --git a/src/plugins/platforms/eglconvenience/qeglconvenience.h b/src/platformsupport/eglconvenience/qeglconvenience_p.h similarity index 100% rename from src/plugins/platforms/eglconvenience/qeglconvenience.h rename to src/platformsupport/eglconvenience/qeglconvenience_p.h diff --git a/src/plugins/platforms/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp similarity index 98% rename from src/plugins/platforms/eglconvenience/qeglplatformcontext.cpp rename to src/platformsupport/eglconvenience/qeglplatformcontext.cpp index c96e8ed67a..bb2d167c81 100644 --- a/src/plugins/platforms/eglconvenience/qeglplatformcontext.cpp +++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp @@ -39,13 +39,12 @@ ** ****************************************************************************/ -#include "qeglplatformcontext.h" +#include "qeglplatformcontext_p.h" +#include "qeglconvenience_p.h" #include -#include "qeglconvenience.h" - #include QEGLSurface::QEGLSurface(EGLSurface surface, const QGuiGLFormat &format) diff --git a/src/plugins/platforms/eglconvenience/qeglplatformcontext.h b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h similarity index 100% rename from src/plugins/platforms/eglconvenience/qeglplatformcontext.h rename to src/platformsupport/eglconvenience/qeglplatformcontext_p.h diff --git a/src/plugins/platforms/eglconvenience/qxlibeglintegration.cpp b/src/platformsupport/eglconvenience/qxlibeglintegration.cpp similarity index 99% rename from src/plugins/platforms/eglconvenience/qxlibeglintegration.cpp rename to src/platformsupport/eglconvenience/qxlibeglintegration.cpp index cbd8f7d7c6..aeebd35d21 100644 --- a/src/plugins/platforms/eglconvenience/qxlibeglintegration.cpp +++ b/src/platformsupport/eglconvenience/qxlibeglintegration.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qxlibeglintegration.h" +#include "qxlibeglintegration_p.h" static int countBits(unsigned long mask) { diff --git a/src/plugins/platforms/eglconvenience/qxlibeglintegration.h b/src/platformsupport/eglconvenience/qxlibeglintegration_p.h similarity index 98% rename from src/plugins/platforms/eglconvenience/qxlibeglintegration.h rename to src/platformsupport/eglconvenience/qxlibeglintegration_p.h index 1d02ab8677..cce394758d 100644 --- a/src/plugins/platforms/eglconvenience/qxlibeglintegration.h +++ b/src/platformsupport/eglconvenience/qxlibeglintegration_p.h @@ -42,7 +42,7 @@ #ifndef QTESTLITEEGLINTEGRATION_H #define QTESTLITEEGLINTEGRATION_H -#include "qeglconvenience.h" +#include "qeglconvenience_p.h" class QXlibEglIntegration { diff --git a/src/plugins/platforms/fb_base/fb_base.cpp b/src/platformsupport/fb_base/fb_base.cpp similarity index 99% rename from src/plugins/platforms/fb_base/fb_base.cpp rename to src/platformsupport/fb_base/fb_base.cpp index a83d739083..aa395fec29 100644 --- a/src/plugins/platforms/fb_base/fb_base.cpp +++ b/src/platformsupport/fb_base/fb_base.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "fb_base.h" +#include "fb_base_p.h" #include #include #include diff --git a/src/platformsupport/fb_base/fb_base.pri b/src/platformsupport/fb_base/fb_base.pri new file mode 100644 index 0000000000..e80125d54e --- /dev/null +++ b/src/platformsupport/fb_base/fb_base.pri @@ -0,0 +1,4 @@ +do_not_compile_untill_ported_to_qt5 { + SOURCES += $$PWD/fb_base.cpp + HEADERS += $$PWD/fb_base_p.h +} diff --git a/src/plugins/platforms/fb_base/fb_base.h b/src/platformsupport/fb_base/fb_base_p.h similarity index 100% rename from src/plugins/platforms/fb_base/fb_base.h rename to src/platformsupport/fb_base/fb_base_p.h diff --git a/mkspecs/features/qpa/fontdatabases/basicunix.prf b/src/platformsupport/fontdatabases/basicunix/basicunix.pri similarity index 58% rename from mkspecs/features/qpa/fontdatabases/basicunix.prf rename to src/platformsupport/fontdatabases/basicunix/basicunix.pri index d31b89e074..bd57b384b3 100644 --- a/mkspecs/features/qpa/fontdatabases/basicunix.prf +++ b/src/platformsupport/fontdatabases/basicunix/basicunix.pri @@ -1,29 +1,22 @@ -#### Remove this define DEFINES += QT_NO_FONTCONFIG - QT += gui-private core-private -load(qpa/platforms_dir) -load(qpa/harfbuzz_dir) -load(qpa/freetype_dir) -load(qpa/fontengine_dir) - - HEADERS += \ - $$QT_PLATFORMS_DIR/fontdatabases/basicunix/qbasicunixfontdatabase.h \ - $$QT_FONTENGINE_DIR/qfontengine_ft_p.h + $$PWD/qbasicunixfontdatabase_p.h \ + $$QT_SOURCE_TREE/src/gui/text/qfontengine_ft_p.h SOURCES += \ - $$QT_PLATFORMS_DIR/fontdatabases/basicunix/qbasicunixfontdatabase.cpp \ - $$QT_FONTENGINE_DIR/qfontengine_ft.cpp + $$PWD/qbasicunixfontdatabase.cpp \ + $$QT_SOURCE_TREE/src/gui/text/qfontengine_ft.cpp -INCLUDEPATH += $$QT_HARFBUZZ_DIR/src +INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/harfbuzz/src -INCLUDEPATH += $$QT_PLATFORMS_DIR/fontdatabases/basicunix +INCLUDEPATH += $$PWD CONFIG += opentype contains(QT_CONFIG, freetype) { + QT_FREETYPE_DIR = $$QT_SOURCE_TREE/src/3rdparty/freetype SOURCES += \ $$QT_FREETYPE_DIR/src/base/ftbase.c \ $$QT_FREETYPE_DIR/src/base/ftbbox.c \ @@ -69,37 +62,27 @@ contains(QT_CONFIG, freetype) { $$QT_FREETYPE_DIR/src/autofit/afloader.c\ $$QT_FREETYPE_DIR/src/autofit/autofit.c - symbian { - SOURCES += \ - $$QT_FREETYPE_DIR/src/base/ftsystem.c - } else { - SOURCES += \ - $$QT_FREETYPE_DIR/builds/unix/ftsystem.c - INCLUDEPATH += \ - $$QT_FREETYPE_DIR/builds/unix - } + symbian { + SOURCES += \ + $$QT_FREETYPE_DIR/src/base/ftsystem.c + } else { + SOURCES += \ + $$QT_FREETYPE_DIR/builds/unix/ftsystem.c + INCLUDEPATH += \ + $$QT_FREETYPE_DIR/builds/unix + } - INCLUDEPATH += \ - $$QT_FREETYPE_DIR/src \ - $$QT_FREETYPE_DIR/include + INCLUDEPATH += \ + $$QT_FREETYPE_DIR/src \ + $$QT_FREETYPE_DIR/include - DEFINES += FT2_BUILD_LIBRARY - contains(QT_CONFIG, system-zlib) { - DEFINES += FT_CONFIG_OPTION_SYSTEM_ZLIB - } + DEFINES += FT2_BUILD_LIBRARY + contains(QT_CONFIG, system-zlib) { + DEFINES += FT_CONFIG_OPTION_SYSTEM_ZLIB + } - } else:contains(QT_CONFIG, system-freetype) { - # pull in the proper freetype2 include directory - #include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri) - !cross_compile { - TRY_INCLUDEPATHS = /include /usr/include $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH - # LSB doesn't allow using headers from /include or /usr/include - linux-lsb-g++:TRY_INCLUDEPATHS = $$QMAKE_INCDIR $$QMAKE_INCDIR_X11 $$INCLUDEPATH - for(p, TRY_INCLUDEPATHS) { - p = $$join(p, "", "", "/freetype2") - exists($$p):INCLUDEPATH *= $$p - } - } - LIBS_PRIVATE += -lfreetype - } +} else:contains(QT_CONFIG, system-freetype) { + # pull in the proper freetype2 include directory + include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri) +} diff --git a/src/plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.cpp b/src/platformsupport/fontdatabases/basicunix/qbasicunixfontdatabase.cpp similarity index 98% rename from src/plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.cpp rename to src/platformsupport/fontdatabases/basicunix/qbasicunixfontdatabase.cpp index 38cbe2cbf6..1b0966d4b8 100644 --- a/src/plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.cpp +++ b/src/platformsupport/fontdatabases/basicunix/qbasicunixfontdatabase.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qbasicunixfontdatabase.h" +#include "qbasicunixfontdatabase_p.h" #include #include @@ -312,12 +312,12 @@ QStringList QBasicUnixFontDatabase::addTTFile(const QByteArray &fontData, const QString family = QString::fromAscii(face->family_name); FontFile *fontFile = new FontFile; - fontFile->fileName = file; + fontFile->fileName = QString::fromAscii(file); fontFile->indexValue = index; QFont::Stretch stretch = QFont::Unstretched; - registerFont(family,"",weight,style,stretch,true,true,0,writingSystems,fontFile); + registerFont(family,QString(),weight,style,stretch,true,true,0,writingSystems,fontFile); families.append(family); diff --git a/src/plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.h b/src/platformsupport/fontdatabases/basicunix/qbasicunixfontdatabase_p.h similarity index 100% rename from src/plugins/platforms/fontdatabases/basicunix/qbasicunixfontdatabase.h rename to src/platformsupport/fontdatabases/basicunix/qbasicunixfontdatabase_p.h diff --git a/src/platformsupport/fontdatabases/fontconfig/fontconfig.pri b/src/platformsupport/fontdatabases/fontconfig/fontconfig.pri new file mode 100644 index 0000000000..2efcb4d4dc --- /dev/null +++ b/src/platformsupport/fontdatabases/fontconfig/fontconfig.pri @@ -0,0 +1,2 @@ +HEADERS += $$PWD/qfontconfigdatabase_p.h +SOURCES += $$PWD/qfontconfigdatabase.cpp diff --git a/src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp similarity index 97% rename from src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.cpp rename to src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp index aeb0c76135..d506d7c0f8 100644 --- a/src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.cpp +++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qfontconfigdatabase.h" +#include "qfontconfigdatabase_p.h" #include #include @@ -446,10 +446,11 @@ void QFontconfigDatabase::populateFontDatabase() ws.setSupported(QFontDatabase::Latin); + QString familyQtName = QString::fromLatin1(f->qtname); while (f->qtname) { - registerFont(f->qtname,QLatin1String(""),QFont::Normal,QFont::StyleNormal,QFont::Unstretched,true,true,0,ws,0); - registerFont(f->qtname,QLatin1String(""),QFont::Normal,QFont::StyleItalic,QFont::Unstretched,true,true,0,ws,0); - registerFont(f->qtname,QLatin1String(""),QFont::Normal,QFont::StyleOblique,QFont::Unstretched,true,true,0,ws,0); + registerFont(familyQtName,QString(),QFont::Normal,QFont::StyleNormal,QFont::Unstretched,true,true,0,ws,0); + registerFont(familyQtName,QString(),QFont::Normal,QFont::StyleItalic,QFont::Unstretched,true,true,0,ws,0); + registerFont(familyQtName,QString(),QFont::Normal,QFont::StyleOblique,QFont::Unstretched,true,true,0,ws,0); ++f; } diff --git a/src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.h b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase_p.h similarity index 97% rename from src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.h rename to src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase_p.h index 61700e391a..5a5e4b670f 100644 --- a/src/plugins/platforms/fontdatabases/fontconfig/qfontconfigdatabase.h +++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase_p.h @@ -43,7 +43,7 @@ #define QFONTCONFIGDATABASE_H #include -#include "qbasicunixfontdatabase.h" +#include class QFontconfigDatabase : public QBasicUnixFontDatabase { diff --git a/src/platformsupport/fontdatabases/fontdatabases.pri b/src/platformsupport/fontdatabases/fontdatabases.pri new file mode 100644 index 0000000000..609a548ad1 --- /dev/null +++ b/src/platformsupport/fontdatabases/fontdatabases.pri @@ -0,0 +1,7 @@ +unix { + include($$PWD/basicunix/basicunix.pri) + include($$PWD/genericunix/genericunix.pri) + contains(QT_CONFIG,fontconfig) { + include($$PWD/fontconfig/fontconfig.pri) + } +} diff --git a/src/platformsupport/fontdatabases/genericunix/genericunix.pri b/src/platformsupport/fontdatabases/genericunix/genericunix.pri new file mode 100644 index 0000000000..e9db6c07e2 --- /dev/null +++ b/src/platformsupport/fontdatabases/genericunix/genericunix.pri @@ -0,0 +1 @@ +HEADERS += $$PWD/qgenericunixfontdatabase_p.h diff --git a/src/plugins/platforms/fontdatabases/genericunix/qgenericunixfontdatabase.h b/src/platformsupport/fontdatabases/genericunix/qgenericunixfontdatabase_p.h similarity index 94% rename from src/plugins/platforms/fontdatabases/genericunix/qgenericunixfontdatabase.h rename to src/platformsupport/fontdatabases/genericunix/qgenericunixfontdatabase_p.h index 8bf542a215..721bccd585 100644 --- a/src/plugins/platforms/fontdatabases/genericunix/qgenericunixfontdatabase.h +++ b/src/platformsupport/fontdatabases/genericunix/qgenericunixfontdatabase_p.h @@ -43,10 +43,10 @@ #define QGENERICUNIXFONTDATABASE_H #ifdef Q_FONTCONFIGDATABASE -#include "qfontconfigdatabase.h" +#include "QtPlatformSupport/private/qfontconfigdatabase_p.h" typedef QFontconfigDatabase QGenericUnixFontDatabase; #else -#include "qbasicunixfontdatabase.h" +#include "QtPlatformSupport/private/qbasicunixfontdatabase_p.h" typedef QBasicUnixFontDatabase QGenericUnixFontDatabase; #endif //Q_FONTCONFIGDATABASE diff --git a/src/platformsupport/glxconvenience/glxconvenience.pri b/src/platformsupport/glxconvenience/glxconvenience.pri new file mode 100644 index 0000000000..5b65e13306 --- /dev/null +++ b/src/platformsupport/glxconvenience/glxconvenience.pri @@ -0,0 +1,6 @@ +contains(QT_CONFIG,xlib) { + contains(QT_CONFIG,opengl):!contains(QT_CONFIG,opengles2) { + HEADERS += $$PWD/qglxconvenience_p.h + SOURCES += $$PWD/qglxconvenience.cpp + } +} diff --git a/src/plugins/platforms/glxconvenience/qglxconvenience.cpp b/src/platformsupport/glxconvenience/qglxconvenience.cpp similarity index 99% rename from src/plugins/platforms/glxconvenience/qglxconvenience.cpp rename to src/platformsupport/glxconvenience/qglxconvenience.cpp index 189ab397d2..fc506df3bd 100644 --- a/src/plugins/platforms/glxconvenience/qglxconvenience.cpp +++ b/src/platformsupport/glxconvenience/qglxconvenience.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include "qglxconvenience.h" +#include "qglxconvenience_p.h" #include diff --git a/src/plugins/platforms/glxconvenience/qglxconvenience.h b/src/platformsupport/glxconvenience/qglxconvenience_p.h similarity index 100% rename from src/plugins/platforms/glxconvenience/qglxconvenience.h rename to src/platformsupport/glxconvenience/qglxconvenience_p.h diff --git a/src/platformsupport/platformsupport.pro b/src/platformsupport/platformsupport.pro new file mode 100644 index 0000000000..33b651a73f --- /dev/null +++ b/src/platformsupport/platformsupport.pro @@ -0,0 +1,23 @@ +TARGET = QtPlatformSupport +QPRO_PWD = $$PWD +QT += core-private gui-private + +CONFIG += module staticlib +MODULE_PRI = ../modules/qt_platformssupport.pri + +unix|win32-g++*:QMAKE_PKGCONFIG_REQUIRES = QtCore QtGui + +include(../qbase.pri) + +HEADERS += $$QT_SOURCE_TREE/src/platforms_libs/qtplatformslibsversion.h + +DEFINES += QT_NO_CAST_FROM_ASCII +PRECOMPILED_HEADER = ../corelib/global/qt_pch.h + +include(dnd/dnd.pri) +include(eglconvenience/eglconvenience.pri) +include(fb_base/fb_base.pri) +include(fontdatabases/fontdatabases.pri) +include(glxconvenience/glxconvenience.pri) +include(printersupport/printersupport.pri) + diff --git a/src/platformsupport/printersupport/genericunix/genericunix.pri b/src/platformsupport/printersupport/genericunix/genericunix.pri new file mode 100644 index 0000000000..06bd1b6d21 --- /dev/null +++ b/src/platformsupport/printersupport/genericunix/genericunix.pri @@ -0,0 +1,2 @@ +HEADERS += $$PWD/qgenericunixprintersupport_p.h +SOURCES += $$PWD/qgenericunixprintersupport.cpp diff --git a/src/plugins/platforms/printersupport/genericunix/qgenericunixprintersupport.cpp b/src/platformsupport/printersupport/genericunix/qgenericunixprintersupport.cpp similarity index 98% rename from src/plugins/platforms/printersupport/genericunix/qgenericunixprintersupport.cpp rename to src/platformsupport/printersupport/genericunix/qgenericunixprintersupport.cpp index 61caa8705a..ae66ce859f 100644 --- a/src/plugins/platforms/printersupport/genericunix/qgenericunixprintersupport.cpp +++ b/src/platformsupport/printersupport/genericunix/qgenericunixprintersupport.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include "qgenericunixprintersupport_p.h" #include #include diff --git a/src/plugins/platforms/printersupport/genericunix/qgenericunixprintersupport.h b/src/platformsupport/printersupport/genericunix/qgenericunixprintersupport_p.h similarity index 100% rename from src/plugins/platforms/printersupport/genericunix/qgenericunixprintersupport.h rename to src/platformsupport/printersupport/genericunix/qgenericunixprintersupport_p.h diff --git a/src/platformsupport/printersupport/printersupport.pri b/src/platformsupport/printersupport/printersupport.pri new file mode 100644 index 0000000000..1eca1e2d89 --- /dev/null +++ b/src/platformsupport/printersupport/printersupport.pri @@ -0,0 +1,7 @@ +unix { + include($$PWD/genericunix/genericunix.pri) +} + +win { + include($$PWD/windows/windows.pri) +} diff --git a/src/plugins/platforms/printersupport/windows/qwindowsprintersupport.cpp b/src/platformsupport/printersupport/windows/qwindowsprintersupport.cpp similarity index 99% rename from src/plugins/platforms/printersupport/windows/qwindowsprintersupport.cpp rename to src/platformsupport/printersupport/windows/qwindowsprintersupport.cpp index d5c185fee3..62449295bb 100644 --- a/src/plugins/platforms/printersupport/windows/qwindowsprintersupport.cpp +++ b/src/platformsupport/printersupport/windows/qwindowsprintersupport.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include +#include #include #include diff --git a/src/plugins/platforms/printersupport/windows/qwindowsprintersupport.h b/src/platformsupport/printersupport/windows/qwindowsprintersupport_p.h similarity index 100% rename from src/plugins/platforms/printersupport/windows/qwindowsprintersupport.h rename to src/platformsupport/printersupport/windows/qwindowsprintersupport_p.h diff --git a/src/platformsupport/printersupport/windows/windows.pri b/src/platformsupport/printersupport/windows/windows.pri new file mode 100644 index 0000000000..69a8c47443 --- /dev/null +++ b/src/platformsupport/printersupport/windows/windows.pri @@ -0,0 +1,2 @@ +HEADERS += $$PWD/qwindowsprintersupport_p.h +SOURCES += $$PWD/qwindowsprintersupport.cpp diff --git a/src/plugins/platforms/cocoa/cocoa.pro b/src/plugins/platforms/cocoa/cocoa.pro index 9ad91975f3..5573b19fcd 100644 --- a/src/plugins/platforms/cocoa/cocoa.pro +++ b/src/plugins/platforms/cocoa/cocoa.pro @@ -1,5 +1,5 @@ TARGET = qcocoa -load(qpa/plugin) +load(qt_plugin) DESTDIR = $$QT.gui.plugins/platforms OBJECTIVE_SOURCES = main.mm \ @@ -28,8 +28,8 @@ DEFINES += QT_BUILD_COCOA_LIB LIBS += -lz LIBS += -framework cocoa -QT += core-private gui-private +QT += core-private gui-private platformsupport-private -load(qpa/fontdatabases/basicunix) +CONFIG += qpa/basicunixfontdatabase target.path += $$[QT_INSTALL_PLUGINS]/platforms INSTALLS += target diff --git a/src/plugins/platforms/fb_base/fb_base.pri b/src/plugins/platforms/fb_base/fb_base.pri deleted file mode 100644 index 41bd87fbca..0000000000 --- a/src/plugins/platforms/fb_base/fb_base.pri +++ /dev/null @@ -1,2 +0,0 @@ -SOURCES += ../fb_base/fb_base.cpp -HEADERS += ../fb_base/fb_base.h diff --git a/src/plugins/platforms/fb_base/fb_base.pro b/src/plugins/platforms/fb_base/fb_base.pro deleted file mode 100644 index 4ebd53b407..0000000000 --- a/src/plugins/platforms/fb_base/fb_base.pro +++ /dev/null @@ -1,23 +0,0 @@ -#------------------------------------------------- -# -# Project created by QtCreator 2009-11-05T13:22:31 -# -#------------------------------------------------- - -#QT -= core gui -TARGET = fb_base -#load(qt_plugin) - -DESTDIR = $$QT.gui.plugins/graphicssystems - -TEMPLATE = lib - -#DEFINES += STATIC_LIBRARY -CONFIG += staticlib - -SOURCES += fb_base.cpp - -HEADERS += fb_base.h - -target.path += $$[QT_INSTALL_PLUGINS]/graphicssystems -INSTALLS += target diff --git a/src/plugins/platforms/minimal/minimal.pro b/src/plugins/platforms/minimal/minimal.pro index b8c65a3e3b..d51b6b2ed0 100644 --- a/src/plugins/platforms/minimal/minimal.pro +++ b/src/plugins/platforms/minimal/minimal.pro @@ -1,5 +1,5 @@ TARGET = qminimal -load(qpa/plugin) +load(qt_plugin) QT = core-private gui-private DESTDIR = $$QT.gui.plugins/platforms diff --git a/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglcontext.cpp b/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglcontext.cpp index 08b6f76daf..c5db44da4b 100644 --- a/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglcontext.cpp +++ b/src/plugins/platforms/wayland/gl_integration/xcomposite_egl/qwaylandxcompositeeglcontext.cpp @@ -46,7 +46,7 @@ #include #include -#include "qeglconvenience.h" +#include "QtPlatformSupport/private/qeglconvenience_p.h" QWaylandXCompositeEGLSurface::QWaylandXCompositeEGLSurface(QWaylandXCompositeEGLWindow *window) : QEGLSurface(window->eglSurface(), window->window()->glFormat()) diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp index 226bfd44d5..4c2eaa631c 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.cpp +++ b/src/plugins/platforms/wayland/qwaylandintegration.cpp @@ -47,7 +47,7 @@ #include "qwaylandnativeinterface.h" #include "qwaylandclipboard.h" -#include "qgenericunixfontdatabase.h" +#include "QtPlatformSupport/private/qgenericunixfontdatabase_p.h" #include #include diff --git a/src/plugins/platforms/wayland/wayland.pro b/src/plugins/platforms/wayland/wayland.pro index b37bfbbb3b..6a6ffdffc0 100644 --- a/src/plugins/platforms/wayland/wayland.pro +++ b/src/plugins/platforms/wayland/wayland.pro @@ -1,14 +1,14 @@ TARGET = qwayland -load(qpa/plugin) +load(qt_plugin) -QT+=gui-private core-private opengl-private +CONFIG += qpa/genericunixfontdatabase DESTDIR = $$QT.gui.plugins/platforms DEFINES += Q_PLATFORM_WAYLAND DEFINES += $$QMAKE_DEFINES_WAYLAND -QT += core-private gui-private opengl-private +QT += core-private gui-private opengl-private platformsupport-private SOURCES = main.cpp \ qwaylandintegration.cpp \ @@ -37,19 +37,6 @@ INCLUDEPATH += $$QMAKE_INCDIR_WAYLAND LIBS += $$QMAKE_LIBS_WAYLAND QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_WAYLAND -INCLUDEPATH += $$PWD - -QT += gui-private -QT += opengl-private -QT += core-private -QT += widgets-private - -include ($$PWD/gl_integration/gl_integration.pri) - -include ($$PWD/windowmanager_integration/windowmanager_integration.pri) - -load(qpa/fontdatabases/genericunix) - target.path += $$[QT_INSTALL_PLUGINS]/platforms INSTALLS += target diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index bd1924def9..45d9d69199 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -49,13 +49,13 @@ #include "qxcbdrag.h" #include "qxcbimage.h" -#include +#include #include #include -#include "qgenericunixfontdatabase.h" +#include #include diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp index bf8ca2a584..45823fcc57 100644 --- a/src/plugins/platforms/xcb/qxcbnativeinterface.cpp +++ b/src/plugins/platforms/xcb/qxcbnativeinterface.cpp @@ -51,7 +51,7 @@ #include #if defined(XCB_USE_EGL) -#include "../eglconvenience/qeglplatformcontext.h" +#include "QtPlatformSupport/private/qeglplatformcontext_p.h" #elif defined (XCB_USE_DRI2) #include "qdri2context.h" #endif diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 22a476b690..e6bea81c30 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -68,12 +68,12 @@ #endif #if defined(XCB_USE_GLX) -#include "qglxintegration.h" -#include "qglxconvenience.h" +#include +#include #elif defined(XCB_USE_EGL) -#include "../eglconvenience/qeglplatformcontext.h" -#include "../eglconvenience/qeglconvenience.h" -#include "../eglconvenience/qxlibeglintegration.h" +#include +#include +#include #endif #define XCOORD_MAX 16383 diff --git a/src/plugins/platforms/xcb/xcb.pro b/src/plugins/platforms/xcb/xcb.pro index 2b545f9b1d..c8814b04f6 100644 --- a/src/plugins/platforms/xcb/xcb.pro +++ b/src/plugins/platforms/xcb/xcb.pro @@ -1,9 +1,9 @@ TARGET = xcb -load(qpa/plugin) +load(qt_plugin) QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/platforms -QT += core-private gui-private +QT += core-private gui-private platformsupport-private SOURCES = \ qxcbclipboard.cpp \ @@ -61,14 +61,9 @@ contains(QT_CONFIG, opengl) { } else { contains(QT_CONFIG, opengles2) { DEFINES += XCB_USE_EGL - load(qpa/egl/convenience) - load(qpa/egl/context) - load(qpa/egl/xlibintegration) - LIBS += -lEGL } else { DEFINES += XCB_USE_GLX - load(qpa/glx/convenience) HEADERS += qglxintegration.h SOURCES += qglxintegration.cpp } @@ -83,8 +78,7 @@ DEFINES += $$QMAKE_DEFINES_XCB LIBS += $$QMAKE_LIBS_XCB QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_XCB -load(qpa/fontdatabases/genericunix) -load(qpa/printersupport/genericunix) +CONFIG += qpa/genericunixfontdatabase target.path += $$[QT_INSTALL_PLUGINS]/platforms INSTALLS += target diff --git a/src/src.pro b/src/src.pro index d9997421ce..e9e32db915 100644 --- a/src/src.pro +++ b/src/src.pro @@ -10,7 +10,7 @@ SRC_SUBDIRS += src_corelib !cross_compile { win32:!wince*: SRC_SUBDIRS += src_tools_idc } -SRC_SUBDIRS += src_network src_sql src_gui src_xml src_uitools src_widgets src_testlib +SRC_SUBDIRS += src_network src_sql src_gui src_xml src_uitools src_widgets src_testlib src_platformsupport nacl: SRC_SUBDIRS -= src_network src_testlib !symbian:contains(QT_CONFIG, dbus):SRC_SUBDIRS += src_dbus contains(QT_CONFIG, no-gui): SRC_SUBDIRS -= src_gui @@ -50,6 +50,9 @@ src_widgets.subdir = $$QT_SOURCE_TREE/src/widgets src_widgets.target = sub-widgets src_testlib.subdir = $$QT_SOURCE_TREE/src/testlib src_testlib.target = sub-testlib +src_platformsupport.subdir = $$QT_SOURCE_TREE/src/platformsupport +src_platformsupport.target = sub-platformsupport + #CONFIG += ordered !wince*:!ordered:!symbian-abld:!symbian-sbsv2 { @@ -66,6 +69,7 @@ src_testlib.target = sub-testlib src_testlib.depends = src_corelib src_gui src_widgets src_tools_idc.depends = src_corelib # target defined in tools.pro src_plugins.depends = src_gui src_sql src_xml + qpa: src_plugins.depends = src_platformsupport src_s60installs.depends = $$TOOLS_SUBDIRS $$SRC_SUBDIRS src_s60installs.depends -= src_s60installs contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2) { diff --git a/sync.profile b/sync.profile index 321c7f95b0..db108cb833 100644 --- a/sync.profile +++ b/sync.profile @@ -10,6 +10,7 @@ "QtDBus" => "$basedir/src/dbus", "QtUiTools" => "$basedir/src/uitools", "QtDesigner" => "$basedir/tools/uilib", + "QtPlatformSupport" => "$basedir/src/platformsupport", ); %moduleheaders = ( # restrict the module headers to those found in relative path ); @@ -60,6 +61,7 @@ "QtXml" => "$basedir/src/modules/qt_xml.pri", "QtUiTools" => "$basedir/src/modules/qt_uitools.pri", "QtDesigner" => "$basedir/src/modules/qt_uilib.pri", + "QtPlatformSupport" => "$basedir/src/modules/qt_platformsupport.pri", ); @ignore_for_master_contents = ( "qt.h", "qpaintdevicedefs.h" ); @@ -109,4 +111,8 @@ "QtGui" => "THIS_REPOSITORY", "QtWidgets" => "THIS_REPOSITORY", }, + "QtPlatformSupport" => { + "QtCore" => "THIS_REPOSITORY", + "QtGui" => "THIS_REPOSITORY", + }, );