QmlDesigner: fix too often deleteLater calls

Change-Id: Ia1178dc3d25702786d70d6eac8b2e8ea0bde9d7c
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
This commit is contained in:
Tim Jenssen
2016-01-20 12:32:14 +01:00
committed by Thomas Hartmann
parent 21a8a969a4
commit 5607b86816
2 changed files with 5 additions and 3 deletions

View File

@@ -105,6 +105,7 @@ ColorTool::~ColorTool()
void ColorTool::clear()
{
if (m_colorDialog)
m_colorDialog.data()->deleteLater();
AbstractFormEditorTool::clear();

View File

@@ -109,9 +109,10 @@ TextTool::~TextTool()
void TextTool::clear()
{
if (textItem())
if (textItem()) {
textItem()->clearFocus();
textItem()->deleteLater();
}
AbstractFormEditorTool::clear();
}