Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqmlincubator_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQMLINCUBATOR_P_H
5#define QQMLINCUBATOR_P_H
6
7#include "qqmlincubator.h"
8
9#include <private/qintrusivelist_p.h>
10#include <private/qqmlvme_p.h>
11#include <private/qrecursionwatcher_p.h>
12#include <private/qqmlengine_p.h>
13#include <private/qqmlguardedcontextdata_p.h>
14
15#include <QtCore/qpointer.h>
16
17//
18// W A R N I N G
19// -------------
20//
21// This file is not part of the Qt API. It exists purely as an
22// implementation detail. This header file may change from version to
23// version without notice, or even be removed.
24//
25// We mean it.
26//
27
29
31
32class QQmlIncubator;
34{
35public:
38
39 inline static QQmlIncubatorPrivate *get(QQmlIncubator *incubator) { return incubator->d; }
40
43
44 QQmlIncubator::Status calculateStatus() const;
45 void changeStatus(QQmlIncubator::Status);
47
50 enum Progress : char { Execute, Completing, Completed };
52
53 QList<QQmlError> errors;
54
55
56 QPointer<QObject> result;
57 enum HadTopLevelRequired : bool {No = 0, Yes = 1};
58 /* TODO: unify with Creator pointer once QTBUG-108760 is implemented
59 though we don't acutally own the properties here; if we ever end up
60 with a use case for async incubation of C++ types, we however could
61 not rely on the component to still exist during incubation, and
62 would need to store a copy of the required properties instead
63 */
64 QTaggedPointer<RequiredProperties, HadTopLevelRequired> requiredPropertiesFromComponent;
67 QQmlRefPointer<QV4::ExecutableCompilationUnit> compilationUnit;
68 QScopedPointer<QQmlObjectCreator> creator;
70
71 QExplicitlySharedDataPointer<QQmlIncubatorPrivate> waitingOnMe;
74 QIntrusiveList<QQmlIncubatorPrivate, &QQmlIncubatorPrivate::nextWaitingFor> waitingFor;
75
78
79 void clear();
80
81 void forceCompletion(QQmlInstantiationInterrupt &i);
82 void incubate(QQmlInstantiationInterrupt &i);
83 void incubateCppBasedComponent(QQmlComponent *component, QQmlContext *context);
84 RequiredProperties *requiredProperties();
85 bool hadTopLevelRequiredProperties() const;
86};
87
89
90#endif // QQMLINCUBATOR_P_H
91
The QQmlComponent class encapsulates a QML component definition.
The QQmlContext class defines a context within a QML engine.
Definition qqmlcontext.h:25
QQmlEnginePrivate::Incubator QIPBase
QIntrusiveListNode nextWaitingFor
static QQmlIncubatorPrivate * get(QQmlIncubator *incubator)
QQmlGuardedContextData rootContext
QExplicitlySharedDataPointer< QQmlIncubatorPrivate > waitingOnMe
QPointer< QObject > result
QScopedPointer< QQmlObjectCreator > creator
QQmlRefPointer< QV4::ExecutableCompilationUnit > compilationUnit
QQmlEnginePrivate * enginePriv
QQmlIncubator::IncubationMode mode
QList< QQmlError > errors
QTaggedPointer< RequiredProperties, HadTopLevelRequired > requiredPropertiesFromComponent
QVariantMap initialProperties
QRecursionNode recursion
QIntrusiveList< QQmlIncubatorPrivate, &QQmlIncubatorPrivate::nextWaitingFor > waitingFor
QQmlIncubator::Status status
The QQmlIncubator class allows QML objects to be created asynchronously.
IncubationMode
Specifies the mode the incubator operates in.
Status
Specifies the status of the QQmlIncubator.
\inmodule QtCore
Definition qshareddata.h:19
b clear()
Combined button and popup list for selecting options.
static void * context
const GLfloat * m
GLdouble GLdouble GLdouble GLdouble q
Definition qopenglext.h:259
static qreal component(const QPointF &point, unsigned int i)