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_win32.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/qdebug.h>
7#include <QtCore/qt_windows.h>
8
10
11namespace QtPrivate {
12
14 : QObject{
15 parent,
16 },
18 ::CreateEventW(/*lpEventAttributes=*/0,
19 /*bManualReset=*/false,
20 /*bInitialState=*/false,
21 /*lpName=*/nullptr),
22 },
24 this,
25 }
26{
27 if (!isValid()) {
28 qCritical() << "CreateEventW failed:" << qt_error_string(GetLastError());
29 return;
30 }
31
33
36}
37
39{
41
42 bool status = ::SetEvent(m_handle.get());
43 if (!status)
44 qCritical("QAutoResetEvent::set failed");
45}
46
47} // namespace QtPrivate
48
49QT_END_NAMESPACE
50
51#include "moc_qautoresetevent_win32_p.cpp"
Combined button and popup list for selecting options.