forked from qt-creator/qt-creator
qmldesigner: on exit crash fix
Change-Id: I11d4e6b6b7bb2d8d862015718ae432b1eaaa8b57 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -92,7 +92,7 @@ namespace ADS
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DockManager *q;
|
DockManager *q;
|
||||||
QList<FloatingDockContainer *> m_floatingWidgets;
|
QList<QPointer<FloatingDockContainer>> m_floatingWidgets;
|
||||||
QList<DockContainerWidget *> m_containers;
|
QList<DockContainerWidget *> m_containers;
|
||||||
DockOverlay *m_containerOverlay = nullptr;
|
DockOverlay *m_containerOverlay = nullptr;
|
||||||
DockOverlay *m_dockAreaOverlay = nullptr;
|
DockOverlay *m_dockAreaOverlay = nullptr;
|
||||||
@@ -357,9 +357,11 @@ namespace ADS
|
|||||||
save();
|
save();
|
||||||
saveStartupWorkspace();
|
saveStartupWorkspace();
|
||||||
|
|
||||||
for (auto floatingWidget : d->m_floatingWidgets)
|
for (auto floatingWidget : d->m_floatingWidgets) {
|
||||||
delete floatingWidget;
|
if (floatingWidget)
|
||||||
|
delete floatingWidget.data();
|
||||||
|
}
|
||||||
|
d->m_floatingWidgets.clear();
|
||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -485,7 +487,7 @@ namespace ADS
|
|||||||
return d->m_containers;
|
return d->m_containers;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QList<FloatingDockContainer *> DockManager::floatingWidgets() const
|
const QList<QPointer<FloatingDockContainer>> DockManager::floatingWidgets() const
|
||||||
{
|
{
|
||||||
return d->m_floatingWidgets;
|
return d->m_floatingWidgets;
|
||||||
}
|
}
|
||||||
|
@@ -389,7 +389,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
* Returns the list of all floating widgets.
|
* Returns the list of all floating widgets.
|
||||||
*/
|
*/
|
||||||
const QList<FloatingDockContainer *> floatingWidgets() const;
|
const QList<QPointer<FloatingDockContainer> > floatingWidgets() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function always return 0 because the main window is always behind
|
* This function always return 0 because the main window is always behind
|
||||||
|
Reference in New Issue
Block a user