summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-05-17 16:12:01 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2017-05-19 06:16:00 +0000
commit9301d485430daaf39cbcfe70d4223d4afe7037c8 (patch)
tree244554083a7685a51f145cb77e9ca3295b428294 /src/gui/kernel
parent087b4fc6cd3a68db6ac4c3a7f43c03aa6e73c088 (diff)
QGuiApplication: Initialize and clear static variables
Running: tst_qapplication focusMouseClick touchEventPropagation produced: FAIL! : tst_QApplication::touchEventPropagation() 'window.seenMouseEvent' returned FALSE. () since QGuiApplicationPrivate::mouse_buttons was not cleared when destroying and re-instantiating QGuiApplication. Add more initialization and clear screen list on exit. Change-Id: I0d814852c362d4a86f1ff5d6a94ab00d32ed30b9 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qguiapplication.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 1dd019cd55..c0b0acbda6 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -634,6 +634,18 @@ QGuiApplication::~QGuiApplication()
QGuiApplicationPrivate::m_inputDeviceManager = 0;
delete QGuiApplicationPrivate::desktopFileName;
QGuiApplicationPrivate::desktopFileName = 0;
+ QGuiApplicationPrivate::mouse_buttons = Qt::NoButton;
+ QGuiApplicationPrivate::modifier_buttons = Qt::NoModifier;
+ QGuiApplicationPrivate::lastCursorPosition = {qInf(), qInf()};
+ QGuiApplicationPrivate::currentMousePressWindow = QGuiApplicationPrivate::currentMouseWindow = nullptr;
+ QGuiApplicationPrivate::applicationState = Qt::ApplicationInactive;
+ QGuiApplicationPrivate::highDpiScalingUpdated = false;
+ QGuiApplicationPrivate::tabletDevicePoints.clear();
+#ifndef QT_NO_SESSIONMANAGER
+ QGuiApplicationPrivate::is_fallback_session_management_enabled = true;
+#endif
+ QGuiApplicationPrivate::mousePressTime = 0;
+ QGuiApplicationPrivate::mousePressX = QGuiApplicationPrivate::mousePressY = 0;
}
QGuiApplicationPrivate::QGuiApplicationPrivate(int &argc, char **argv, int flags)
@@ -1531,6 +1543,7 @@ QGuiApplicationPrivate::~QGuiApplicationPrivate()
delete m_a32ColorProfile.load();
window_list.clear();
+ screen_list.clear();
}
#if 0