Implement services in our QPA
This is required for QDesktopServices to work. Use QGenericUnixServices like the xcb and wayland QPA BUG: 446144
This commit is contained in:
parent
77ec43d5e1
commit
a2ebad760f
4 changed files with 11 additions and 0 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue