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>bb10
parent
087b4fc6cd
commit
9301d48543
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue