Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QtQuickPrivate Namespace Reference

Functions

Q_QUICKTEMPLATES2_EXPORT void beginDeferred (QObject *object, const QString &property, QQuickUntypedDeferredPointer *delegate, bool isOwnState, QQmlEngine *engine=nullptr)
Q_QUICKTEMPLATES2_EXPORT void cancelDeferred (QObject *object, const QString &property)
Q_QUICKTEMPLATES2_EXPORT void completeDeferred (QObject *object, const QString &property, QQuickUntypedDeferredPointer *delegate, QQmlEngine *engine=nullptr)
static void cancelDeferred (QQmlData *ddata, int propertyIndex)
static bool beginDeferred (QQmlEnginePrivate *enginePriv, const QQmlProperty &property, QQmlComponentPrivate::DeferredState *deferredState)

Detailed Description

For the history behind why these functions were introduced, see the comments of QTBUG-50992, specifically \l {https://bugreports.qt.io/browse/QTBUG-50992?focusedId=325677&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-325677}{this}.

The first commit to the QML engine to support deferred properties seems to be 59b8d719d6122d86a4cc650911788cc4d778ce29.

The first commit to add support for it in Controls was 458eb65f730178bc93ba7b18f0e4dd2a13efad2e.

In short, deferred execution solved two issues:

\list 1

  • Incubation issues when using asynchronous loaders, AKA QTBUG-50992.
  • Performance issues from creating two items unnecessarily when a styled control was customized, which is explained in more detail in the commit message of 458eb65f730178bc93ba7b18f0e4dd2a13efad2e. \endlist
See also
qmlExecuteDeferred

Function Documentation

◆ beginDeferred() [1/2]

void QtQuickPrivate::beginDeferred ( QObject * object,
const QString & property,
QQuickUntypedDeferredPointer * delegate,
bool isOwnState,
QQmlEngine * engine = nullptr )

Definition at line 112 of file qquickdeferredexecute.cpp.

Referenced by quickBeginAttachedDeferred(), and quickBeginDeferred().

Here is the caller graph for this function:

◆ beginDeferred() [2/2]

bool QtQuickPrivate::beginDeferred ( QQmlEnginePrivate * enginePriv,
const QQmlProperty & property,
QQmlComponentPrivate::DeferredState * deferredState )
static

Definition at line 55 of file qquickdeferredexecute.cpp.

◆ cancelDeferred() [1/2]

void QtQuickPrivate::cancelDeferred ( QObject * object,
const QString & property )

Definition at line 137 of file qquickdeferredexecute.cpp.

Referenced by quickCancelDeferred().

Here is the caller graph for this function:

◆ cancelDeferred() [2/2]

void QtQuickPrivate::cancelDeferred ( QQmlData * ddata,
int propertyIndex )
static

Definition at line 46 of file qquickdeferredexecute.cpp.

◆ completeDeferred()

void QtQuickPrivate::completeDeferred ( QObject * object,
const QString & property,
QQuickUntypedDeferredPointer * delegate,
QQmlEngine * engine = nullptr )

Definition at line 144 of file qquickdeferredexecute.cpp.

Referenced by quickCompleteAttachedDeferred(), and quickCompleteDeferred().

Here is the caller graph for this function: