Fix session management on X11 again.

commitData is no longer the reimplementation of a virtual method,
but now a slot connected to commitDataRequest. So we can't prevent Qt
from closing all windows, anymore. Let's just save the config before
it does so.

Session management is 1) commitData (asking the user whether to save unsaved
changes and then closing the window) and 2) saveState (saving state...).
But this assumes that the state doesn't include window visibility.
In most apps I guess it doesn't. In Charm it does...
so we save state in commitData already.

Change-Id: I84dccaea5f60e9635fc5db8c73f92d8b4d8fb56f
Reviewed-on: https://codereview.kdab.com/10451
Reviewed-by: Continuous Integration <build@kdab.com>
Reviewed-by: Guillermo Amaral <gamaral@kdab.com>
Remove unused variable and C-style casts

I hate C-style casts, after a long porting project full of nasty casts,
so I always use -Wold-style-cast :)

Change-Id: I55f5b6a14778f0f4d663953f6c773fc245d9b7dd
Reviewed-on: https://codereview.kdab.com/10425
Reviewed-by: Continuous Integration <build@kdab.com>
Reviewed-by: Guillermo Amaral <gamaral@kdab.com>
Escape "&" in the task menu

Make sure we display "&" and not interpret it as mnemonic hint.

Fixes #172

Change-Id: I865b3d78cdd346cec331d07e31fd827aa954366b
Reviewed-on: https://codereview.kdab.com/11133
Reviewed-by: Continuous Integration <build@kdab.com>
Reviewed-by: Guillermo Amaral <gamaral@kdab.com>