diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-07-14 01:02:04 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-07-16 09:38:30 +0200 |
commit | 43645fd59c6bcb0a3e37eef530ef970f51ed48af (patch) | |
tree | d377a19c36e9e853377db59b58d937db0ea67e0d /src/quick/items/qquickloader.cpp | |
parent | ad0f200df54e5afcb1fdcb977794259bdb9216b5 (diff) | |
parent | f42207cbdb0cbe5e345bfd9e000b3e77b34a503c (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
src/quick/items/qquickloader.cpp
tests/auto/quick/qquickanimations/tst_qquickanimations.cpp
Change-Id: I0cb9f637d24ccd0ecfb50c455cc210119f744b02
Diffstat (limited to 'src/quick/items/qquickloader.cpp')
-rw-r--r-- | src/quick/items/qquickloader.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/quick/items/qquickloader.cpp b/src/quick/items/qquickloader.cpp index 0de9d6c49a..f32f25a42f 100644 --- a/src/quick/items/qquickloader.cpp +++ b/src/quick/items/qquickloader.cpp @@ -112,6 +112,8 @@ void QQuickLoaderPrivate::clear() q, SIGNAL(progressChanged())); component->deleteLater(); component.setObject(nullptr, q); + } else if (component) { + component.setObject(nullptr, q); } source = QUrl(); @@ -437,7 +439,8 @@ void QQuickLoader::loadFromSource() if (isComponentComplete()) { QQmlComponent::CompilationMode mode = d->asynchronous ? QQmlComponent::Asynchronous : QQmlComponent::PreferSynchronous; - d->component.setObject(new QQmlComponent(qmlEngine(this), d->source, mode, this), this); + if (!d->component) + d->component.setObject(new QQmlComponent(qmlEngine(this), d->source, mode, this), this); d->load(); } } @@ -823,7 +826,8 @@ void QQuickLoader::componentComplete() if (active()) { if (d->loadingFromSource) { QQmlComponent::CompilationMode mode = d->asynchronous ? QQmlComponent::Asynchronous : QQmlComponent::PreferSynchronous; - d->component.setObject(new QQmlComponent(qmlEngine(this), d->source, mode, this), this); + if (!d->component) + d->component.setObject(new QQmlComponent(qmlEngine(this), d->source, mode, this), this); } d->load(); } |