Improve MainWindow state save/restore
authorManuel Nickschas <sputnick@quassel-irc.org>
Tue, 14 Jul 2009 20:20:05 +0000 (22:20 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Tue, 14 Jul 2009 20:58:22 +0000 (22:58 +0200)
commit8c16bc6817aac177791686ac1a5ad8ee2d93410c
tree869b0b9108981af6529787b651d4e6bea9e1929b
parent7b57a7f61c1ab1a94129bfa8aa43f11f70cc16b8
Improve MainWindow state save/restore

Rather than tracking the visibility manually, we now make sure that the window state is saved
before the window is hidden, i.e. not in aboutToQuit() which is already too late for that.
Instead of calling QApplication::quit(), we use our new slot MainWin::quit() which saves the window
layout first.

For KDEified Quassel, we now use KMainWindow's autosave feature rather than using QMainWindow::restoreState().
This might fix some issues with multiple desktops etc, though I haven't tested that. In any case it's cleaner
as it saves additional properties (e.g. toolbar state).
src/common/quassel.cpp
src/common/quassel.h
src/qtui/mainwin.cpp
src/qtui/mainwin.h
src/qtui/qtuiapplication.cpp
src/qtui/qtuiapplication.h