----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://git.reviewboard.kde.org/r/113714/#review43444 -----------------------------------------------------------
This review has been submitted with commit a01e4ee686f369e4e7d1e7e3a99d68a9b191fe67 by Dan Vrátil to branch KDE/4.11. - Commit Hook On Nov. 7, 2013, 7:52 p.m., Dan Vrátil wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://git.reviewboard.kde.org/r/113714/ > ----------------------------------------------------------- > > (Updated Nov. 7, 2013, 7:52 p.m.) > > > Review request for kdelibs. > > > Repository: kdelibs > > > Description > ------- > > Call KXMLGUIFactory::reset() before calling KXMLGUIFactory::addClient(this) > in KXMLGuiWindow::createGUI(), otherwise a crash can occur: > > createGUI() calls qDeleteAll(toolbars()) before it starts building the GUI, > which can leave KXMLGUIFactory::Private::m_rootNode with ContainerNodes > internally pointing to, now an invalid, pointer to KToolBar(s). This won't > obviously happen when createGUI() is only called once (which is what most > apps do), but it can happen when it is called multiple times (reinstalling UI > on tab change for example). Leaving m_rootNode with invalid ContainerNodes > causes KXMLGUIBuilder to crash, because it tries to add items into an invalid > KToolBar. > > Calling KXMLGUIFactory::reset() first will make sure the m_rootNode is > purged, all invalid pointers are removed and KXMLGUIBuilder instantiates a > new KToolBar before inserting items. > > > Diffs > ----- > > kdeui/xmlgui/kxmlguiwindow.cpp aa4a067 > > Diff: http://git.reviewboard.kde.org/r/113714/diff/ > > > Testing > ------- > > > Thanks, > > Dan Vrátil > >
