Windows: Fix exit crash related to deletion of platform screens.
Do not delete screens in the destructor as this might call back to the Windows and use QWindowsContext. Change-Id: I5e66e480d4b6ddb8b17cc92e4bef93013e336be6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>bb10
parent
d21f28956e
commit
69b9943d94
|
|
@ -291,6 +291,7 @@ QWindowsContext::~QWindowsContext()
|
|||
if (d->m_oleInitializeResult == S_OK || d->m_oleInitializeResult == S_FALSE)
|
||||
OleUninitialize();
|
||||
|
||||
d->m_screenManager.clearScreens(); // Order: Potentially calls back to the windows.
|
||||
m_instance = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -304,11 +304,6 @@ QWindowsScreenManager::QWindowsScreenManager() :
|
|||
{
|
||||
}
|
||||
|
||||
QWindowsScreenManager::~QWindowsScreenManager()
|
||||
{
|
||||
qDeleteAll(m_screens);
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Triggers synchronization of screens (WM_DISPLAYCHANGE).
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,8 @@ public:
|
|||
typedef QList<QWindowsScreen *> WindowsScreenList;
|
||||
|
||||
QWindowsScreenManager();
|
||||
~QWindowsScreenManager();
|
||||
|
||||
inline void clearScreens() { qDeleteAll(m_screens); m_screens.clear(); }
|
||||
|
||||
void handleScreenChanges();
|
||||
bool handleDisplayChange(WPARAM wParam, LPARAM lParam);
|
||||
|
|
|
|||
Loading…
Reference in New Issue