/src/qtbase/src/gui/kernel/qplatformsessionmanager.cpp
Line | Count | Source |
1 | | // Copyright (C) 2013 Samuel Gaist <samuel.gaist@edeltech.ch> |
2 | | // Copyright (C) 2013 Teo Mrnjavac <teo@kde.org> |
3 | | // Copyright (C) 2016 The Qt Company Ltd. |
4 | | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
5 | | // Qt-Security score:significant reason:default |
6 | | |
7 | | #include "qplatformsessionmanager.h" |
8 | | |
9 | | #include "qguiapplication_p.h" |
10 | | |
11 | | #ifndef QT_NO_SESSIONMANAGER |
12 | | |
13 | | QT_BEGIN_NAMESPACE |
14 | | |
15 | | QPlatformSessionManager::QPlatformSessionManager(const QString &id, const QString &key) |
16 | 146k | : m_sessionId(id), |
17 | 146k | m_sessionKey(key), |
18 | 146k | m_restartHint(QSessionManager::RestartIfRunning) |
19 | 146k | { |
20 | 146k | } |
21 | | |
22 | | QPlatformSessionManager::~QPlatformSessionManager() |
23 | 146k | { |
24 | 146k | } |
25 | | |
26 | | QString QPlatformSessionManager::sessionId() const |
27 | 0 | { |
28 | 0 | return m_sessionId; |
29 | 0 | } |
30 | | |
31 | | QString QPlatformSessionManager::sessionKey() const |
32 | 0 | { |
33 | 0 | return m_sessionKey; |
34 | 0 | } |
35 | | |
36 | | bool QPlatformSessionManager::allowsInteraction() |
37 | 0 | { |
38 | 0 | return false; |
39 | 0 | } |
40 | | |
41 | | bool QPlatformSessionManager::allowsErrorInteraction() |
42 | 0 | { |
43 | 0 | return false; |
44 | 0 | } |
45 | | |
46 | | void QPlatformSessionManager::release() |
47 | 0 | { |
48 | 0 | } |
49 | | |
50 | | void QPlatformSessionManager::cancel() |
51 | 0 | { |
52 | 0 | } |
53 | | |
54 | | void QPlatformSessionManager::setRestartHint(QSessionManager::RestartHint restartHint) |
55 | 0 | { |
56 | 0 | m_restartHint = restartHint; |
57 | 0 | } |
58 | | |
59 | | QSessionManager::RestartHint QPlatformSessionManager::restartHint() const |
60 | 0 | { |
61 | 0 | return m_restartHint; |
62 | 0 | } |
63 | | |
64 | | void QPlatformSessionManager::setRestartCommand(const QStringList &command) |
65 | 0 | { |
66 | 0 | m_restartCommand = command; |
67 | 0 | } |
68 | | |
69 | | QStringList QPlatformSessionManager::restartCommand() const |
70 | 0 | { |
71 | 0 | return m_restartCommand; |
72 | 0 | } |
73 | | |
74 | | void QPlatformSessionManager::setDiscardCommand(const QStringList &command) |
75 | 0 | { |
76 | 0 | m_discardCommand = command; |
77 | 0 | } |
78 | | |
79 | | QStringList QPlatformSessionManager::discardCommand() const |
80 | 0 | { |
81 | 0 | return m_discardCommand; |
82 | 0 | } |
83 | | |
84 | | void QPlatformSessionManager::setManagerProperty(const QString &name, const QString &value) |
85 | 0 | { |
86 | 0 | Q_UNUSED(name); |
87 | 0 | Q_UNUSED(value); |
88 | 0 | } |
89 | | |
90 | | void QPlatformSessionManager::setManagerProperty(const QString &name, const QStringList &value) |
91 | 0 | { |
92 | 0 | Q_UNUSED(name); |
93 | 0 | Q_UNUSED(value); |
94 | 0 | } |
95 | | |
96 | | bool QPlatformSessionManager::isPhase2() const |
97 | 0 | { |
98 | 0 | return false; |
99 | 0 | } |
100 | | |
101 | | void QPlatformSessionManager::requestPhase2() |
102 | 0 | { |
103 | 0 | } |
104 | | |
105 | | void QPlatformSessionManager::appCommitData() |
106 | 0 | { |
107 | 0 | qGuiApp->d_func()->commitData(); |
108 | 0 | } |
109 | | |
110 | | void QPlatformSessionManager::appSaveState() |
111 | 0 | { |
112 | | qGuiApp->d_func()->saveState(); |
113 | 0 | } |
114 | | |
115 | | QT_END_NAMESPACE |
116 | | |
117 | | #endif // QT_NO_SESSIONMANAGER |