Hello,

while investigating session saving problems in KDE I found that the big 
underlying problem is that QGuiApplication::commitData() can't be 
prevented from trying to close windows. It does that to see if they 
refuse (ignore the close event), and if they do, it's interpreted as the 
application canceling logout. That gives poor man's session managament 
to applications that don't explicitly implement any real session 
management. It also essentially breaks applications that do implement 
full session management.
This behavior is very old (has been present at least as early as Qt 
2.3.2), but what is new in Qt5 is that it can't be disabled. That is 
becasue one could override Q[Gui]Application::commitData() before Qt5, 
but not anymore. One now just connects to the commitDataRequest() 
signal.
So, how to fix it? Simple and (very) ugly: Add API to disable the 
closing of windows in commitData(). Because session saving is IMHO 
pretty important for KDE, I'm asking for an exception to add API to 5.6 
to fix it.
The change request is at:
https://codereview.qt-project.org/#/c/146566/

As should be obvious from the patch, it does nothing if the new API 
isn't used.

Cheers,
Andreas
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to