Commit 1a18decb authored by Andreas Cord-Landwehr's avatar Andreas Cord-Landwehr
Browse files

Fix assert with Qt debug build in QWidget destructor

This fixes an assert in the QWidget destructor with message
"d->focus_next->d_func()->focus_prev == this" upon calling the
destructor of LanguagePropertiesPage.
The reason is that the page is destroyed too early via a parent
connection, before the KPageWidgetItem, which owns the page,
destroys it and handles the focus correctly. Removing the parent
does not lead to a memory leak because KPageWidgetItem takes care
of the destruction.
parent db1322e8
......@@ -41,7 +41,7 @@ LanguageProperties::LanguageProperties(KEduVocDocument* doc, QWidget * parent)
KPageWidgetItem* LanguageProperties::createPage(int i)
LanguagePropertiesPage* page = new LanguagePropertiesPage(m_doc, i, this);
LanguagePropertiesPage* page = new LanguagePropertiesPage(m_doc, i);
QString name = i18n("New Language");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment