34 enum class LaunchType { Browser, Document };
36 QDesktopUnixServices();
37 ~QDesktopUnixServices();
39 QByteArray desktopEnvironment()
const override;
41 bool hasCapability(Capability capability)
const override;
42 bool openUrl(
const QUrl &url) override;
43 bool openDocument(
const QUrl &url) override;
44 QPlatformServiceColorPicker *colorPicker(QWindow *parent =
nullptr) override;
46 void setApplicationBadge(qint64 number);
47 virtual QString portalWindowIdentifier(QWindow *window);
49 virtual void registerDBusMenuForWindow(QWindow *window,
const QString &service,
const QString &path);
50 virtual void unregisterDBusMenuForWindow(QWindow *window);
54 QString m_documentLauncher;
56 QPointer<QDBusPendingCallWatcher> m_watcher =
nullptr;
57 std::unique_ptr<QDBusServiceWatcher> m_portalWatcher;
58 bool m_hasNoPortal =
false;
60 bool m_hasScreenshotPortalWithColorPicking =
false;
62 inline bool launchProcess(LaunchType type,
const QUrl &url,
const QString &xdgActivationToken);
63 inline QString portalFocusWindowIdentifier();