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
qeventloop_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QEVENTLOOP_P_H
6
#
define
QEVENTLOOP_P_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
"qcoreapplication.h"
20
#
include
"qobject_p.h"
21
22
QT_BEGIN_NAMESPACE
23
24
class
Q_AUTOTEST_EXPORT
QEventLoopPrivate
:
public
QObjectPrivate
25
{
26
Q_DECLARE_PUBLIC(QEventLoop)
27
public
:
28
inline
QEventLoopPrivate()
29
: inExec(
false
)
30
{
31
returnCode.storeRelaxed(-1);
32
exit.storeRelaxed(
true
);
33
}
34
~QEventLoopPrivate() override;
35
36
QAtomicInt quitLockRef;
37
38
QAtomicInt exit;
// bool
39
QAtomicInt returnCode;
40
bool
inExec;
41
42
void
ref()
43
{
44
quitLockRef.ref();
45
}
46
47
void
deref()
48
{
49
if
(!quitLockRef.deref() && inExec) {
50
qApp
->postEvent(q_ptr,
new
QEvent(QEvent::Quit));
51
}
52
}
53
};
54
55
QT_END_NAMESPACE
56
57
#
endif
// QEVENTLOOP_P_H
QCoreApplication
\inmodule QtCore
Definition
qcoreapplication.h:45
QEventLoopLocker
\inmodule QtCore
Definition
qeventloop.h:60
QEventLoopLocker::~QEventLoopLocker
Q_CORE_EXPORT ~QEventLoopLocker()
Destroys this event loop locker object.
Definition
qeventloop.cpp:435
QEventLoopPrivate
Definition
qeventloop_p.h:25
QEventLoop
\inmodule QtCore
Definition
qeventloop.h:17
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qrandomaccessasyncfile_darwin.mm:17
__has_include
#define __has_include(x)
Definition
qcompilerdetection.h:459
qApp
#define qApp
Definition
qcoreapplication.h:38
qtbase
src
corelib
kernel
qeventloop_p.h
Generated on
for Qt by
1.16.1