[Development] Request for API freeze exception to fix an important bug

Andreas Hartmetz ahartmetz at gmail.com
Fri Jan 29 14:54:59 CET 2016


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() 
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:

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


More information about the Development mailing list