File tree Expand file tree Collapse file tree 3 files changed +20
-6
lines changed Expand file tree Collapse file tree 3 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -566,6 +566,7 @@ CDockManager::~CDockManager()
566
566
auto FloatingWidgets = d->FloatingWidgets ;
567
567
for (auto FloatingWidget : FloatingWidgets)
568
568
{
569
+ FloatingWidget->deleteContent ();
569
570
delete FloatingWidget;
570
571
}
571
572
Original file line number Diff line number Diff line change @@ -760,10 +760,22 @@ CFloatingDockContainer::CFloatingDockContainer(CDockWidget *DockWidget) :
760
760
d->DockManager ->notifyWidgetOrAreaRelocation (DockWidget);
761
761
}
762
762
763
+
763
764
// ============================================================================
764
765
CFloatingDockContainer::~CFloatingDockContainer ()
765
766
{
766
767
ADS_PRINT (" ~CFloatingDockContainer" );
768
+ if (d->DockManager )
769
+ {
770
+ d->DockManager ->removeFloatingWidget (this );
771
+ }
772
+ delete d;
773
+ }
774
+
775
+
776
+ // ============================================================================
777
+ void CFloatingDockContainer::deleteContent ()
778
+ {
767
779
std::vector<QPointer<ads::CDockAreaWidget>> areas;
768
780
for (int i = 0 ; i != dockContainer ()->dockAreaCount (); ++i)
769
781
{
@@ -788,12 +800,6 @@ CFloatingDockContainer::~CFloatingDockContainer()
788
800
delete ptrWdg;
789
801
}
790
802
}
791
-
792
- if (d->DockManager )
793
- {
794
- d->DockManager ->removeFloatingWidget (this );
795
- }
796
- delete d;
797
803
}
798
804
799
805
// ============================================================================
Original file line number Diff line number Diff line change @@ -146,6 +146,13 @@ private Q_SLOTS:
146
146
*/
147
147
virtual void finishDragging () override ;
148
148
149
+ /* *
150
+ * This function deletes all dock widgets in it.
151
+ * This functions should be called only from dock manager in its
152
+ * destructor before deleting the floating widget
153
+ */
154
+ void deleteContent ();
155
+
149
156
/* *
150
157
* Call this function if you just want to initialize the position
151
158
* and size of the floating widget
You can’t perform that action at this time.
0 commit comments