Commit 966ac032 authored by Nicolas Fella's avatar Nicolas Fella Committed by Vlad Zahorodnii
Browse files

Implement services in our QPA

This is required for QDesktopServices to work.

Use QGenericUnixServices like the xcb and wayland QPA

BUG: 446144


(cherry picked from commit a2ebad76)
parent f05a7c0e
Pipeline #136694 passed with stage
in 14 minutes and 30 seconds
......@@ -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)
......
......@@ -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
......
......@@ -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();
}
}
}
......@@ -13,6 +13,7 @@
#include <epoxy/egl.h>
#include <qpa/qplatformintegration.h>
#include <QtServiceSupport/private/qgenericunixservices_p.h>
#include <QObject>
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<AbstractOutput *, Screen *> screens() const;
......@@ -55,6 +57,7 @@ private:
QPlatformNativeInterface *m_nativeInterface;
QPlatformPlaceholderScreen *m_dummyScreen = nullptr;
QHash<AbstractOutput *, Screen *> m_screens;
QScopedPointer<QGenericUnixServices> m_services;
};
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment