remove the windows when we know they can be removed

the destroyed() connection in shadows is really just a failsafe
This commit is contained in:
Aaron Seigo 2012-12-03 16:56:50 +01:00
parent 2a72e7efad
commit f0ccabbc42
2 changed files with 3 additions and 0 deletions

View File

@ -415,6 +415,7 @@ Dialog::Dialog(QWidget *parent, Qt::WindowFlags f)
Dialog::~Dialog()
{
DialogShadows::self()->removeWindow(this);
delete d;
}

View File

@ -73,6 +73,7 @@ public :
~ToolTipManagerPrivate()
{
if (!QCoreApplication::closingDown()) {
shadow->removeWindow(tipWidget);
delete tipWidget;
}
}
@ -313,6 +314,7 @@ void ToolTipManagerPrivate::createTipWidget()
void ToolTipManagerPrivate::hideTipWidget()
{
if (tipWidget) {
shadow->removeWindow(tipWidget);
tipWidget->hide();
tipWidget->deleteLater();
tipWidget = 0;