Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
4
#
include
"qautoresetevent_win32_p.h"
5
6
#
include
<
QtCore
/
qdebug
.
h
>
7
#
include
<
QtCore
/
qt_windows
.
h
>
8
9
QT_BEGIN_NAMESPACE
10
11
namespace
QtPrivate
{
12
13
QAutoResetEventWin32
::
QAutoResetEventWin32
(
QObject
*
parent
)
14
:
QObject
{
15
parent
,
16
},
17
m_handle
{
18
::
CreateEventW
(
/*lpEventAttributes=*/
0,
19
/*bManualReset=*/
false
,
20
/*bInitialState=*/
false
,
21
/*lpName=*/
nullptr
),
22
},
23
m_notifier
{
24
this
,
25
}
26
{
27
if
(!
isValid
()) {
28
qCritical
() <<
"CreateEventW failed:"
<<
qt_error_string
(
GetLastError
());
29
return
;
30
}
31
32
connect
(&
m_notifier
, &
QWinEventNotifier
::
activated
,
this
, &
QAutoResetEventWin32
::
activated
);
33
34
m_notifier
.
setHandle
(
m_handle
.
get
());
35
m_notifier
.
setEnabled
(
true
);
36
}
37
38
void
QAutoResetEventWin32
::
set
()
39
{
40
Q_ASSERT
(
isValid
());
41
42
bool
status
= ::
SetEvent
(
m_handle
.
get
());
43
if
(!
status
)
44
qCritical
(
"QAutoResetEvent::set failed"
);
45
}
46
47
}
// namespace QtPrivate
48
49
QT_END_NAMESPACE
50
51
#
include
"moc_qautoresetevent_win32_p.cpp"
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QtPrivate
Definition
qalloc.h:29
qtmultimedia
src
multimedia
support
qautoresetevent_win32.cpp
Generated on
for Qt by
1.18.0