From e4cd376599e368edd7e8132903f425530102bfae Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Tue, 3 May 2022 14:37:26 +0200 Subject: Avoid double applyDelegateChange in QQIV::setDelegate If a QQmlDelegateModel is used together with QQuickItemView, then we will already call applyDelegateChange when the DelegateModel's delegateChanged signal is emitted from QQmlDelegateModel::setDelegate. Calling it manually in QQuickItemView's setDelegate is thus superfluous. Fixes: QTBUG-102793 Fixes: QTBUG-107732 Change-Id: Ifffb23661813c4e71287538ec5342215dfbbdad6 Reviewed-by: Ulf Hermann (cherry picked from commit 2664b1988f031366c2616581e65b0e02e37e3ff1) Reviewed-by: Qt CI Bot Reviewed-by: Fabian Kosmale --- src/quick/items/qquickitemview.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/quick/items') diff --git a/src/quick/items/qquickitemview.cpp b/src/quick/items/qquickitemview.cpp index fda2e6ff79..7146b8d1b7 100644 --- a/src/quick/items/qquickitemview.cpp +++ b/src/quick/items/qquickitemview.cpp @@ -290,8 +290,6 @@ void QQuickItemView::setDelegate(QQmlComponent *delegate) if (QQmlDelegateModel *dataModel = qobject_cast(d->model)) { int oldCount = dataModel->count(); dataModel->setDelegate(delegate); - if (isComponentComplete()) - d->applyDelegateChange(); if (oldCount != dataModel->count()) emit countChanged(); } -- cgit v1.2.3 From a6273d93216503a2a8ce4a1b08a8ceb378627a16 Mon Sep 17 00:00:00 2001 From: Hatem ElKharashy Date: Mon, 14 Nov 2022 18:29:05 +0200 Subject: Doc: Add missing QQuickWindow constructor QQuickWindow::QQuickWindow(QQuickRenderControl *control) should be part of the public API. The user can use QQuickRenderControl with QQuickWindow to control the scenegraph rendering. This constructor is used in the QQuickRenderControl example. Change-Id: I1bb38d64173c24ba835137897ef915dfde83b1f3 Reviewed-by: Laszlo Agocs (cherry picked from commit 7454d3b612eab92b8e91741fc1c51311cf80c3a2) Reviewed-by: Qt Cherry-pick Bot --- src/quick/items/qquickwindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/quick/items') diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp index e48b83d5fc..c6c7b6171e 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp @@ -1494,7 +1494,11 @@ QQuickWindow::QQuickWindow(QQuickWindowPrivate &dd, QWindow *parent) } /*! - \internal + Constructs a window for displaying a QML scene, whose rendering will + be controlled by the \a control object. + Please refer to QQuickRenderControl's documentation for more information. + + \since 5.4 */ QQuickWindow::QQuickWindow(QQuickRenderControl *control) : QWindow(*(new QQuickWindowPrivate), nullptr) -- cgit v1.2.3