diff options
| author | Samuel Gaist <samuel.gaist@edeltech.ch> | 2013-08-20 18:14:48 +0200 |
|---|---|---|
| committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-04 00:05:12 +0200 |
| commit | 85fc95f346a33173cea107f799cbcff2b92f6dfb (patch) | |
| tree | ae32f6b2ed881d1f9488c31a0cef69839b29ca3d /src/gui/kernel/qplatformintegration.cpp | |
| parent | a871f224f86e51b3d009374a1a5aa1cf70bfa66e (diff) | |
Add QPA session manager
The QSessionManager doesn't allow customization in platform independent
way. The new QPlatformSessionManager aims to change that. Now the
QSessionManagerPrivate has a new QPlatformSessionManager member to
forward all the calls to QSessionManager's functions. If no platform
manager is present, the current behavior is used.
QPlatformSessionManager mimics the current QSessionManager behavior.
A new factory function has been added to QPlatformIntegration to return
a QPlatformSessionManager
Task-number: QTBUG-28228
Change-Id: Ida7ac16a8f5303df5014fcb67878170ebdb37203
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
Reviewed-by: David Faure (KDE) <faure@kde.org>
Diffstat (limited to 'src/gui/kernel/qplatformintegration.cpp')
| -rw-r--r-- | src/gui/kernel/qplatformintegration.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp index 434344df089..06d2aa4fca2 100644 --- a/src/gui/kernel/qplatformintegration.cpp +++ b/src/gui/kernel/qplatformintegration.cpp @@ -51,6 +51,10 @@ #include <private/qdnd_p.h> #include <private/qsimpledrag_p.h> +#ifndef QT_NO_SESSIONMANAGER +# include <qpa/qplatformsessionmanager.h> +#endif + QT_BEGIN_NAMESPACE /*! @@ -395,4 +399,17 @@ QPlatformOffscreenSurface *QPlatformIntegration::createPlatformOffscreenSurface( return 0; } +#ifndef QT_NO_SESSIONMANAGER +/*! + \since 5.2 + + Factory function for QPlatformSessionManager. The default QPlatformSessionManager provides the same + functionality as the QSessionManager. +*/ +QPlatformSessionManager *QPlatformIntegration::createPlatformSessionManager(const QString &id, const QString &key) const +{ + return new QPlatformSessionManager(id, key); +} +#endif + QT_END_NAMESPACE |
