summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication_p.h
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@qt.io>2017-05-02 16:08:41 +0200
committerGatis Paeglis <gatis.paeglis@qt.io>2017-05-05 13:54:48 +0000
commitc2c50268912bc49d104a8d04a54f2e9d5e35d6f8 (patch)
tree0dacff2125245d0ca41aedf75e8e6ed9ba2a7373 /src/gui/kernel/qguiapplication_p.h
parent38134ff41edff36e757d019a703b954607215399 (diff)
cleanup: remove redundant QGuiApplicationPrivate::buttons
This variable was introducing during Qt 5.0 Q{Gui}Application refactoring days (2011 or even before) and since then has been used interchangeably with QGuiApplicationPrivate::mouse_buttons. This patch removes the duplicate member variable as it is redundant and could be a source of potential errors. Initially I was thinking that ::buttons might be used for the purpose of QTestLib, but it is not. QTestLib delivers mouse events directly via qApp->notify() (mouse button state is update via QGuiApplicationPrivate::mouse_buttons from notify()), or via window system interface QWindowSystemInterface::handleMouseEvent (which goes through QGuiApplication::processMouseEvent). Looking at QGuiApplication, it is clear that ::buttons and ::mouse_buttons always have the same value, as there is only one assignment to these members in QGuiApplication: mouse_buttons = buttons = e->buttons; And there are no other places that would assign to QGuiApplicationPrivate::buttons. Change-Id: Ib60d366bf056a98b15bb4538a569693e7bd022e2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/gui/kernel/qguiapplication_p.h')
-rw-r--r--src/gui/kernel/qguiapplication_p.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h
index 3804667ef3..014ed861df 100644
--- a/src/gui/kernel/qguiapplication_p.h
+++ b/src/gui/kernel/qguiapplication_p.h
@@ -201,7 +201,6 @@ public:
virtual bool isWindowBlocked(QWindow *window, QWindow **blockingWindow = 0) const;
virtual bool popupActive() { return false; }
- static Qt::MouseButtons buttons;
static ulong mousePressTime;
static Qt::MouseButton mousePressButton;
static int mousePressX;