aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/types')
-rw-r--r--src/qml/types/qqmldelegatemodel.cpp7
-rw-r--r--src/qml/types/qqmlobjectmodel.cpp4
2 files changed, 5 insertions, 6 deletions
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp
index a5878dcffd..34bc266cb5 100644
--- a/src/qml/types/qqmldelegatemodel.cpp
+++ b/src/qml/types/qqmldelegatemodel.cpp
@@ -837,10 +837,9 @@ void QQDMIncubationTask::statusChanged(Status status)
} else if (isDoneIncubating(status)) {
Q_ASSERT(incubating);
// The model was deleted from under our feet, cleanup ourselves
- if (incubating->object) {
- delete incubating->object;
-
- incubating->object = 0;
+ delete incubating->object;
+ incubating->object = 0;
+ if (incubating->contextData) {
incubating->contextData->destroy();
incubating->contextData = 0;
}
diff --git a/src/qml/types/qqmlobjectmodel.cpp b/src/qml/types/qqmlobjectmodel.cpp
index 21205f4490..d926ecb6ce 100644
--- a/src/qml/types/qqmlobjectmodel.cpp
+++ b/src/qml/types/qqmlobjectmodel.cpp
@@ -178,8 +178,8 @@ public:
\ingroup qtquick-models
\brief Defines a set of items to be used as a model
- A ObjectModel contains the visual items to be used in a view.
- When a ObjectModel is used in a view, the view does not require
+ An ObjectModel contains the visual items to be used in a view.
+ When an ObjectModel is used in a view, the view does not require
a delegate since the ObjectModel already contains the visual
delegate (items).