File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -764,6 +764,31 @@ CFloatingDockContainer::CFloatingDockContainer(CDockWidget *DockWidget) :
764
764
CFloatingDockContainer::~CFloatingDockContainer ()
765
765
{
766
766
ADS_PRINT (" ~CFloatingDockContainer" );
767
+ std::vector<QPointer<ads::CDockAreaWidget>> areas;
768
+ for (int i = 0 ; i != dockContainer ()->dockAreaCount (); ++i)
769
+ {
770
+ areas.push_back ( dockContainer ()->dockArea (i) );
771
+ }
772
+ for (auto area : areas)
773
+ {
774
+ if (!area)
775
+ {
776
+ continue ;
777
+ }
778
+
779
+ // QPointer delete safety - just in case some dock wigdet in destruction
780
+ // deletes another related/twin or child dock widget.
781
+ std::vector<QPointer<QWidget>> deleteWidgets;
782
+ for (auto widget : area->dockWidgets ())
783
+ {
784
+ deleteWidgets.push_back (widget);
785
+ }
786
+ for (auto ptrWdg : deleteWidgets)
787
+ {
788
+ delete ptrWdg;
789
+ }
790
+ }
791
+
767
792
if (d->DockManager )
768
793
{
769
794
d->DockManager ->removeFloatingWidget (this );
You can’t perform that action at this time.
0 commit comments