From c53b86444ff871801e00e09232dde2d7de4a435b Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 3 Apr 2018 12:41:53 +0200 Subject: macOS: Document availability of freetype font engine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since we have this documentation for the Windows platform plugin, it makes sense to also have it for Cocoa. Task-number: QTBUG-67372 Change-Id: I170ae251572c8e209643a582cdd7350aaf5c7ccd Reviewed-by: Tor Arne Vestbø --- src/gui/kernel/qguiapplication.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gui') diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 12390928f0..836bbeccee 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -591,6 +591,12 @@ static QWindowGeometrySpecification windowGeometrySpecification = Q_WINDOW_GEOME applications. \endlist + The following parameter is available for \c {-platform cocoa} (on macOS): + + \list + \li \c {fontengine=freetype}, uses the FreeType font engine. + \endlist + For more information about the platform-specific arguments available for embedded Linux platforms, see \l{Qt for Embedded Linux}. -- cgit v1.2.3 From 4b4870a12cd920cd45c534deae7ca90716398a19 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 22 Mar 2018 16:54:41 +0100 Subject: Parse XDG_SESSION_TYPE and use that to determine default platform Makes Qt application try to launch using wayland in a wayland session, even if it was a default desktop build. Change-Id: Ib7d4a79fbe777527d1862bd775627afae10b1e9e Reviewed-by: Thiago Macieira --- src/gui/kernel/qguiapplication.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/gui') diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 836bbeccee..caa8aaca4b 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -1291,6 +1291,21 @@ void QGuiApplicationPrivate::createPlatformIntegration() #ifdef QT_QPA_DEFAULT_PLATFORM_NAME platformName = QT_QPA_DEFAULT_PLATFORM_NAME; #endif +#if defined(Q_OS_UNIX) && !defined(Q_OS_DARWIN) + QByteArray sessionType = qgetenv("XDG_SESSION_TYPE"); + if (!sessionType.isEmpty()) { + if (sessionType == QByteArrayLiteral("x11") && !platformName.contains(QByteArrayLiteral("xcb"))) + platformName = QByteArrayLiteral("xcb"); + else if (sessionType == QByteArrayLiteral("wayland") && !platformName.contains(QByteArrayLiteral("wayland"))) + platformName = QByteArrayLiteral("wayland"); + } +#ifdef QT_QPA_DEFAULT_PLATFORM_NAME + // Add it as fallback in case XDG_SESSION_TYPE is something wrong + if (!platformName.contains(QT_QPA_DEFAULT_PLATFORM_NAME)) + platformName += QByteArrayLiteral(";" QT_QPA_DEFAULT_PLATFORM_NAME); +#endif +#endif + QByteArray platformNameEnv = qgetenv("QT_QPA_PLATFORM"); if (!platformNameEnv.isEmpty()) { platformName = platformNameEnv; -- cgit v1.2.3