diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2021-08-05 11:56:54 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2021-08-10 08:11:38 +0200 |
commit | aa25e8d87e1392459fc5de511798356cb5b5f7cb (patch) | |
tree | 351869a561bcc2c1079749b893cbc2899c0ed23f /src/gui/kernel/qguiapplication.cpp | |
parent | 8da891a7f455c5e1c1c3aa2b41eb62e620927c00 (diff) |
QGuiApplication: move two static variables from DATA to BSS
The {mouse,touch}DoubleXDistance variables were initialized to -1,
which forces them into the DATA segments.
But this value is completely unused, since these variables are also
set in initThemeHints(), called from QGuiApplicationPrivate::init(),
before their only user, QGuiApplicationPrivate::processMouseEvent(),
can possibly execute.
By changing the default value to 0, then, we allow the compiler to
place these variables into the BSS segment.
Change-Id: I86144559ee2410b844f70a4f2499c8d3140d14cf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 55a7c8027b..b1e4c0e882 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -179,8 +179,8 @@ QPalette *QGuiApplicationPrivate::app_pal = nullptr; // default applicati Qt::MouseButton QGuiApplicationPrivate::mousePressButton = Qt::NoButton; -static int mouseDoubleClickDistance = -1; -static int touchDoubleTapDistance = -1; +static int mouseDoubleClickDistance = 0; +static int touchDoubleTapDistance = 0; QWindow *QGuiApplicationPrivate::currentMousePressWindow = nullptr; |