Fixed Qt6 build

This commit is contained in:
Uwe Kindler 2022-11-04 10:45:09 +01:00
parent 32eaf93692
commit 35f212a788
4 changed files with 26 additions and 34 deletions

View File

@ -573,18 +573,20 @@ void CAutoHideDockContainer::leaveEvent(QEvent *event)
//============================================================================ //============================================================================
void CAutoHideDockContainer::enterEvent(QEvent *event) bool CAutoHideDockContainer::event(QEvent* event)
{ {
d->forwardEventToDockContainer(event); switch (event->type())
Super::enterEvent(event); {
} case QEvent::Enter:
case QEvent::Hide:
d->forwardEventToDockContainer(event);
break;
default:
break;
}
//============================================================================ return Super::event(event);
void CAutoHideDockContainer::hideEvent(QHideEvent *event)
{
d->forwardEventToDockContainer(event);
Super::hideEvent(event);
} }
} }

View File

@ -64,8 +64,7 @@ protected:
virtual bool eventFilter(QObject* watched, QEvent* event) override; virtual bool eventFilter(QObject* watched, QEvent* event) override;
virtual void resizeEvent(QResizeEvent* event) override; virtual void resizeEvent(QResizeEvent* event) override;
virtual void leaveEvent(QEvent *event) override; virtual void leaveEvent(QEvent *event) override;
virtual void enterEvent(QEvent *event) override; virtual bool event(QEvent* event) override;
virtual void hideEvent(QHideEvent *event) override;
/** /**

View File

@ -226,29 +226,22 @@ void CAutoHideTab::setDockWidget(CDockWidget* DockWidget)
//============================================================================ //============================================================================
void CAutoHideTab::enterEvent(QEvent *event) bool CAutoHideTab::event(QEvent* event)
{ {
d->forwardEventToDockContainer(event); switch (event->type())
Super::enterEvent(event); {
case QEvent::Enter:
case QEvent::Leave:
case QEvent::MouseButtonPress:
d->forwardEventToDockContainer(event);
break;
default:
break;
}
return Super::event(event);
} }
//============================================================================
void CAutoHideTab::leaveEvent(QEvent *event)
{
d->forwardEventToDockContainer(event);
Super::leaveEvent(event);
}
//============================================================================
void CAutoHideTab::mousePressEvent(QMouseEvent* event)
{
d->forwardEventToDockContainer(event);
Super::mousePressEvent(event);
}
//============================================================================ //============================================================================
bool CAutoHideTab::iconOnly() const bool CAutoHideTab::iconOnly() const
{ {

View File

@ -68,9 +68,7 @@ protected:
void setSideBar(CAutoHideSideBar *SideTabBar); void setSideBar(CAutoHideSideBar *SideTabBar);
void removeFromSideBar(); void removeFromSideBar();
virtual void enterEvent(QEvent *event) override; virtual bool event(QEvent* event) override;
virtual void leaveEvent(QEvent *event) override;
virtual void mousePressEvent(QMouseEvent* event) override;
public: public:
using Super = CPushButton; using Super = CPushButton;