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/qt_windows.h>
7#include <QtCore/qdebug.h>
8
10
11namespace QtPrivate {
12
14 : QObject{
15 parent,
16 },
18 nullptr,
19 }
20{
21 m_handle = ::CreateEventW(/*lpEventAttributes=*/0,
22 /*bManualReset=*/false,
23 /*bInitialState=*/false,
24 /*lpName=*/nullptr);
25
26 if (!m_handle) {
27 qCritical() << "CreateEventW failed:" << qt_error_string(GetLastError());
28 return;
29 }
30
32
35}
36
42
44{
45 return m_handle;
46}
47
49{
51
52 bool status = ::SetEvent(m_handle);
53 if (!status)
54 qCritical("QAutoResetEvent::set failed");
55}
56
57} // namespace QtPrivate
58
59QT_END_NAMESPACE
60
61#include "moc_qautoresetevent_win32_p.cpp"
Combined button and popup list for selecting options.