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
qautoresetevent_pipe.cpp
Go to the documentation of this file.
1// Copyright (C) 2024 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
6#include <QtCore/private/qcore_unix_p.h>
7#include <QtCore/qdebug.h>
8
9#include <unistd.h>
10#include <cstdint>
11
12QT_BEGIN_NAMESPACE
13
14namespace QtPrivate {
15
17 : QObject{
18 parent,
19 },
22 }
23{
24 int pipedes[2];
25 int status = pipe(pipedes);
26 if (status == -1) {
27 qCritical() << "pipe failed:" << qt_error_string(errno);
28 return;
29 }
30
33
36 QT_WARNING_DISABLE_GCC("-Wmaybe-uninitialized")
37 std::array<char, 1024> buffer;
38
41
45 });
48}
49
57
59{
61
64 return;
65
66 constexpr uint8_t dummy{ 1 };
67
69 if (bytesWritten == -1)
70 qCritical("QAutoResetEvent::set failed");
71}
72
73} // namespace QtPrivate
74
75QT_END_NAMESPACE
76
77#include "moc_qautoresetevent_pipe_p.cpp"