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

View File

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