https://bugs.kde.org/show_bug.cgi?id=354724

--- Comment #19 from Thomas Lübking <thomas.luebk...@gmail.com> ---
(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 are receiving this mail because:
You are watching all bug changes.

Reply via email to