[Bug 1446865]
Thomas-luebking
1446865 at bugs.launchpad.net
Wed Dec 16 23:52:36 UTC 2015
(In reply to Andreas Hartmetz from comment #18)
> How should that be done, sending close events and expecting applications to
> save their state in response, but not close windows or the application?
QCloseEvent ce;
QApplication::sendEvent(window, &ce);
You only want to emit the event, the widget doesn't close in response -
the event is (usually) emitted when it wants to close.
> It would mean that applications are session management aware
No, it means they give a shit about "session management", but they do care about what happens when the user (or anything) tries to close a window.
The present code in Qt's SM tells me that this is considered the predominant way to handle data-safety - also because it's the regular incident.
Notice again that this data protection mechanism has *nothing* to do
with session management in particular, eg. whenever you try to close a
kwrite window w/ modified text, it will ask you "err, really? maybe safe
the file before?" - and at this point the user can also say "whooops, no
- I didn't want to close at all"
The present code triggers this mechanism and it might be required to
preserve that.
--
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to plasma-workspace in Ubuntu.
https://bugs.launchpad.net/bugs/1446865
Title:
KDE5/Qt5 does not support session restoration
To manage notifications about this bug go to:
https://bugs.launchpad.net/kdebase-workspace/+bug/1446865/+subscriptions
More information about the kubuntu-bugs
mailing list