aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlincubator_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-06-14 16:28:34 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-01-24 15:02:36 +0000
commitca6b787a01ea289bd5c2a3e4ff3c7442a4ff58fc (patch)
tree8d8d49fe22b9686b44e78a99e93c0ba0535aab3f /src/qml/qml/qqmlincubator_p.h
parent94f6071b8a36501d9da516f2bf0f251147c8b934 (diff)
Allow canceling incubation
Qt Quick Controls must avoid destroying any object that belongs to a tree of objects being incubated. The problem is that QQC have no control over the incubation process. This patch adds private API that allows QQC to cancel incubation of a specific item that QQC would like to destroy. Change-Id: Id9f9004736e2b53fe46cdb6bb3055b7457def94d Task-number: QTBUG-50992 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlincubator_p.h')
-rw-r--r--src/qml/qml/qqmlincubator_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlincubator_p.h b/src/qml/qml/qqmlincubator_p.h
index ecf3b6d2ca..758e0a29f6 100644
--- a/src/qml/qml/qqmlincubator_p.h
+++ b/src/qml/qml/qqmlincubator_p.h
@@ -40,6 +40,8 @@
#ifndef QQMLINCUBATOR_P_H
#define QQMLINCUBATOR_P_H
+#include "qqmlincubator.h"
+
#include <private/qintrusivelist_p.h>
#include <private/qqmlvme_p.h>
#include <private/qrecursionwatcher_p.h>
@@ -100,6 +102,9 @@ public:
void forceCompletion(QQmlInstantiationInterrupt &i);
void incubate(QQmlInstantiationInterrupt &i);
+
+ // used by Qt Quick Controls 2
+ Q_QML_PRIVATE_EXPORT static void cancel(QObject *object, QQmlContext *context = 0);
};
QT_END_NAMESPACE