From 349f6b9c320fec16e0df1ad9d1e44d9261c040d5 Mon Sep 17 00:00:00 2001 From: David Rosca Date: Thu, 1 Feb 2018 20:21:11 +0100 Subject: [PATCH] TabWidget: Fix emitting tabMoved when pinning tabs --- src/lib/tabwidget/tabwidget.cpp | 9 +++++++++ src/lib/tabwidget/tabwidget.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/src/lib/tabwidget/tabwidget.cpp b/src/lib/tabwidget/tabwidget.cpp index 32ae4d11b..d712249bf 100644 --- a/src/lib/tabwidget/tabwidget.cpp +++ b/src/lib/tabwidget/tabwidget.cpp @@ -638,6 +638,15 @@ void TabWidget::closeToLeft(int index) } } +int TabWidget::pinUnPinTab(int index, const QString &title) +{ + const int newIndex = TabStackedWidget::pinUnPinTab(index, title); + if (index != newIndex) { + emit tabMoved(index, newIndex); + } + return newIndex; +} + void TabWidget::detachTab(WebTab* tab) { Q_ASSERT(tab); diff --git a/src/lib/tabwidget/tabwidget.h b/src/lib/tabwidget/tabwidget.h index 94b70117e..a70635271 100644 --- a/src/lib/tabwidget/tabwidget.h +++ b/src/lib/tabwidget/tabwidget.h @@ -93,6 +93,8 @@ public: ToolButton* buttonClosedTabs() const; AddTabButton* buttonAddTab() const; + int pinUnPinTab(int index, const QString &title = QString()); + void detachTab(WebTab* tab); public slots: