diff --git a/CMakeLists.txt b/CMakeLists.txt index 818862cbf4..9c733813e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -281,6 +281,7 @@ set_package_properties(X11_XCB PROPERTIES # dependencies for QPA plugin find_package(Qt5FontDatabaseSupport REQUIRED) find_package(Qt5ThemeSupport REQUIRED) +find_package(Qt5ServiceSupport REQUIRED) find_package(Qt5EventDispatcherSupport REQUIRED) find_package(Freetype REQUIRED) diff --git a/src/plugins/qpa/CMakeLists.txt b/src/plugins/qpa/CMakeLists.txt index 952a5f5e91..d3de3a0d79 100644 --- a/src/plugins/qpa/CMakeLists.txt +++ b/src/plugins/qpa/CMakeLists.txt @@ -22,6 +22,7 @@ target_link_libraries(KWinQpaPlugin PRIVATE Qt::FontDatabaseSupportPrivate Qt::ThemeSupportPrivate Qt::EventDispatcherSupportPrivate + Qt::ServiceSupportPrivate Freetype::Freetype # Must be after Qt5 platform support libs Fontconfig::Fontconfig kwin diff --git a/src/plugins/qpa/integration.cpp b/src/plugins/qpa/integration.cpp index 8bb19731f8..55a75ea93e 100644 --- a/src/plugins/qpa/integration.cpp +++ b/src/plugins/qpa/integration.cpp @@ -40,6 +40,7 @@ Integration::Integration() : QObject() , QPlatformIntegration() , m_fontDb(new QGenericUnixFontDatabase()) + , m_services(new QGenericUnixServices()) { } @@ -190,5 +191,10 @@ void Integration::handleOutputDisabled(AbstractOutput *output) QWindowSystemInterface::handleScreenRemoved(platformScreen); } +QPlatformServices *Integration::services() const +{ + return m_services.data(); +} + } } diff --git a/src/plugins/qpa/integration.h b/src/plugins/qpa/integration.h index 7f7a337b57..c333e6bf59 100644 --- a/src/plugins/qpa/integration.h +++ b/src/plugins/qpa/integration.h @@ -13,6 +13,7 @@ #include #include +#include #include namespace KWin @@ -41,6 +42,7 @@ public: QStringList themeNames() const override; QPlatformTheme *createPlatformTheme(const QString &name) const override; QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override; + QPlatformServices *services() const override; void initialize() override; QHash screens() const; @@ -55,6 +57,7 @@ private: QPlatformNativeInterface *m_nativeInterface; QPlatformPlaceholderScreen *m_dummyScreen = nullptr; QHash m_screens; + QScopedPointer m_services; }; }