aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dependencies.yaml10
-rw-r--r--src/quick/items/qquickwindow.cpp19
-rw-r--r--src/quick/items/qquickwindow_p.h1
3 files changed, 18 insertions, 12 deletions
diff --git a/dependencies.yaml b/dependencies.yaml
index 4db09f37cd..7134728dbe 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,16 +1,16 @@
dependencies:
../qtbase:
- ref: 8f74b6c8067141d435a62d04146ab8aab7ba065b
+ ref: 9ad6ee42dd381b4e91e7b4f3b1718d7d4b0b6dca
required: true
../qtimageformats:
- ref: c7b5b7aca894699c6e41a613e762337e1e1aa5ca
+ ref: cab941c38b5b37f195c7d1678b8a683fe1aa53de
required: false
../qtlanguageserver:
- ref: a08ac966add944306308109aedb71139d1288587
+ ref: f8004fdb36a1151282eeac66432a0ca2cfc5a8fb
required: false
../qtshadertools:
- ref: 1c1efac1385aa72a7c953fa8068682cd0238e2aa
+ ref: e41648a47c194743ab99d0d6d61a7006afae7033
required: false
../qtsvg:
- ref: e5f17626dc58ffbe4a6f6752b67153297d29cc9b
+ ref: 9525da527199f3682807b650acbe9d8bd38f0d7a
required: false
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 60c4c1633e..f1b131e7e9 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -817,14 +817,16 @@ void QQuickWindowPrivate::init(QQuickWindow *c, QQuickRenderControl *control)
animationController.reset(new QQuickAnimatorController(q));
- QObject::connect(context, &QSGRenderContext::initialized, q, &QQuickWindow::sceneGraphInitialized, Qt::DirectConnection);
- QObject::connect(context, &QSGRenderContext::invalidated, q, &QQuickWindow::sceneGraphInvalidated, Qt::DirectConnection);
- QObject::connect(context, &QSGRenderContext::invalidated, q, &QQuickWindow::cleanupSceneGraph, Qt::DirectConnection);
+ connections = {
+ QObject::connect(context, &QSGRenderContext::initialized, q, &QQuickWindow::sceneGraphInitialized, Qt::DirectConnection),
+ QObject::connect(context, &QSGRenderContext::invalidated, q, &QQuickWindow::sceneGraphInvalidated, Qt::DirectConnection),
+ QObject::connect(context, &QSGRenderContext::invalidated, q, &QQuickWindow::cleanupSceneGraph, Qt::DirectConnection),
- QObject::connect(q, &QQuickWindow::focusObjectChanged, q, &QQuickWindow::activeFocusItemChanged);
- QObject::connect(q, &QQuickWindow::screenChanged, q, &QQuickWindow::handleScreenChanged);
- QObject::connect(qApp, &QGuiApplication::applicationStateChanged, q, &QQuickWindow::handleApplicationStateChanged);
- QObject::connect(q, &QQuickWindow::frameSwapped, q, &QQuickWindow::runJobsAfterSwap, Qt::DirectConnection);
+ QObject::connect(q, &QQuickWindow::focusObjectChanged, q, &QQuickWindow::activeFocusItemChanged),
+ QObject::connect(q, &QQuickWindow::screenChanged, q, &QQuickWindow::handleScreenChanged),
+ QObject::connect(qApp, &QGuiApplication::applicationStateChanged, q, &QQuickWindow::handleApplicationStateChanged),
+ QObject::connect(q, &QQuickWindow::frameSwapped, q, &QQuickWindow::runJobsAfterSwap, Qt::DirectConnection),
+ };
if (QQmlInspectorService *service = QQmlDebugConnector::service<QQmlInspectorService>())
service->addWindow(q);
@@ -1213,6 +1215,9 @@ QQuickWindow::~QQuickWindow()
// have their destructors loaded while they the library is still
// loaded into memory.
QQuickPixmap::purgeCache();
+
+ for (const QMetaObject::Connection &connection : d->connections)
+ disconnect(connection);
}
#if QT_CONFIG(quick_shadereffect)
diff --git a/src/quick/items/qquickwindow_p.h b/src/quick/items/qquickwindow_p.h
index f4769a8c7f..8da8b0b6c0 100644
--- a/src/quick/items/qquickwindow_p.h
+++ b/src/quick/items/qquickwindow_p.h
@@ -194,6 +194,7 @@ public:
qreal lastReportedItemDevicePixelRatio;
QMetaObject::Connection physicalDpiChangedConnection;
+ std::array<QMetaObject::Connection, 7> connections;
void updateDirtyNodes();
void cleanupNodes();