Don't restart the blocking process on session restore
Summary:
All blocking Kate processes were restarted on session restore which
led to launching (possibly) multiple redundant instances.
This change asks the session manager to not restart such processes.
Note: QObject::connect() is used here because the session manager
can't be accessed directly according to the documentation [1]:
In Qt, session management requests for action are handled by the two signals QGuiApplication::commitDataRequest() and QGuiApplication::saveStateRequest(). Both provide a reference to a QSessionManager object as argument. The session manager can only be accessed in slots invoked by these signals.
[1] http://doc.qt.io/qt-5/qsessionmanager.html#details
BUG: 360066
FIXED-IN: 18.04
Test Plan:
0. Make sure that Plasma is configured to restore previous session on startup. 1. Open Dolphin and create 'test1' and 'test2' text files. 2. Open 'test1' in Kate from Dolphin. 3. Open 'test2' in the already running Kate instance from Dolphin. 4. Log out and back in. Check that there are no redundant Kate instances running.
Reviewers: Kate, dhaumann
Reviewed By: Kate, dhaumann
Subscribers: ngraham, dhaumann
Tags: Kate
Differential Revision: https://phabricator.kde.org/D11818