[Development] Qt 5 QSessionManager

David Faure david.faure at kdab.com
Mon Jul 22 23:35:11 CEST 2013

On Monday 22 July 2013 23:19:00 Samuel Gaist wrote:
> Very good !
> Something like a QPlatformSessionManager returned by the QPluginIntegration?

I assume you mean QPlatformIntegration. Then yes.

> It would essentially replace the current content of QSessionManagerPrivate
> with functions.

Yes, for the benefit of the public methods that will have to call these.
Plus other virtual methods for the currently-unimplemented methods (e.g. 
isPhase2() and others).

> Should there be an abstract for this class with a default implementation
> (i.e QDefaultPlatformSessionManager) ? Or having the base class would be
> enough ?

The base class can take care of the trivial getters/setters you mentionned 
(e.g. restartCommand/setRestartCommand).

In addition it could have empty implementations of the other virtuals (e.g. 
isPhase2), for platforms that don't really support session management. Hmm, 
well, the alternative is to just not instanciate a subclass, i.e. handling the 
case of NULL in QSessionManager (you'll have to do that anyway, to avoid 
having to implement session management in all platforms).

David Faure | david.faure at kdab.com | Managing Director KDAB France
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions

More information about the Development mailing list