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
qcocoasessionmanager.cpp
Go to the documentation of this file.
1
// Copyright (C) 2019 Samuel Gaist <samuel.gaist@idiap.ch>
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
QT_NO_SESSIONMANAGER
6
#
include
<
private
/
qsessionmanager_p
.
h
>
7
#
include
<
private
/
qguiapplication_p
.
h
>
8
9
#
include
"qcocoasessionmanager.h"
10
#
include
<
qstring
.
h
>
11
12
QT_BEGIN_NAMESPACE
13
14
QCocoaSessionManager::QCocoaSessionManager(
const
QString &id,
const
QString &key)
15
: QPlatformSessionManager(id, key),
16
m_canceled(
false
)
17
{
18
}
19
20
QCocoaSessionManager::~QCocoaSessionManager()
21
{
22
}
23
24
bool
QCocoaSessionManager::allowsInteraction()
25
{
26
return
false
;
27
}
28
29
void
QCocoaSessionManager::resetCancellation()
30
{
31
m_canceled =
false
;
32
}
33
34
void
QCocoaSessionManager::cancel()
35
{
36
m_canceled =
true
;
37
}
38
39
bool
QCocoaSessionManager::wasCanceled()
const
40
{
41
return
m_canceled;
42
}
43
44
QCocoaSessionManager *QCocoaSessionManager::instance()
45
{
46
auto
*qGuiAppPriv = QGuiApplicationPrivate::instance();
47
auto
*managerPrivate =
static_cast
<QSessionManagerPrivate*>(QObjectPrivate::get(qGuiAppPriv->session_manager));
48
return
static_cast
<QCocoaSessionManager *>(managerPrivate->platformSessionManager);
49
}
50
51
QT_END_NAMESPACE
52
53
#
endif
// QT_NO_SESSIONMANAGER
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtbase
src
plugins
platforms
cocoa
qcocoasessionmanager.cpp
Generated on
for Qt by
1.18.0