1
0
mirror of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git synced 2025-04-01 02:42:39 +08:00

Update FloatingDockContainer.cpp

saveState() may use the floatingDockContainer to be deleted
This commit is contained in:
Eric Wong 2023-06-14 12:07:45 +08:00 committed by Jon Jenssen
parent 2b14e4b6a0
commit 9c388b4f3d

View File

@ -683,11 +683,6 @@ CFloatingDockContainer::CFloatingDockContainer(CDockManager *DockManager) :
{
native_window = false;
}
QString WaylandDisplay = qgetenv("WAYLAND_DISPLAY").toLower();
if (WaylandDisplay != "")
{
native_window = false;
}
}
if (native_window)
@ -699,7 +694,7 @@ CFloatingDockContainer::CFloatingDockContainer(CDockManager *DockManager) :
{
d->TitleBar = new CFloatingWidgetTitleBar(this);
setTitleBarWidget(d->TitleBar);
setWindowFlags(Qt::Window | Qt::WindowMinMaxButtonsHint | Qt::BypassWindowManagerHint);
setWindowFlags(Qt::Window | Qt::WindowMinMaxButtonsHint | Qt::FramelessWindowHint);
d->TitleBar->enableCloseButton(isClosable());
connect(d->TitleBar, SIGNAL(closeRequested()), SLOT(close()));
connect(d->TitleBar, &CFloatingWidgetTitleBar::maximizeRequested,
@ -1138,6 +1133,10 @@ void CFloatingDockContainer::hideAndDeleteLater()
d->AutoHideChildren = false;
hide();
deleteLater();
if (d->DockManager)
{
d->DockManager->removeFloatingWidget(this);
}
}
//============================================================================