Bug Fixes in KDE-PIM
Fix kontact crash when switching components.
The crash could be reproduced by clicking on knode, then
going to config and disable it, then re-enable it, and clicking
on it again ( basically making knode's ctor being called twice ).
This KNGlobal stuff looks like a huge hack. So, KNGlobal creates
a bunch of variables, then KNMainWidget gets ownership on them,
but the getters are in KNGlobal. When ~KNMainWidget
is called, it deletes those variables but KNGlobal will still
hold pointers to them, and who ever calls the getters will
obtain dangling pointers.
Not sure why it was made that way, probably because KNGlobal
uses external linkage, and somebody wanted to recreate stuff
each time KNMainWidget gets recreated.