Skip to content

Commit c28a27c

Browse files
Reverted changes that cause application crash
1 parent 703a9b3 commit c28a27c

File tree

2 files changed

+3
-26
lines changed

2 files changed

+3
-26
lines changed

src/DockAreaWidget.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -86,18 +86,6 @@ class CDockAreaLayout
8686

8787
}
8888

89-
/**
90-
* Delete widgets without parents in this layout
91-
*/
92-
~CDockAreaLayout()
93-
{
94-
for(auto Widget : m_Widgets)
95-
{
96-
if(!Widget->parent())
97-
delete Widget;
98-
}
99-
}
100-
10189
/**
10290
* Returns the number of widgets in this layout
10391
*/
@@ -977,7 +965,9 @@ QSize CDockAreaWidget::minimumSizeHint() const
977965
void CDockAreaWidget::onDockWidgetFeaturesChanged()
978966
{
979967
if (d->TitleBar)
968+
{
980969
d->updateTitleBarButtonStates();
970+
}
981971
}
982972

983973

src/DockManager.cpp

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -484,12 +484,6 @@ CDockManager::~CDockManager()
484484
{
485485
delete FloatingWidget;
486486
}
487-
auto DockWidgetsMap = d->DockWidgetsMap;
488-
for(auto DockWidget : d->DockWidgetsMap)
489-
{
490-
if(!DockWidget->parent())
491-
delete DockWidget;
492-
}
493487
delete d;
494488
}
495489

@@ -659,14 +653,7 @@ void CDockManager::showEvent(QShowEvent *event)
659653

660654
for (auto FloatingWidget : d->UninitializedFloatingWidgets)
661655
{
662-
for(CDockWidget* DockWidget : FloatingWidget->dockWidgets())
663-
{
664-
if(!DockWidget->isClosed())
665-
{
666-
FloatingWidget->show();
667-
break;
668-
}
669-
}
656+
FloatingWidget->show();
670657
}
671658
d->UninitializedFloatingWidgets.clear();
672659
}

0 commit comments

Comments
 (0)