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
6#include "qplatformsessionmanager.h"
7
8#include "qguiapplication_p.h"
9
10#ifndef QT_NO_SESSIONMANAGER
11
12QT_BEGIN_NAMESPACE
13
14QPlatformSessionManager::QPlatformSessionManager(const QString &id, const QString &key)
15 : m_sessionId(id),
16 m_sessionKey(key),
17 m_restartHint(QSessionManager::RestartIfRunning)
18{
19}
20
21QPlatformSessionManager::~QPlatformSessionManager()
22{
23}
24
25QString QPlatformSessionManager::sessionId() const
26{
27 return m_sessionId;
28}
29
30QString QPlatformSessionManager::sessionKey() const
31{
32 return m_sessionKey;
33}
34
35bool QPlatformSessionManager::allowsInteraction()
36{
37 return false;
38}
39
40bool QPlatformSessionManager::allowsErrorInteraction()
41{
42 return false;
43}
44
45void QPlatformSessionManager::release()
46{
47}
48
49void QPlatformSessionManager::cancel()
50{
51}
52
53void QPlatformSessionManager::setRestartHint(QSessionManager::RestartHint restartHint)
54{
55 m_restartHint = restartHint;
56}
57
58QSessionManager::RestartHint QPlatformSessionManager::restartHint() const
59{
60 return m_restartHint;
61}
62
63void QPlatformSessionManager::setRestartCommand(const QStringList &command)
64{
65 m_restartCommand = command;
66}
67
68QStringList QPlatformSessionManager::restartCommand() const
69{
70 return m_restartCommand;
71}
72
73void QPlatformSessionManager::setDiscardCommand(const QStringList &command)
74{
75 m_discardCommand = command;
76}
77
78QStringList QPlatformSessionManager::discardCommand() const
79{
80 return m_discardCommand;
81}
82
83void QPlatformSessionManager::setManagerProperty(const QString &name, const QString &value)
84{
85 Q_UNUSED(name);
86 Q_UNUSED(value);
87}
88
89void QPlatformSessionManager::setManagerProperty(const QString &name, const QStringList &value)
90{
91 Q_UNUSED(name);
92 Q_UNUSED(value);
93}
94
95bool QPlatformSessionManager::isPhase2() const
96{
97 return false;
98}
99
100void QPlatformSessionManager::requestPhase2()
101{
102}
103
104void QPlatformSessionManager::appCommitData()
105{
106 qGuiApp->d_func()->commitData();
107}
108
109void QPlatformSessionManager::appSaveState()
110{
111 qGuiApp->d_func()->saveState();
112}
113
114QT_END_NAMESPACE
115
116#endif // QT_NO_SESSIONMANAGER
117

source code of qtbase/src/gui/kernel/qplatformsessionmanager.cpp