on xenial help sign in
Ensure the QML engine doesn't delete our mock MirSurfaces on its own.

That will cause some hard-to-track failures in QML test runs

commitc2798badd418639d3317126e1e1fb63e50fcf2ea authorDaniel d'Andrada <daniel.dandrada@canonical.com> dateWed 17 Feb 2016, 10:18 (11 years ago) parent96a9bce
1 file changed+2
tests/mocks/Unity/Application/MirSurface.cpp+2
tests/mocks/Unity/Application/MirSurface.cpp+2
@@ -38,6 +38,8 @@ MirSurface::MirSurface(const QString& name,
3838 , m_slowToResize(false)
3939{
4040// qDebug() << "MirSurface::MirSurface() " << name;
41+ QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership);
42+
4143 m_delayedResizeTimer.setInterval(600);
4244 m_delayedResizeTimer.setSingleShot(true);
4345 connect(&m_delayedResizeTimer, &QTimer::timeout, this, &MirSurface::applyDelayedResize);