Reverted changes that cause application crash

This commit is contained in:
Uwe Kindler 2020-08-24 13:22:34 +02:00
parent 703a9b3e12
commit c28a27c81c
2 changed files with 3 additions and 26 deletions

View File

@ -86,18 +86,6 @@ public:
} }
/**
* Delete widgets without parents in this layout
*/
~CDockAreaLayout()
{
for(auto Widget : m_Widgets)
{
if(!Widget->parent())
delete Widget;
}
}
/** /**
* Returns the number of widgets in this layout * Returns the number of widgets in this layout
*/ */
@ -977,8 +965,10 @@ QSize CDockAreaWidget::minimumSizeHint() const
void CDockAreaWidget::onDockWidgetFeaturesChanged() void CDockAreaWidget::onDockWidgetFeaturesChanged()
{ {
if (d->TitleBar) if (d->TitleBar)
{
d->updateTitleBarButtonStates(); d->updateTitleBarButtonStates();
} }
}
} // namespace ads } // namespace ads

View File

@ -484,12 +484,6 @@ CDockManager::~CDockManager()
{ {
delete FloatingWidget; delete FloatingWidget;
} }
auto DockWidgetsMap = d->DockWidgetsMap;
for(auto DockWidget : d->DockWidgetsMap)
{
if(!DockWidget->parent())
delete DockWidget;
}
delete d; delete d;
} }
@ -658,15 +652,8 @@ void CDockManager::showEvent(QShowEvent *event)
} }
for (auto FloatingWidget : d->UninitializedFloatingWidgets) for (auto FloatingWidget : d->UninitializedFloatingWidgets)
{
for(CDockWidget* DockWidget : FloatingWidget->dockWidgets())
{
if(!DockWidget->isClosed())
{ {
FloatingWidget->show(); FloatingWidget->show();
break;
}
}
} }
d->UninitializedFloatingWidgets.clear(); d->UninitializedFloatingWidgets.clear();
} }