Some small changes

This commit is contained in:
Uwe Kindler 2022-10-27 11:53:15 +02:00
parent da9062ef62
commit 2d67e9e1e5
4 changed files with 8 additions and 6 deletions

View File

@ -107,7 +107,7 @@ struct AutoHideDockContainerPrivate
SideBarLocation SideTabBarArea;
QBoxLayout* Layout;
CResizeHandle* ResizeHandle = nullptr;
QSize Size;
QSize Size; // creates invalid size
/**
* Private data constructor
@ -194,6 +194,7 @@ CAutoHideDockContainer::CAutoHideDockContainer(CDockManager* DockManager, SideBa
d->Layout->insertWidget(resizeHandleLayoutPosition(area), d->ResizeHandle);
d->Size = d->DockArea->size();
updateSize();
parent->registerAutoHideWidget(this);
}
@ -212,6 +213,7 @@ void CAutoHideDockContainer::updateSize()
{
auto dockContainerParent = parentContainer();
auto rect = dockContainerParent->contentRect();
qDebug() << "Size " << d->Size;
switch (sideTabBarArea())
{
@ -343,6 +345,9 @@ void CAutoHideDockContainer::saveState(QXmlStreamWriter& s)
{
s.writeAttribute("SideTabBarArea", QString::number(sideTabBarArea()));
s.writeAttribute("Size", QString::number(d->isHorizontal() ? d->Size.height() : d->Size.width()));
qDebug() << ": saveState Size: " << d->Size;
qDebug() << ": saveState Size " << QString::number(d->isHorizontal() ? d->Size.height() : d->Size.width());
}
@ -368,8 +373,10 @@ bool CAutoHideDockContainer::restoreState(CDockingStateReader& s, bool Testing)
else
{
d->Size.setWidth(Size);
qDebug() << ": restoreState Width " << Size;
}
qDebug() << ": restoreState Size: " << d->Size;
return true;
}

View File

@ -146,7 +146,6 @@ CDockAreaTabBar::CDockAreaTabBar(CDockAreaWidget* parent) :
//============================================================================
CDockAreaTabBar::~CDockAreaTabBar()
{
qDebug() << "~CDockAreaTabBar count " << count();
delete d;
}

View File

@ -117,9 +117,6 @@ public:
* returns the dock widget this belongs to
*/
CDockWidget* dockWidget() const;
Q_SIGNALS:
void elidedChanged(bool elided);
}; // class DockWidgetSideTab
}
// namespace ads

View File

@ -352,7 +352,6 @@ CDockWidgetTab::CDockWidgetTab(CDockWidget* DockWidget, QWidget *parent) :
//============================================================================
CDockWidgetTab::~CDockWidgetTab()
{
qDebug() << "~CDockWidgetTab " << text();
ADS_PRINT("~CDockWidgetTab()");
delete d;
}