Let the session management also write out if we use the resource calendar. This is the first part to the solution of bug #49356. The other part, loading the resource calendar or the appropriate calendar file, is much harder and requires deep changes in the KOrganizer class:
Let the session management also write out if we use the resource calendar. This is the first part to the solution of bug #49356. The other part, loading the resource calendar or the appropriate calendar file, is much harder and requires deep changes in the KOrganizer class:

In the constructor of KOrganizer the calendar - either CalendarLocal or CalendarResources - is already allocated using the bool document parameter. So from then on it is already determined whether we use a local calendar file or the system-wide calendar. Session management, however, first creates a new KOrganizer(), i.e. bool document always has the default value true so no resource calendar will ever be restored, and only then it calls readProperties, which cannot create the CalendarResources any more.

But there is also another problem. Although all config settings are correctly written out to the session management's config file, on login only the very first of the windows is actually restored. This happens also if the config file says that there are 3 windows or so.

CCMAIL: 49356@bugs.kde.org

svn path=/trunk/kdepim/; revision=241451

lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi