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 this,
23 }
24{
25 int pipedes[2];
26 int status = pipe(pipedes);
27 if (status == -1) {
28 qCritical() << "pipe failed:" << qt_error_string(errno);
29 return;
30 }
31
34
37 QT_WARNING_DISABLE_GCC("-Wmaybe-uninitialized")
38 std::array<char, 1024> buffer;
39
42
46 });
49}
50
52{
54
57 return;
58
59 constexpr uint8_t dummy{ 1 };
60
62 if (bytesWritten == -1)
63 qCritical("QAutoResetEvent::set failed");
64}
65
66} // namespace QtPrivate
67
68QT_END_NAMESPACE
69
70#include "moc_qautoresetevent_pipe_p.cpp"