diff --git a/src/plugins/coreplugin/dialogs/shortcutsettings.cpp b/src/plugins/coreplugin/dialogs/shortcutsettings.cpp index a60a2046e58..6797a50888e 100644 --- a/src/plugins/coreplugin/dialogs/shortcutsettings.cpp +++ b/src/plugins/coreplugin/dialogs/shortcutsettings.cpp @@ -82,7 +82,7 @@ QWidget *ShortcutSettings::createPage(QWidget *parent) { m_keyNum = m_key[0] = m_key[1] = m_key[2] = m_key[3] = 0; - m_page = new Ui_ShortcutSettings(parent); + m_page = new Ui_ShortcutSettings(); QWidget *w = new QWidget(parent); m_page->setupUi(w); @@ -116,6 +116,8 @@ QWidget *ShortcutSettings::createPage(QWidget *parent) commandChanged(0); + delete m_page; + return w; } diff --git a/src/plugins/coreplugin/generalsettings.cpp b/src/plugins/coreplugin/generalsettings.cpp index 14ba2d0bd73..b21db43fa35 100644 --- a/src/plugins/coreplugin/generalsettings.cpp +++ b/src/plugins/coreplugin/generalsettings.cpp @@ -64,7 +64,7 @@ QString GeneralSettings::trCategory() const QWidget *GeneralSettings::createPage(QWidget *parent) { - m_page = new Ui_GeneralSettings(parent); + m_page = new Ui_GeneralSettings(); QWidget *w = new QWidget(parent); m_page->setupUi(w); @@ -77,7 +77,7 @@ QWidget *GeneralSettings::createPage(QWidget *parent) this, SLOT(resetExternalEditor())); connect(m_page->helpExternalEditorButton, SIGNAL(clicked()), this, SLOT(showHelpForExternalEditor())); - + delete m_page; return w; }