Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qwaylandplatformservices.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5#include "qwaylandwindow_p.h"
6#include "qwaylanddisplay_p.h"
9
11
12namespace QtWaylandClient {
13
16
18{
19 if (auto windowManagerIntegration = m_display->windowManagerIntegration()) {
20 windowManagerIntegration->openUrl(url);
21 return true;
22 }
24}
25
27{
28 if (auto windowManagerIntegration = m_display->windowManagerIntegration()) {
29 windowManagerIntegration->openUrl(url);
30 return true;
31 }
33}
34
36{
37 if (window && window->handle()) {
38 auto shellSurface = static_cast<QWaylandWindow *>(window->handle())->shellSurface();
39 if (shellSurface) {
40 const QString handle = shellSurface->externWindowHandle();
41 return QLatin1String("wayland:") + handle;
42 }
43 }
44 return QString();
45}
46} // namespace QtWaylandClient
47
49
50#include "moc_qwaylandplatformservices_p.cpp"
bool openDocument(const QUrl &url) override
bool openUrl(const QUrl &url) override
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qurl.h:94
\inmodule QtGui
Definition qwindow.h:63
QWaylandWindowManagerIntegration * windowManagerIntegration() const
QWaylandPlatformServices(QWaylandDisplay *waylandDisplay)
QString portalWindowIdentifier(QWindow *window) override
struct wl_display * display
Definition linuxdmabuf.h:41
Combined button and popup list for selecting options.
GLuint64 GLenum void * handle
QLatin1StringView QLatin1String
Definition qstringfwd.h:31
QUrl url("example.com")
[constructor-url-reference]
aWidget window() -> setWindowTitle("New Window Title")
[2]