summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qtabbar_p.h
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-07-02 14:17:52 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-07-02 22:43:07 +0200
commitdd34ac5c3450b93296480c766b092d37c6f87a36 (patch)
treeda3c14ceaab134dd4aa6037f28ca6f2b24ad32d8 /src/widgets/widgets/qtabbar_p.h
parent01d30f83992c185d38943db200bafad2b4522c21 (diff)
Keep track of mouse button state in QTabBar
Get rid of call to QGuiApplication::mouseButtons Task-number: QTBUG-73829 Change-Id: I7cc706b5e037c68ecf3c778b824ae8c93e5cfe38 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/widgets/widgets/qtabbar_p.h')
-rw-r--r--src/widgets/widgets/qtabbar_p.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/widgets/widgets/qtabbar_p.h b/src/widgets/widgets/qtabbar_p.h
index 7bca487d72..4d005af9a9 100644
--- a/src/widgets/widgets/qtabbar_p.h
+++ b/src/widgets/widgets/qtabbar_p.h
@@ -88,14 +88,17 @@ class Q_WIDGETS_EXPORT QTabBarPrivate : public QWidgetPrivate
Q_DECLARE_PUBLIC(QTabBar)
public:
QTabBarPrivate()
- :currentIndex(-1), pressedIndex(-1), firstVisible(0), lastVisible(-1), shape(QTabBar::RoundedNorth), layoutDirty(false),
- drawBase(true), scrollOffset(0), hoverIndex(-1), elideModeSetByUser(false), useScrollButtonsSetByUser(false), expanding(true), closeButtonOnTabs(false),
- selectionBehaviorOnRemove(QTabBar::SelectRightTab), paintWithOffsets(true), movable(false),
- dragInProgress(false), documentMode(false), autoHide(false), changeCurrentOnDrag(false),
- switchTabCurrentIndex(-1), switchTabTimerId(0), movingTab(nullptr)
+ : currentIndex(-1), mouseButtons(Qt::NoButton), pressedIndex(-1), firstVisible(0), lastVisible(-1),
+ shape(QTabBar::RoundedNorth), layoutDirty(false), drawBase(true), scrollOffset(0),
+ hoverIndex(-1), elideModeSetByUser(false), useScrollButtonsSetByUser(false), expanding(true),
+ closeButtonOnTabs(false), selectionBehaviorOnRemove(QTabBar::SelectRightTab),
+ paintWithOffsets(true), movable(false), dragInProgress(false), documentMode(false),
+ autoHide(false), changeCurrentOnDrag(false), switchTabCurrentIndex(-1), switchTabTimerId(0),
+ movingTab(nullptr)
{}
int currentIndex;
+ Qt::MouseButtons mouseButtons;
int pressedIndex;
int firstVisible;
int lastVisible;