Some small renamings

This commit is contained in:
Uwe Kindler 2022-10-27 13:39:00 +02:00
parent 85d7b3047c
commit 3f256f7249
2 changed files with 9 additions and 11 deletions

View File

@ -103,7 +103,6 @@ struct AutoHideDockContainerPrivate
CAutoHideDockContainer* _this;
CDockAreaWidget* DockArea{nullptr};
CDockWidget* DockWidget{nullptr};
QPointer<CDockManager> DockManager{nullptr};
SideBarLocation SideTabBarArea;
QBoxLayout* Layout;
CResizeHandle* ResizeHandle = nullptr;
@ -172,7 +171,6 @@ CAutoHideDockContainer::CAutoHideDockContainer(CDockManager* DockManager, SideBa
Super(parent),
d(new AutoHideDockContainerPrivate(this))
{
d->DockManager = DockManager;
d->SideTabBarArea = area;
d->DockArea = new CDockAreaWidget(DockManager, parent);
d->DockArea->setObjectName("autoHideDockArea");
@ -254,7 +252,7 @@ CAutoHideDockContainer::~CAutoHideDockContainer()
// Remove event filter in case there are any queued messages
qApp->removeEventFilter(this);
if (d->DockManager)
if (parentContainer())
{
parentContainer()->removeAutoHideWidget(this);
}
@ -424,7 +422,7 @@ void CAutoHideDockContainer::collapseView(bool Enable)
d->updateResizeHandleSizeLimitMax();
raise();
show();
d->DockManager->setDockWidgetFocused(d->DockWidget);
d->DockWidget->dockManager()->setDockWidgetFocused(d->DockWidget);
qApp->installEventFilter(this);
}

View File

@ -1065,17 +1065,17 @@ bool DockContainerWidgetPrivate::restoreAutoHideDockArea(CDockingStateReader& s,
}
CDockAreaWidget* DockArea = nullptr;
CAutoHideDockContainer* dockContainer = nullptr;
CAutoHideDockContainer* AutoHideContainer = nullptr;
if (!Testing)
{
dockContainer = new CAutoHideDockContainer(DockManager, area, _this);
if (!dockContainer->restoreState(s, Testing))
AutoHideContainer = new CAutoHideDockContainer(DockManager, area, _this);
if (!AutoHideContainer->restoreState(s, Testing))
{
return false;
}
dockContainer->hide();
DockArea = dockContainer->dockAreaWidget();
AutoHideContainer->hide();
DockArea = AutoHideContainer->dockAreaWidget();
DockArea->updateAutoHideButtonCheckState();
DockArea->updateTitleBarButtonToolTip();
}
@ -1120,9 +1120,9 @@ bool DockContainerWidgetPrivate::restoreAutoHideDockArea(CDockingStateReader& s,
DockArea->autoHideDockContainer()->toggleView(!Closed);
}
if (dockContainer && !dockContainer->dockWidget())
if (AutoHideContainer && !AutoHideContainer->dockWidget())
{
dockContainer->cleanupAndDelete();
AutoHideContainer->cleanupAndDelete();
}
return true;