Update from toolwindowmanager repository @ 755b795

This commit is contained in:
baldurk
2026-05-15 13:14:56 +01:00
parent bccce17b97
commit 97cda2a241
3 changed files with 7 additions and 2 deletions
@@ -1524,6 +1524,8 @@ void ToolWindowManager::tabCloseRequested(int index)
if(!allowClose(toolWindow))
return;
tabWidget->tabClosing(index);
if(toolWindowProperties(toolWindow) & ToolWindowManager::HideOnClose)
hideToolWindow(toolWindow);
else
@@ -61,7 +61,6 @@ ToolWindowManagerArea::ToolWindowManagerArea(ToolWindowManager *manager, QWidget
m_manager->m_areas << this;
QObject::connect(tabBar(), &QTabBar::tabMoved, this, &ToolWindowManagerArea::tabMoved);
QObject::connect(tabBar(), &QTabBar::tabCloseRequested, this, &ToolWindowManagerArea::tabClosing);
QObject::connect(tabBar(), &QTabBar::tabCloseRequested, this, &QTabWidget::tabCloseRequested);
QObject::connect(this, &QTabWidget::currentChanged, this, &ToolWindowManagerArea::tabSelected);
}
@@ -68,6 +68,11 @@ public:
*/
void updateToolWindow(QWidget *toolWindow);
/*!
* Callback when a tab is closing, after manager has checked that it is allowed.
*/
void tabClosing(int index);
protected:
//! Reimplemented from QTabWidget::mouseMoveEvent.
virtual void mouseMoveEvent(QMouseEvent *);
@@ -116,7 +121,6 @@ private:
private slots:
void tabMoved(int from, int to);
void tabSelected(int index);
void tabClosing(int index);
};
#endif // TOOLWINDOWMANAGERAREA_H