From 7e83f09eadc54fb3a9ae89598a42b7dc0aa2828c Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 15 Jun 2020 10:54:00 +0200 Subject: Move UNIX services into QtGui MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-83255 Change-Id: I95cd25c6e18ffb46955acc76d6cab551d1c8f5ae Reviewed-by: Tor Arne Vestbø --- src/gui/.prev_CMakeLists.txt | 10 + src/gui/CMakeLists.txt | 10 + src/gui/platform/unix/qgenericunixservices.cpp | 374 +++++++++++++++++++++ src/gui/platform/unix/qgenericunixservices_p.h | 76 +++++ src/gui/platform/unix/unix.pri | 10 + src/platformsupport/.prev_CMakeLists.txt | 3 - src/platformsupport/CMakeLists.txt | 3 - src/platformsupport/platformsupport.pro | 3 - src/platformsupport/services/CMakeLists.txt | 30 -- .../services/genericunix/genericunix.pri | 2 - .../services/genericunix/qgenericunixservices.cpp | 374 --------------------- .../services/genericunix/qgenericunixservices_p.h | 76 ----- src/platformsupport/services/services.pro | 14 - src/plugins/platforms/bsdfb/bsdfb.pro | 1 - src/plugins/platforms/bsdfb/qbsdfbintegration.cpp | 2 +- .../platforms/directfb/.prev_CMakeLists.txt | 1 - src/plugins/platforms/directfb/CMakeLists.txt | 1 - src/plugins/platforms/directfb/directfb.pro | 3 +- .../platforms/directfb/qdirectfbintegration.cpp | 2 +- src/plugins/platforms/eglfs/.prev_CMakeLists.txt | 1 - src/plugins/platforms/eglfs/CMakeLists.txt | 1 - .../platforms/eglfs/api/qeglfsintegration.cpp | 2 +- .../platforms/eglfs/eglfsdeviceintegration.pro | 2 +- src/plugins/platforms/integrity/integrity.pro | 1 - .../integrity/qintegrityfbintegration.cpp | 2 +- src/plugins/platforms/linuxfb/.prev_CMakeLists.txt | 1 - src/plugins/platforms/linuxfb/CMakeLists.txt | 1 - src/plugins/platforms/linuxfb/linuxfb.pro | 1 - .../platforms/linuxfb/qlinuxfbintegration.cpp | 2 +- src/plugins/platforms/vnc/.prev_CMakeLists.txt | 1 - src/plugins/platforms/vnc/CMakeLists.txt | 1 - src/plugins/platforms/vnc/qvncintegration.cpp | 2 +- src/plugins/platforms/vnc/vnc.pro | 2 +- src/plugins/platforms/xcb/.prev_CMakeLists.txt | 1 - src/plugins/platforms/xcb/CMakeLists.txt | 1 - src/plugins/platforms/xcb/qxcbintegration.cpp | 2 +- src/plugins/platforms/xcb/xcb_qpa_lib.pro | 2 +- sync.profile | 1 - 38 files changed, 491 insertions(+), 531 deletions(-) create mode 100644 src/gui/platform/unix/qgenericunixservices.cpp create mode 100644 src/gui/platform/unix/qgenericunixservices_p.h delete mode 100644 src/platformsupport/services/CMakeLists.txt delete mode 100644 src/platformsupport/services/genericunix/genericunix.pri delete mode 100644 src/platformsupport/services/genericunix/qgenericunixservices.cpp delete mode 100644 src/platformsupport/services/genericunix/qgenericunixservices_p.h delete mode 100644 src/platformsupport/services/services.pro diff --git a/src/gui/.prev_CMakeLists.txt b/src/gui/.prev_CMakeLists.txt index 85944bf29f..5db0168781 100644 --- a/src/gui/.prev_CMakeLists.txt +++ b/src/gui/.prev_CMakeLists.txt @@ -711,6 +711,16 @@ qt_extend_target(Gui CONDITION QT_FEATURE_glib AND UNIX GLIB2::GLIB2 ) +qt_extend_target(Gui CONDITION UNIX AND (QT_FEATURE_xcb OR NOT UIKIT) + SOURCES + platform/unix/qgenericunixservices.cpp platform/unix/qgenericunixservices_p.h +) + +qt_extend_target(Gui CONDITION TARGET Qt::DBus AND UNIX AND (QT_FEATURE_xcb OR NOT UIKIT) + LIBRARIES + Qt::DBus +) + qt_extend_target(Gui CONDITION IOS OR MACOS SOURCES rhi/qrhimetal.mm rhi/qrhimetal_p.h diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 205a2392d7..7a7989630e 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -859,6 +859,16 @@ qt_extend_target(Gui CONDITION QT_FEATURE_glib AND UNIX GLIB2::GLIB2 ) +qt_extend_target(Gui CONDITION UNIX AND (QT_FEATURE_xcb OR NOT UIKIT) + SOURCES + platform/unix/qgenericunixservices.cpp platform/unix/qgenericunixservices_p.h +) + +qt_extend_target(Gui CONDITION TARGET Qt::DBus AND UNIX AND (QT_FEATURE_xcb OR NOT UIKIT) + LIBRARIES + Qt::DBus +) + qt_extend_target(Gui CONDITION IOS OR MACOS SOURCES rhi/qrhimetal.mm rhi/qrhimetal_p.h diff --git a/src/gui/platform/unix/qgenericunixservices.cpp b/src/gui/platform/unix/qgenericunixservices.cpp new file mode 100644 index 0000000000..10d5468b9a --- /dev/null +++ b/src/gui/platform/unix/qgenericunixservices.cpp @@ -0,0 +1,374 @@ +/**************************************************************************** +** +** 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 "qgenericunixservices_p.h" +#include + +#include +#include +#if QT_CONFIG(process) +# include +#endif +#if QT_CONFIG(settings) +#include +#endif +#include +#include + +#if QT_CONFIG(dbus) +// These QtCore includes are needed for xdg-desktop-portal support +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#endif // QT_CONFIG(dbus) + +#include + +QT_BEGIN_NAMESPACE + +#if QT_CONFIG(multiprocess) + +enum { debug = 0 }; + +static inline QByteArray detectDesktopEnvironment() +{ + const QByteArray xdgCurrentDesktop = qgetenv("XDG_CURRENT_DESKTOP"); + if (!xdgCurrentDesktop.isEmpty()) + return xdgCurrentDesktop.toUpper(); // KDE, GNOME, UNITY, LXDE, MATE, XFCE... + + // Classic fallbacks + if (!qEnvironmentVariableIsEmpty("KDE_FULL_SESSION")) + return QByteArrayLiteral("KDE"); + if (!qEnvironmentVariableIsEmpty("GNOME_DESKTOP_SESSION_ID")) + return QByteArrayLiteral("GNOME"); + + // Fallback to checking $DESKTOP_SESSION (unreliable) + QByteArray desktopSession = qgetenv("DESKTOP_SESSION"); + + // This can be a path in /usr/share/xsessions + int slash = desktopSession.lastIndexOf('/'); + if (slash != -1) { +#if QT_CONFIG(settings) + QSettings desktopFile(QFile::decodeName(desktopSession + ".desktop"), QSettings::IniFormat); + desktopFile.beginGroup(QStringLiteral("Desktop Entry")); + QByteArray desktopName = desktopFile.value(QStringLiteral("DesktopNames")).toByteArray(); + if (!desktopName.isEmpty()) + return desktopName; +#endif + + // try decoding just the basename + desktopSession = desktopSession.mid(slash + 1); + } + + if (desktopSession == "gnome") + return QByteArrayLiteral("GNOME"); + else if (desktopSession == "xfce") + return QByteArrayLiteral("XFCE"); + else if (desktopSession == "kde") + return QByteArrayLiteral("KDE"); + + return QByteArrayLiteral("UNKNOWN"); +} + +static inline bool checkExecutable(const QString &candidate, QString *result) +{ + *result = QStandardPaths::findExecutable(candidate); + return !result->isEmpty(); +} + +static inline bool detectWebBrowser(const QByteArray &desktop, + bool checkBrowserVariable, + QString *browser) +{ + const char *browsers[] = {"google-chrome", "firefox", "mozilla", "opera"}; + + browser->clear(); + if (checkExecutable(QStringLiteral("xdg-open"), browser)) + return true; + + if (checkBrowserVariable) { + QByteArray browserVariable = qgetenv("DEFAULT_BROWSER"); + if (browserVariable.isEmpty()) + browserVariable = qgetenv("BROWSER"); + if (!browserVariable.isEmpty() && checkExecutable(QString::fromLocal8Bit(browserVariable), browser)) + return true; + } + + if (desktop == QByteArray("KDE")) { + // Konqueror launcher + if (checkExecutable(QStringLiteral("kfmclient"), browser)) { + browser->append(QLatin1String(" exec")); + return true; + } + } else if (desktop == QByteArray("GNOME")) { + if (checkExecutable(QStringLiteral("gnome-open"), browser)) + return true; + } + + for (size_t i = 0; i < sizeof(browsers)/sizeof(char *); ++i) + if (checkExecutable(QLatin1String(browsers[i]), browser)) + return true; + return false; +} + +static inline bool launch(const QString &launcher, const QUrl &url) +{ + const QString command = launcher + QLatin1Char(' ') + QLatin1String(url.toEncoded()); + if (debug) + qDebug("Launching %s", qPrintable(command)); +#if !QT_CONFIG(process) + const bool ok = ::system(qPrintable(command + QLatin1String(" &"))); +#else + QStringList args = QProcess::splitCommand(command); + bool ok = false; + if (!args.isEmpty()) { + QString program = args.takeFirst(); + ok = QProcess::startDetached(program, args); + } +#endif + if (!ok) + qWarning("Launch failed (%s)", qPrintable(command)); + return ok; +} + +#if QT_CONFIG(dbus) +static inline bool checkNeedPortalSupport() +{ + return !QStandardPaths::locate(QStandardPaths::RuntimeLocation, QLatin1String("flatpak-info")).isEmpty() || qEnvironmentVariableIsSet("SNAP"); +} + +static inline bool isPortalReturnPermanent(const QDBusError &error) +{ + // A service unknown error isn't permanent, it just indicates that we + // should fall back to the regular way. This check includes + // QDBusError::NoError. + return error.type() != QDBusError::ServiceUnknown && error.type() != QDBusError::AccessDenied; +} + +static inline QDBusMessage xdgDesktopPortalOpenFile(const QUrl &url) +{ + // DBus signature: + // OpenFile (IN s parent_window, + // IN h fd, + // IN a{sv} options, + // OUT o handle) + // Options: + // handle_token (s) - A string that will be used as the last element of the @handle. + // writable (b) - Whether to allow the chosen application to write to the file. + +#ifdef O_PATH + const int fd = qt_safe_open(QFile::encodeName(url.toLocalFile()), O_PATH); + if (fd != -1) { + QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.portal.Desktop"), + QLatin1String("/org/freedesktop/portal/desktop"), + QLatin1String("org.freedesktop.portal.OpenURI"), + QLatin1String("OpenFile")); + + QDBusUnixFileDescriptor descriptor; + descriptor.giveFileDescriptor(fd); + + // FIXME parent_window_id and handle writable option + message << QString() << QVariant::fromValue(descriptor) << QVariantMap(); + + return QDBusConnection::sessionBus().call(message); + } +#else + Q_UNUSED(url) +#endif + + return QDBusMessage::createError(QDBusError::InternalError, qt_error_string()); +} + +static inline QDBusMessage xdgDesktopPortalOpenUrl(const QUrl &url) +{ + // DBus signature: + // OpenURI (IN s parent_window, + // IN s uri, + // IN a{sv} options, + // OUT o handle) + // Options: + // handle_token (s) - A string that will be used as the last element of the @handle. + // writable (b) - Whether to allow the chosen application to write to the file. + // This key only takes effect the uri points to a local file that is exported in the document portal, + // and the chosen application is sandboxed itself. + + QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.portal.Desktop"), + QLatin1String("/org/freedesktop/portal/desktop"), + QLatin1String("org.freedesktop.portal.OpenURI"), + QLatin1String("OpenURI")); + // FIXME parent_window_id and handle writable option + message << QString() << url.toString() << QVariantMap(); + + return QDBusConnection::sessionBus().call(message); +} + +static inline QDBusMessage xdgDesktopPortalSendEmail(const QUrl &url) +{ + // DBus signature: + // ComposeEmail (IN s parent_window, + // IN a{sv} options, + // OUT o handle) + // Options: + // address (s) - The email address to send to. + // subject (s) - The subject for the email. + // body (s) - The body for the email. + // attachment_fds (ah) - File descriptors for files to attach. + + QUrlQuery urlQuery(url); + QVariantMap options; + options.insert(QLatin1String("address"), url.path()); + options.insert(QLatin1String("subject"), urlQuery.queryItemValue(QLatin1String("subject"))); + options.insert(QLatin1String("body"), urlQuery.queryItemValue(QLatin1String("body"))); + + // O_PATH seems to be present since Linux 2.6.39, which is not case of RHEL 6 +#ifdef O_PATH + QList attachments; + const QStringList attachmentUris = urlQuery.allQueryItemValues(QLatin1String("attachment")); + + for (const QString &attachmentUri : attachmentUris) { + const int fd = qt_safe_open(QFile::encodeName(attachmentUri), O_PATH); + if (fd != -1) { + QDBusUnixFileDescriptor descriptor(fd); + attachments << descriptor; + qt_safe_close(fd); + } + } + + options.insert(QLatin1String("attachment_fds"), QVariant::fromValue(attachments)); +#endif + + QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.portal.Desktop"), + QLatin1String("/org/freedesktop/portal/desktop"), + QLatin1String("org.freedesktop.portal.Email"), + QLatin1String("ComposeEmail")); + + // FIXME parent_window_id + message << QString() << options; + + return QDBusConnection::sessionBus().call(message); +} +#endif // QT_CONFIG(dbus) + +QByteArray QGenericUnixServices::desktopEnvironment() const +{ + static const QByteArray result = detectDesktopEnvironment(); + return result; +} + +bool QGenericUnixServices::openUrl(const QUrl &url) +{ + if (url.scheme() == QLatin1String("mailto")) { +#if QT_CONFIG(dbus) + if (checkNeedPortalSupport()) { + QDBusError error = xdgDesktopPortalSendEmail(url); + if (isPortalReturnPermanent(error)) + return !error.isValid(); + + // service not running, fall back + } +#endif + return openDocument(url); + } + +#if QT_CONFIG(dbus) + if (checkNeedPortalSupport()) { + QDBusError error = xdgDesktopPortalOpenUrl(url); + if (isPortalReturnPermanent(error)) + return !error.isValid(); + } +#endif + + if (m_webBrowser.isEmpty() && !detectWebBrowser(desktopEnvironment(), true, &m_webBrowser)) { + qWarning("Unable to detect a web browser to launch '%s'", qPrintable(url.toString())); + return false; + } + return launch(m_webBrowser, url); +} + +bool QGenericUnixServices::openDocument(const QUrl &url) +{ +#if QT_CONFIG(dbus) + if (checkNeedPortalSupport()) { + QDBusError error = xdgDesktopPortalOpenFile(url); + if (isPortalReturnPermanent(error)) + return !error.isValid(); + } +#endif + + if (m_documentLauncher.isEmpty() && !detectWebBrowser(desktopEnvironment(), false, &m_documentLauncher)) { + qWarning("Unable to detect a launcher for '%s'", qPrintable(url.toString())); + return false; + } + return launch(m_documentLauncher, url); +} + +#else +QByteArray QGenericUnixServices::desktopEnvironment() const +{ + return QByteArrayLiteral("UNKNOWN"); +} + +bool QGenericUnixServices::openUrl(const QUrl &url) +{ + Q_UNUSED(url) + qWarning("openUrl() not supported on this platform"); + return false; +} + +bool QGenericUnixServices::openDocument(const QUrl &url) +{ + Q_UNUSED(url) + qWarning("openDocument() not supported on this platform"); + return false; +} + +#endif // QT_NO_MULTIPROCESS + +QT_END_NAMESPACE diff --git a/src/gui/platform/unix/qgenericunixservices_p.h b/src/gui/platform/unix/qgenericunixservices_p.h new file mode 100644 index 0000000000..0634360c41 --- /dev/null +++ b/src/gui/platform/unix/qgenericunixservices_p.h @@ -0,0 +1,76 @@ +/**************************************************************************** +** +** 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$ +** +****************************************************************************/ + +#ifndef QGENERICUNIXDESKTOPSERVICES_H +#define QGENERICUNIXDESKTOPSERVICES_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 +#include + +QT_BEGIN_NAMESPACE + +class Q_GUI_EXPORT QGenericUnixServices : public QPlatformServices +{ +public: + QGenericUnixServices() {} + + QByteArray desktopEnvironment() const override; + + bool openUrl(const QUrl &url) override; + bool openDocument(const QUrl &url) override; + +private: + QString m_webBrowser; + QString m_documentLauncher; +}; + +QT_END_NAMESPACE + +#endif // QGENERICUNIXDESKTOPSERVICES_H diff --git a/src/gui/platform/unix/unix.pri b/src/gui/platform/unix/unix.pri index b0274989e0..b203e81b24 100644 --- a/src/gui/platform/unix/unix.pri +++ b/src/gui/platform/unix/unix.pri @@ -6,8 +6,18 @@ HEADERS += \ platform/unix/qunixeventdispatcher_qpa_p.h \ platform/unix/qgenericunixeventdispatcher_p.h + qtConfig(glib) { SOURCES += platform/unix/qeventdispatcher_glib.cpp HEADERS += platform/unix/qeventdispatcher_glib_p.h QMAKE_USE_PRIVATE += glib } + +if(unix:!uikit)|qtConfig(xcb) { + SOURCES += \ + platform/unix/qgenericunixservices.cpp + HEADERS += \ + platform/unix/qgenericunixservices_p.h + + qtHaveModule(dbus): QT_PRIVATE += dbus +} diff --git a/src/platformsupport/.prev_CMakeLists.txt b/src/platformsupport/.prev_CMakeLists.txt index a435067b73..157a53aeca 100644 --- a/src/platformsupport/.prev_CMakeLists.txt +++ b/src/platformsupport/.prev_CMakeLists.txt @@ -10,9 +10,6 @@ endif() if(QT_FEATURE_evdev OR QT_FEATURE_integrityhid OR QT_FEATURE_libinput OR QT_FEATURE_tslib OR QT_FEATURE_xkbcommon) add_subdirectory(input) endif() -if(QT_FEATURE_xcb OR (UNIX AND NOT UIKIT)) - add_subdirectory(services) -endif() if(QT_FEATURE_egl) add_subdirectory(eglconvenience) endif() diff --git a/src/platformsupport/CMakeLists.txt b/src/platformsupport/CMakeLists.txt index 5318c26cf3..3d2586e7f1 100644 --- a/src/platformsupport/CMakeLists.txt +++ b/src/platformsupport/CMakeLists.txt @@ -14,9 +14,6 @@ endif() if(QT_FEATURE_evdev OR QT_FEATURE_integrityhid OR QT_FEATURE_libinput OR QT_FEATURE_tslib OR QT_FEATURE_xkbcommon) add_subdirectory(input) endif() -if(QT_FEATURE_xcb OR (UNIX AND NOT UIKIT)) - add_subdirectory(services) -endif() if(QT_FEATURE_egl) add_subdirectory(eglconvenience) endif() diff --git a/src/platformsupport/platformsupport.pro b/src/platformsupport/platformsupport.pro index e54fb96dbe..406c21d6bd 100644 --- a/src/platformsupport/platformsupport.pro +++ b/src/platformsupport/platformsupport.pro @@ -14,9 +14,6 @@ qtConfig(evdev)|qtConfig(tslib)|qtConfig(libinput)|qtConfig(integrityhid)|qtConf input.depends += devicediscovery } -if(unix:!uikit)|qtConfig(xcb): \ - SUBDIRS += services - qtConfig(egl): \ SUBDIRS += eglconvenience qtConfig(xlib):qtConfig(opengl):!qtConfig(opengles2): \ diff --git a/src/platformsupport/services/CMakeLists.txt b/src/platformsupport/services/CMakeLists.txt deleted file mode 100644 index 602dd40305..0000000000 --- a/src/platformsupport/services/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -# Generated from services.pro. - -##################################################################### -## ServiceSupport Module: -##################################################################### - -qt_add_module(ServiceSupport - STATIC - INTERNAL_MODULE - SOURCES - genericunix/qgenericunixservices.cpp genericunix/qgenericunixservices_p.h - DEFINES - QT_NO_CAST_FROM_ASCII - PUBLIC_LIBRARIES - Qt::CorePrivate - Qt::GuiPrivate - PRECOMPILED_HEADER - "../../corelib/global/qt_pch.h" -) - -#### Keys ignored in scope 1:.:.:services.pro:: -# MODULE = "service_support" - -## Scopes: -##################################################################### - -qt_extend_target(ServiceSupport CONDITION QT_FEATURE_dbus - PUBLIC_LIBRARIES - Qt::DBus -) diff --git a/src/platformsupport/services/genericunix/genericunix.pri b/src/platformsupport/services/genericunix/genericunix.pri deleted file mode 100644 index 6afafa31d0..0000000000 --- a/src/platformsupport/services/genericunix/genericunix.pri +++ /dev/null @@ -1,2 +0,0 @@ -HEADERS += $$PWD/qgenericunixservices_p.h -SOURCES += $$PWD/qgenericunixservices.cpp diff --git a/src/platformsupport/services/genericunix/qgenericunixservices.cpp b/src/platformsupport/services/genericunix/qgenericunixservices.cpp deleted file mode 100644 index 10d5468b9a..0000000000 --- a/src/platformsupport/services/genericunix/qgenericunixservices.cpp +++ /dev/null @@ -1,374 +0,0 @@ -/**************************************************************************** -** -** 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 "qgenericunixservices_p.h" -#include - -#include -#include -#if QT_CONFIG(process) -# include -#endif -#if QT_CONFIG(settings) -#include -#endif -#include -#include - -#if QT_CONFIG(dbus) -// These QtCore includes are needed for xdg-desktop-portal support -#include - -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#endif // QT_CONFIG(dbus) - -#include - -QT_BEGIN_NAMESPACE - -#if QT_CONFIG(multiprocess) - -enum { debug = 0 }; - -static inline QByteArray detectDesktopEnvironment() -{ - const QByteArray xdgCurrentDesktop = qgetenv("XDG_CURRENT_DESKTOP"); - if (!xdgCurrentDesktop.isEmpty()) - return xdgCurrentDesktop.toUpper(); // KDE, GNOME, UNITY, LXDE, MATE, XFCE... - - // Classic fallbacks - if (!qEnvironmentVariableIsEmpty("KDE_FULL_SESSION")) - return QByteArrayLiteral("KDE"); - if (!qEnvironmentVariableIsEmpty("GNOME_DESKTOP_SESSION_ID")) - return QByteArrayLiteral("GNOME"); - - // Fallback to checking $DESKTOP_SESSION (unreliable) - QByteArray desktopSession = qgetenv("DESKTOP_SESSION"); - - // This can be a path in /usr/share/xsessions - int slash = desktopSession.lastIndexOf('/'); - if (slash != -1) { -#if QT_CONFIG(settings) - QSettings desktopFile(QFile::decodeName(desktopSession + ".desktop"), QSettings::IniFormat); - desktopFile.beginGroup(QStringLiteral("Desktop Entry")); - QByteArray desktopName = desktopFile.value(QStringLiteral("DesktopNames")).toByteArray(); - if (!desktopName.isEmpty()) - return desktopName; -#endif - - // try decoding just the basename - desktopSession = desktopSession.mid(slash + 1); - } - - if (desktopSession == "gnome") - return QByteArrayLiteral("GNOME"); - else if (desktopSession == "xfce") - return QByteArrayLiteral("XFCE"); - else if (desktopSession == "kde") - return QByteArrayLiteral("KDE"); - - return QByteArrayLiteral("UNKNOWN"); -} - -static inline bool checkExecutable(const QString &candidate, QString *result) -{ - *result = QStandardPaths::findExecutable(candidate); - return !result->isEmpty(); -} - -static inline bool detectWebBrowser(const QByteArray &desktop, - bool checkBrowserVariable, - QString *browser) -{ - const char *browsers[] = {"google-chrome", "firefox", "mozilla", "opera"}; - - browser->clear(); - if (checkExecutable(QStringLiteral("xdg-open"), browser)) - return true; - - if (checkBrowserVariable) { - QByteArray browserVariable = qgetenv("DEFAULT_BROWSER"); - if (browserVariable.isEmpty()) - browserVariable = qgetenv("BROWSER"); - if (!browserVariable.isEmpty() && checkExecutable(QString::fromLocal8Bit(browserVariable), browser)) - return true; - } - - if (desktop == QByteArray("KDE")) { - // Konqueror launcher - if (checkExecutable(QStringLiteral("kfmclient"), browser)) { - browser->append(QLatin1String(" exec")); - return true; - } - } else if (desktop == QByteArray("GNOME")) { - if (checkExecutable(QStringLiteral("gnome-open"), browser)) - return true; - } - - for (size_t i = 0; i < sizeof(browsers)/sizeof(char *); ++i) - if (checkExecutable(QLatin1String(browsers[i]), browser)) - return true; - return false; -} - -static inline bool launch(const QString &launcher, const QUrl &url) -{ - const QString command = launcher + QLatin1Char(' ') + QLatin1String(url.toEncoded()); - if (debug) - qDebug("Launching %s", qPrintable(command)); -#if !QT_CONFIG(process) - const bool ok = ::system(qPrintable(command + QLatin1String(" &"))); -#else - QStringList args = QProcess::splitCommand(command); - bool ok = false; - if (!args.isEmpty()) { - QString program = args.takeFirst(); - ok = QProcess::startDetached(program, args); - } -#endif - if (!ok) - qWarning("Launch failed (%s)", qPrintable(command)); - return ok; -} - -#if QT_CONFIG(dbus) -static inline bool checkNeedPortalSupport() -{ - return !QStandardPaths::locate(QStandardPaths::RuntimeLocation, QLatin1String("flatpak-info")).isEmpty() || qEnvironmentVariableIsSet("SNAP"); -} - -static inline bool isPortalReturnPermanent(const QDBusError &error) -{ - // A service unknown error isn't permanent, it just indicates that we - // should fall back to the regular way. This check includes - // QDBusError::NoError. - return error.type() != QDBusError::ServiceUnknown && error.type() != QDBusError::AccessDenied; -} - -static inline QDBusMessage xdgDesktopPortalOpenFile(const QUrl &url) -{ - // DBus signature: - // OpenFile (IN s parent_window, - // IN h fd, - // IN a{sv} options, - // OUT o handle) - // Options: - // handle_token (s) - A string that will be used as the last element of the @handle. - // writable (b) - Whether to allow the chosen application to write to the file. - -#ifdef O_PATH - const int fd = qt_safe_open(QFile::encodeName(url.toLocalFile()), O_PATH); - if (fd != -1) { - QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.portal.Desktop"), - QLatin1String("/org/freedesktop/portal/desktop"), - QLatin1String("org.freedesktop.portal.OpenURI"), - QLatin1String("OpenFile")); - - QDBusUnixFileDescriptor descriptor; - descriptor.giveFileDescriptor(fd); - - // FIXME parent_window_id and handle writable option - message << QString() << QVariant::fromValue(descriptor) << QVariantMap(); - - return QDBusConnection::sessionBus().call(message); - } -#else - Q_UNUSED(url) -#endif - - return QDBusMessage::createError(QDBusError::InternalError, qt_error_string()); -} - -static inline QDBusMessage xdgDesktopPortalOpenUrl(const QUrl &url) -{ - // DBus signature: - // OpenURI (IN s parent_window, - // IN s uri, - // IN a{sv} options, - // OUT o handle) - // Options: - // handle_token (s) - A string that will be used as the last element of the @handle. - // writable (b) - Whether to allow the chosen application to write to the file. - // This key only takes effect the uri points to a local file that is exported in the document portal, - // and the chosen application is sandboxed itself. - - QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.portal.Desktop"), - QLatin1String("/org/freedesktop/portal/desktop"), - QLatin1String("org.freedesktop.portal.OpenURI"), - QLatin1String("OpenURI")); - // FIXME parent_window_id and handle writable option - message << QString() << url.toString() << QVariantMap(); - - return QDBusConnection::sessionBus().call(message); -} - -static inline QDBusMessage xdgDesktopPortalSendEmail(const QUrl &url) -{ - // DBus signature: - // ComposeEmail (IN s parent_window, - // IN a{sv} options, - // OUT o handle) - // Options: - // address (s) - The email address to send to. - // subject (s) - The subject for the email. - // body (s) - The body for the email. - // attachment_fds (ah) - File descriptors for files to attach. - - QUrlQuery urlQuery(url); - QVariantMap options; - options.insert(QLatin1String("address"), url.path()); - options.insert(QLatin1String("subject"), urlQuery.queryItemValue(QLatin1String("subject"))); - options.insert(QLatin1String("body"), urlQuery.queryItemValue(QLatin1String("body"))); - - // O_PATH seems to be present since Linux 2.6.39, which is not case of RHEL 6 -#ifdef O_PATH - QList attachments; - const QStringList attachmentUris = urlQuery.allQueryItemValues(QLatin1String("attachment")); - - for (const QString &attachmentUri : attachmentUris) { - const int fd = qt_safe_open(QFile::encodeName(attachmentUri), O_PATH); - if (fd != -1) { - QDBusUnixFileDescriptor descriptor(fd); - attachments << descriptor; - qt_safe_close(fd); - } - } - - options.insert(QLatin1String("attachment_fds"), QVariant::fromValue(attachments)); -#endif - - QDBusMessage message = QDBusMessage::createMethodCall(QLatin1String("org.freedesktop.portal.Desktop"), - QLatin1String("/org/freedesktop/portal/desktop"), - QLatin1String("org.freedesktop.portal.Email"), - QLatin1String("ComposeEmail")); - - // FIXME parent_window_id - message << QString() << options; - - return QDBusConnection::sessionBus().call(message); -} -#endif // QT_CONFIG(dbus) - -QByteArray QGenericUnixServices::desktopEnvironment() const -{ - static const QByteArray result = detectDesktopEnvironment(); - return result; -} - -bool QGenericUnixServices::openUrl(const QUrl &url) -{ - if (url.scheme() == QLatin1String("mailto")) { -#if QT_CONFIG(dbus) - if (checkNeedPortalSupport()) { - QDBusError error = xdgDesktopPortalSendEmail(url); - if (isPortalReturnPermanent(error)) - return !error.isValid(); - - // service not running, fall back - } -#endif - return openDocument(url); - } - -#if QT_CONFIG(dbus) - if (checkNeedPortalSupport()) { - QDBusError error = xdgDesktopPortalOpenUrl(url); - if (isPortalReturnPermanent(error)) - return !error.isValid(); - } -#endif - - if (m_webBrowser.isEmpty() && !detectWebBrowser(desktopEnvironment(), true, &m_webBrowser)) { - qWarning("Unable to detect a web browser to launch '%s'", qPrintable(url.toString())); - return false; - } - return launch(m_webBrowser, url); -} - -bool QGenericUnixServices::openDocument(const QUrl &url) -{ -#if QT_CONFIG(dbus) - if (checkNeedPortalSupport()) { - QDBusError error = xdgDesktopPortalOpenFile(url); - if (isPortalReturnPermanent(error)) - return !error.isValid(); - } -#endif - - if (m_documentLauncher.isEmpty() && !detectWebBrowser(desktopEnvironment(), false, &m_documentLauncher)) { - qWarning("Unable to detect a launcher for '%s'", qPrintable(url.toString())); - return false; - } - return launch(m_documentLauncher, url); -} - -#else -QByteArray QGenericUnixServices::desktopEnvironment() const -{ - return QByteArrayLiteral("UNKNOWN"); -} - -bool QGenericUnixServices::openUrl(const QUrl &url) -{ - Q_UNUSED(url) - qWarning("openUrl() not supported on this platform"); - return false; -} - -bool QGenericUnixServices::openDocument(const QUrl &url) -{ - Q_UNUSED(url) - qWarning("openDocument() not supported on this platform"); - return false; -} - -#endif // QT_NO_MULTIPROCESS - -QT_END_NAMESPACE diff --git a/src/platformsupport/services/genericunix/qgenericunixservices_p.h b/src/platformsupport/services/genericunix/qgenericunixservices_p.h deleted file mode 100644 index 8ac3de6f03..0000000000 --- a/src/platformsupport/services/genericunix/qgenericunixservices_p.h +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** -** -** 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$ -** -****************************************************************************/ - -#ifndef QGENERICUNIXDESKTOPSERVICES_H -#define QGENERICUNIXDESKTOPSERVICES_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 -#include - -QT_BEGIN_NAMESPACE - -class QGenericUnixServices : public QPlatformServices -{ -public: - QGenericUnixServices() {} - - QByteArray desktopEnvironment() const override; - - bool openUrl(const QUrl &url) override; - bool openDocument(const QUrl &url) override; - -private: - QString m_webBrowser; - QString m_documentLauncher; -}; - -QT_END_NAMESPACE - -#endif // QGENERICUNIXDESKTOPSERVICES_H diff --git a/src/platformsupport/services/services.pro b/src/platformsupport/services/services.pro deleted file mode 100644 index 7ff5e8e179..0000000000 --- a/src/platformsupport/services/services.pro +++ /dev/null @@ -1,14 +0,0 @@ -TARGET = QtServiceSupport -MODULE = service_support - -QT = core-private gui-private -qtConfig(dbus): QT += dbus - -CONFIG += static internal_module - -DEFINES += QT_NO_CAST_FROM_ASCII -PRECOMPILED_HEADER = ../../corelib/global/qt_pch.h - -include($$PWD/genericunix/genericunix.pri) - -load(qt_module) diff --git a/src/plugins/platforms/bsdfb/bsdfb.pro b/src/plugins/platforms/bsdfb/bsdfb.pro index 21ebbb0496..ac2dfa9e68 100644 --- a/src/plugins/platforms/bsdfb/bsdfb.pro +++ b/src/plugins/platforms/bsdfb/bsdfb.pro @@ -2,7 +2,6 @@ TARGET = qbsdfb QT += \ core-private gui-private \ - service_support-private \ fb_support-private qtHaveModule(input_support-private): \ diff --git a/src/plugins/platforms/bsdfb/qbsdfbintegration.cpp b/src/plugins/platforms/bsdfb/qbsdfbintegration.cpp index 04c84d2942..9abc2f81fa 100644 --- a/src/plugins/platforms/bsdfb/qbsdfbintegration.cpp +++ b/src/plugins/platforms/bsdfb/qbsdfbintegration.cpp @@ -42,7 +42,7 @@ #include "qbsdfbscreen.h" #include -#include +#include #include #include diff --git a/src/plugins/platforms/directfb/.prev_CMakeLists.txt b/src/plugins/platforms/directfb/.prev_CMakeLists.txt index a9bac7c988..15e43244f0 100644 --- a/src/plugins/platforms/directfb/.prev_CMakeLists.txt +++ b/src/plugins/platforms/directfb/.prev_CMakeLists.txt @@ -24,7 +24,6 @@ qt_internal_add_plugin(QDirectFbIntegrationPlugin Qt::CorePrivate Qt::Gui Qt::GuiPrivate - Qt::ServiceSupportPrivate ) #### Keys ignored in scope 1:.:.:directfb.pro:: diff --git a/src/plugins/platforms/directfb/CMakeLists.txt b/src/plugins/platforms/directfb/CMakeLists.txt index ce6e4af3a3..be6e08bd8e 100644 --- a/src/plugins/platforms/directfb/CMakeLists.txt +++ b/src/plugins/platforms/directfb/CMakeLists.txt @@ -28,7 +28,6 @@ qt_internal_add_plugin(QDirectFbIntegrationPlugin Qt::CorePrivate Qt::Gui Qt::GuiPrivate - Qt::ServiceSupportPrivate ) #### Keys ignored in scope 1:.:.:directfb.pro:: diff --git a/src/plugins/platforms/directfb/directfb.pro b/src/plugins/platforms/directfb/directfb.pro index 57195de551..d63d2469ff 100644 --- a/src/plugins/platforms/directfb/directfb.pro +++ b/src/plugins/platforms/directfb/directfb.pro @@ -1,8 +1,7 @@ TARGET = qdirectfb QT += \ - core-private gui-private \ - service_support-private + core-private gui-private QMAKE_USE += directfb diff --git a/src/plugins/platforms/directfb/qdirectfbintegration.cpp b/src/plugins/platforms/directfb/qdirectfbintegration.cpp index 393ce69c52..0212f52afa 100644 --- a/src/plugins/platforms/directfb/qdirectfbintegration.cpp +++ b/src/plugins/platforms/directfb/qdirectfbintegration.cpp @@ -46,7 +46,7 @@ #include #include -#include +#include #include #include diff --git a/src/plugins/platforms/eglfs/.prev_CMakeLists.txt b/src/plugins/platforms/eglfs/.prev_CMakeLists.txt index 106e94718a..900be49379 100644 --- a/src/plugins/platforms/eglfs/.prev_CMakeLists.txt +++ b/src/plugins/platforms/eglfs/.prev_CMakeLists.txt @@ -25,7 +25,6 @@ qt_add_module(EglFSDeviceIntegration Qt::EglSupportPrivate Qt::FbSupportPrivate Qt::GuiPrivate - Qt::ServiceSupportPrivate Qt::ThemeSupportPrivate ) diff --git a/src/plugins/platforms/eglfs/CMakeLists.txt b/src/plugins/platforms/eglfs/CMakeLists.txt index d1211f38b8..8e625fdc58 100644 --- a/src/plugins/platforms/eglfs/CMakeLists.txt +++ b/src/plugins/platforms/eglfs/CMakeLists.txt @@ -26,7 +26,6 @@ qt_add_module(EglFSDeviceIntegration Qt::EglSupportPrivate Qt::FbSupportPrivate Qt::GuiPrivate - Qt::ServiceSupportPrivate Qt::ThemeSupportPrivate EGL::EGL # special case ) diff --git a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp index 651c28745b..ecabfee101 100644 --- a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp @@ -68,7 +68,7 @@ #endif #include -#include +#include #include #include #include diff --git a/src/plugins/platforms/eglfs/eglfsdeviceintegration.pro b/src/plugins/platforms/eglfs/eglfsdeviceintegration.pro index dce1a4b894..87eb8515eb 100644 --- a/src/plugins/platforms/eglfs/eglfsdeviceintegration.pro +++ b/src/plugins/platforms/eglfs/eglfsdeviceintegration.pro @@ -11,7 +11,7 @@ MODULE = eglfsdeviceintegration QT += \ core-private gui-private \ devicediscovery_support-private \ - service_support-private theme_support-private \ + theme_support-private \ fb_support-private egl_support-private qtHaveModule(input_support-private): \ diff --git a/src/plugins/platforms/integrity/integrity.pro b/src/plugins/platforms/integrity/integrity.pro index 51511f38a6..7280f66863 100644 --- a/src/plugins/platforms/integrity/integrity.pro +++ b/src/plugins/platforms/integrity/integrity.pro @@ -2,7 +2,6 @@ TARGET = integrityfb QT += \ core-private gui-private \ - service_support-private \ fb_support-private SOURCES = \ diff --git a/src/plugins/platforms/integrity/qintegrityfbintegration.cpp b/src/plugins/platforms/integrity/qintegrityfbintegration.cpp index d53088dff7..5aad06189d 100644 --- a/src/plugins/platforms/integrity/qintegrityfbintegration.cpp +++ b/src/plugins/platforms/integrity/qintegrityfbintegration.cpp @@ -42,7 +42,7 @@ #include "qintegrityhidmanager.h" #include -#include +#include #include #include diff --git a/src/plugins/platforms/linuxfb/.prev_CMakeLists.txt b/src/plugins/platforms/linuxfb/.prev_CMakeLists.txt index caa3f03f5d..258b70603e 100644 --- a/src/plugins/platforms/linuxfb/.prev_CMakeLists.txt +++ b/src/plugins/platforms/linuxfb/.prev_CMakeLists.txt @@ -19,7 +19,6 @@ qt_internal_add_plugin(QLinuxFbIntegrationPlugin Qt::FbSupportPrivate Qt::Gui Qt::GuiPrivate - Qt::ServiceSupportPrivate ) #### Keys ignored in scope 1:.:.:linuxfb.pro:: diff --git a/src/plugins/platforms/linuxfb/CMakeLists.txt b/src/plugins/platforms/linuxfb/CMakeLists.txt index fdfe076902..ea5642f1c0 100644 --- a/src/plugins/platforms/linuxfb/CMakeLists.txt +++ b/src/plugins/platforms/linuxfb/CMakeLists.txt @@ -20,7 +20,6 @@ qt_internal_add_plugin(QLinuxFbIntegrationPlugin Qt::FbSupportPrivate Qt::Gui Qt::GuiPrivate - Qt::ServiceSupportPrivate ) #### Keys ignored in scope 1:.:.:linuxfb.pro:: diff --git a/src/plugins/platforms/linuxfb/linuxfb.pro b/src/plugins/platforms/linuxfb/linuxfb.pro index 9af0956cf7..08a4d6dd0c 100644 --- a/src/plugins/platforms/linuxfb/linuxfb.pro +++ b/src/plugins/platforms/linuxfb/linuxfb.pro @@ -4,7 +4,6 @@ DEFINES += QT_NO_FOREACH QT += \ core-private gui-private \ - service_support-private \ fb_support-private qtHaveModule(input_support-private): \ diff --git a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp b/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp index 4940302d36..68c68ab8f6 100644 --- a/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp +++ b/src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp @@ -44,7 +44,7 @@ #endif #include -#include +#include #include #include diff --git a/src/plugins/platforms/vnc/.prev_CMakeLists.txt b/src/plugins/platforms/vnc/.prev_CMakeLists.txt index ebe1cd62d4..ab11e57f0d 100644 --- a/src/plugins/platforms/vnc/.prev_CMakeLists.txt +++ b/src/plugins/platforms/vnc/.prev_CMakeLists.txt @@ -22,7 +22,6 @@ qt_internal_add_plugin(QVncIntegrationPlugin Qt::Gui Qt::GuiPrivate Qt::Network - Qt::ServiceSupportPrivate ) #### Keys ignored in scope 1:.:.:vnc.pro:: diff --git a/src/plugins/platforms/vnc/CMakeLists.txt b/src/plugins/platforms/vnc/CMakeLists.txt index 6347030b34..5024459cf4 100644 --- a/src/plugins/platforms/vnc/CMakeLists.txt +++ b/src/plugins/platforms/vnc/CMakeLists.txt @@ -23,7 +23,6 @@ qt_internal_add_plugin(QVncIntegrationPlugin Qt::Gui Qt::GuiPrivate Qt::Network - Qt::ServiceSupportPrivate ) #### Keys ignored in scope 1:.:.:vnc.pro:: diff --git a/src/plugins/platforms/vnc/qvncintegration.cpp b/src/plugins/platforms/vnc/qvncintegration.cpp index 6a0cc79402..9836839274 100644 --- a/src/plugins/platforms/vnc/qvncintegration.cpp +++ b/src/plugins/platforms/vnc/qvncintegration.cpp @@ -42,7 +42,7 @@ #include "qvnc_p.h" #include -#include +#include #include #include diff --git a/src/plugins/platforms/vnc/vnc.pro b/src/plugins/platforms/vnc/vnc.pro index c679b114ab..a250ba999e 100644 --- a/src/plugins/platforms/vnc/vnc.pro +++ b/src/plugins/platforms/vnc/vnc.pro @@ -2,7 +2,7 @@ TARGET = qvnc QT += \ core-private network gui-private \ - service_support-private fb_support-private + fb_support-private qtHaveModule(input_support-private): \ QT += input_support-private diff --git a/src/plugins/platforms/xcb/.prev_CMakeLists.txt b/src/plugins/platforms/xcb/.prev_CMakeLists.txt index c5012582ea..83df27ddd0 100644 --- a/src/plugins/platforms/xcb/.prev_CMakeLists.txt +++ b/src/plugins/platforms/xcb/.prev_CMakeLists.txt @@ -43,7 +43,6 @@ qt_add_module(XcbQpa Qt::CorePrivate Qt::EdidSupportPrivate Qt::GuiPrivate - Qt::ServiceSupportPrivate Qt::ThemeSupportPrivate Qt::XkbCommonSupportPrivate XCB::ICCCM diff --git a/src/plugins/platforms/xcb/CMakeLists.txt b/src/plugins/platforms/xcb/CMakeLists.txt index 1288cc6a5f..28861862d8 100644 --- a/src/plugins/platforms/xcb/CMakeLists.txt +++ b/src/plugins/platforms/xcb/CMakeLists.txt @@ -43,7 +43,6 @@ qt_add_module(XcbQpa Qt::CorePrivate Qt::EdidSupportPrivate Qt::GuiPrivate - Qt::ServiceSupportPrivate Qt::ThemeSupportPrivate Qt::XkbCommonSupportPrivate XCB::ICCCM diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index 7956da2c91..cec25ef47b 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -60,7 +60,7 @@ #include #include -#include +#include #if QT_CONFIG(opengl) #include #endif diff --git a/src/plugins/platforms/xcb/xcb_qpa_lib.pro b/src/plugins/platforms/xcb/xcb_qpa_lib.pro index 3cca31aa2f..0e168b9e1c 100644 --- a/src/plugins/platforms/xcb/xcb_qpa_lib.pro +++ b/src/plugins/platforms/xcb/xcb_qpa_lib.pro @@ -4,7 +4,7 @@ DEFINES += QT_NO_FOREACH QT += \ core-private gui-private \ - service_support-private theme_support-private \ + theme_support-private \ edid_support-private \ xkbcommon_support-private diff --git a/sync.profile b/sync.profile index f631eeaefb..4eb9b0433e 100644 --- a/sync.profile +++ b/sync.profile @@ -15,7 +15,6 @@ "QtDeviceDiscoverySupport" => "$basedir/src/platformsupport/devicediscovery", "QtInputSupport" => "$basedir/src/platformsupport/input", "QtXkbCommonSupport" => "$basedir/src/platformsupport/input/xkbcommon", - "QtServiceSupport" => "$basedir/src/platformsupport/services", "QtThemeSupport" => "$basedir/src/platformsupport/themes", "QtEglSupport" => "$basedir/src/platformsupport/eglconvenience", "QtFbSupport" => "$basedir/src/platformsupport/fbconvenience", -- cgit v1.2.3