qpa: Don't delete platform screens manually

According to the documentation, deleting a platform screen manually can
lead to a crash due to a call to a pure virtual method.
master
Vlad Zahorodnii 2020-08-18 16:10:02 +03:00
parent c7e5680d63
commit b4b0b93188
1 changed files with 3 additions and 1 deletions

View File

@ -46,7 +46,9 @@ Integration::Integration()
Integration::~Integration()
{
qDeleteAll(m_screens);
for (QPlatformScreen *platformScreen : m_screens) {
QWindowSystemInterface::handleScreenRemoved(platformScreen);
}
}
bool Integration::hasCapability(Capability cap) const