@@ -54,14 +54,8 @@ MirSurfaceItem::MirSurfaceItem(const QString& name,
54 QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership);
54 QQmlEngine::setObjectOwnership(this, QQmlEngine::CppOwnership);
56 // The assumptions I make here really should hold.
56 // The assumptions I make here really should hold.
57− const QWindowList windows = QGuiApplication::topLevelWindows();
58− QQuickView *quickView = nullptr;
57+ QQuickView *quickView =
59− Q_FOREACH(QWindow *w, windows) {
60− quickView = qobject_cast<QQuickView*>(w);
58+ qobject_cast<QQuickView*>(QGuiApplication::topLevelWindows()[0]);
66 QString qmlComponentFilePath;
60 QString qmlComponentFilePath;
67 if (!qmlFilePath.isEmpty()) {
61 if (!qmlFilePath.isEmpty()) {