From 98c7ec7e20cfec6b4b55eaf3f06e3350710aab2d Mon Sep 17 00:00:00 2001 From: Méven Car Date: Sun, 10 May 2026 11:24:32 +0200 Subject: dolphintabbar: remove tabClosedRequested handling for middle click Qt 6.11 added its own middle click tab closing. --- src/dolphintabbar.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/dolphintabbar.cpp') diff --git a/src/dolphintabbar.cpp b/src/dolphintabbar.cpp index 1b8236abb..85cfa0788 100644 --- a/src/dolphintabbar.cpp +++ b/src/dolphintabbar.cpp @@ -39,7 +39,6 @@ protected: DolphinTabBar::DolphinTabBar(QWidget *parent) : QTabBar(parent) , m_autoActivationIndex(-1) - , m_tabToBeClosedOnMiddleMouseButtonRelease(-1) { setAcceptDrops(true); setSelectionBehaviorOnRemove(QTabBar::SelectPreviousTab); @@ -131,6 +130,8 @@ void DolphinTabBar::dropEvent(QDropEvent *event) QTabBar::dropEvent(event); } +// Qt 6.11 added its own middle click tab closing +#if QT_VERSION < QT_VERSION_CHECK(6, 11, 0) void DolphinTabBar::mousePressEvent(QMouseEvent *event) { const int index = tabAt(event->pos()); @@ -155,6 +156,7 @@ void DolphinTabBar::mouseReleaseEvent(QMouseEvent *event) QTabBar::mouseReleaseEvent(event); } +#endif void DolphinTabBar::mouseDoubleClickEvent(QMouseEvent *event) { -- cgit v1.3.1