Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qwaylanddatasource.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// Qt-Security score:significant reason:default
4
8
10#include "qwaylandmimehelper_p.h"
12#include <QtCore/QFile>
13
14#include <QtCore/QDebug>
15#if QT_CONFIG(xdg_desktop_portal_file_transfer)
16#include <QtGui/private/qxdgdesktopportalfiletransfer_p.h>
17#endif
18
19#include <algorithm>
20#include <unistd.h>
21#include <signal.h>
22#include <fcntl.h>
23
24QT_BEGIN_NAMESPACE
25using namespace std::chrono;
26
27using namespace Qt::StringLiterals;
28
29namespace QtWaylandClient {
30
50
55
60
62{
64#if QT_CONFIG(xdg_desktop_portal_file_transfer)
68 if (!urls.empty())
70 }
71#endif
72 if (!content.isEmpty()) {
75 break;
77 qWarning() << "QWaylandDataSource: timeout writing to pipe";
78 break;
80 qWarning() << "QWaylandDataSource: peer closed pipe";
81 break;
83 qWarning() << "QWaylandDataSource: write() failed";
84 break;
85 }
86 }
87 close(fd);
88}
89
95
108
113
119
120}
121
122QT_END_NAMESPACE
123
124#include "moc_qwaylanddatasource_p.cpp"